You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by kw...@apache.org on 2008/04/21 02:12:18 UTC

svn commit: r649999 - in /incubator/tuscany/java/sca/vtest/java-api/annotations: ./ conversationattributes/ conversationattributes/src/ conversationattributes/src/main/ conversationattributes/src/main/java/ conversationattributes/src/main/java/org/ con...

Author: kwilliams
Date: Sun Apr 20 17:12:16 2008
New Revision: 649999

URL: http://svn.apache.org/viewvc?rev=649999&view=rev
Log:
First content for Tuscany - 2247. Conversations and Async

Added:
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite   (with props)
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/
    incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java   (with props)
Modified:
    incubator/tuscany/java/sca/vtest/java-api/annotations/pom.xml

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml Sun Apr 20 17:12:16 2008
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * Licensed to the Apache Software Foundation (ASF) under one
+    * or more contributor license agreements.  See the NOTICE file
+    * distributed with this work for additional information
+    * regarding copyright ownership.  The ASF licenses this file
+    * to you under the Apache License, Version 2.0 (the
+    * "License"); you may not use this file except in compliance
+    * with the License.  You may obtain a copy of the License at
+    * 
+    *   http://www.apache.org/licenses/LICENSE-2.0
+    * 
+    * Unless required by applicable law or agreed to in writing,
+    * software distributed under the License is distributed on an
+    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    * KIND, either express or implied.  See the License for the
+    * specific language governing permissions and limitations
+    * under the License.    
+-->
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>java-api-annotations</artifactId>
+        <version>2.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>vtest-java-api-annotations-conversationattributes</artifactId>
+    <name>Apache Tuscany SCA Java APIs and Annoations Verification Tests - Annotations - @ConversationAttributes</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-implementation-java-runtime</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+        
+    </dependencies>
+</project>

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes;
+
+/**
+ * Simple Service
+ */
+public interface AService {
+
+    public void testMaxAge() throws InterruptedException;
+    public void testMaxIdle() throws InterruptedException;
+    
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/AService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes;
+
+import org.osoa.sca.annotations.Conversational;
+
+/**
+ * Simple Service
+ */
+@Conversational
+public interface B2Service {
+
+    public void setState(String someState);
+    public String getState();
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/B2Service.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes;
+
+import org.osoa.sca.annotations.Conversational;
+
+/**
+ * Simple Service
+ */
+@Conversational
+public interface BService {
+
+    public void setState(String someState);
+    public String getState();
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/BService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl;
+
+import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.AService;
+import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.B2Service;
+import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService;
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Service;
+
+@Service(AService.class)
+public class AServiceImpl implements AService {
+
+    @Reference
+    protected BService b;
+    
+    @Reference
+    protected B2Service b2;
+
+
+    private void delayForSeconds(int numSeconds) {
+        try {
+            Thread.sleep(numSeconds * 1000);// millisecs
+        } catch (InterruptedException ex) {
+            throw new Error(ex);
+        }
+    }
+
+    public void testMaxAge() {
+
+        String someState = "someState";
+        b.setState(someState);
+        delayForSeconds(2);
+        b.setState(someState);
+
+    }
+    
+    public void testMaxIdle() {
+
+        String someState = "someState";
+        b2.setState(someState);
+        delayForSeconds(2);
+        b2.setState(someState);
+
+    }
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/AServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl;
+
+import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService;
+import org.osoa.sca.annotations.ConversationAttributes;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(BService.class)
+@Scope("CONVERSATION")
+@ConversationAttributes(maxIdleTime="1 seconds")
+public class B2ServiceImpl implements BService {
+
+    String someState;
+
+    public void setState(String someState) {
+        this.someState = someState;
+    }
+
+    public String getState() {
+        return someState;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/B2ServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl;
+
+import org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.BService;
+import org.osoa.sca.annotations.ConversationAttributes;
+import org.osoa.sca.annotations.Scope;
+import org.osoa.sca.annotations.Service;
+
+@Service(BService.class)
+@Scope("CONVERSATION")
+@ConversationAttributes(maxAge="1 seconds")
+public class BServiceImpl implements BService {
+
+    String someState;
+
+    public void setState(String someState) {
+        this.someState = someState;
+    }
+
+    public String getState() {
+        return someState;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/impl/BServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite Sun Apr 20 17:12:16 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	* Licensed to the Apache Software Foundation (ASF) under one
+	* or more contributor license agreements.  See the NOTICE file
+	* distributed with this work for additional information
+	* regarding copyright ownership.  The ASF licenses this file
+	* to you under the Apache License, Version 2.0 (the
+	* "License"); you may not use this file except in compliance
+	* with the License.  You may obtain a copy of the License at
+	*
+	*   http://www.apache.org/licenses/LICENSE-2.0
+	*
+	* Unless required by applicable law or agreed to in writing,
+	* software distributed under the License is distributed on an
+	* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+	* KIND, either express or implied.  See the License for the
+	* specific language governing permissions and limitations
+	* under the License.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	targetNamespace="http://java-api-tests" name="Converstion-Composite">
+
+	<component name="AComponent">
+		<implementation.java
+			class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.AServiceImpl" />
+		<reference name="b" target="BComponent" />
+		<reference name="b2" target="B2Component" />
+	</component>
+
+	<component name="BComponent">
+		<implementation.java
+			class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.BServiceImpl" />
+	</component>
+
+	<component name="B2Component">
+		<implementation.java
+			class="org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes.impl.B2ServiceImpl" />
+	</component>
+
+</composite>

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/main/resources/conversation.composite
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java?rev=649999&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java (added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java Sun Apr 20 17:12:16 2008
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.vtest.javaapi.annotations.conversationattributes;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osoa.sca.ConversationEndedException;
+
+/**
+ * This test class tests the Service annotation described in section 1.2.1 and
+ * 1.8.17
+ */
+public class ConversationAttributesAnnotationTestCase {
+
+    protected static SCADomain domain;
+    protected static String compositeName = "conversation.composite";
+    protected static AService aService = null;
+
+    @BeforeClass
+    public static void init() throws Exception {
+        try {
+            System.out.println("Setting up");
+            domain = SCADomain.newInstance(compositeName);
+            aService = domain.getService(AService.class, "AComponent");
+        } catch (Exception ex) {
+            ex.printStackTrace();
+        }
+    }
+
+    @AfterClass
+    public static void destroy() throws Exception {
+
+        System.out.println("Cleaning up");
+        if (domain != null)
+            domain.close();
+
+    }
+
+    /**
+     * Line 1665, 1666
+     * <p>
+     * maxIdleTime (optional) - The maximum time that can pass between
+     * operations within a single conversation. If more time than this passes,
+     * then the container may end the conversation.
+     */
+    @Test(expected = ConversationEndedException.class)
+    public void maxIdle() throws Exception {
+        aService.testMaxIdle();
+    }
+
+    /**
+     * Line 1667, 1668
+     * <p>
+     * maxAge (optional) - The maximum time that the entire conversation can
+     * remain active. If more time than this passes, then the container may end
+     * the conversation.
+     */
+    @Test(expected = ConversationEndedException.class)
+    public void maxAge() throws Exception {
+        aService.testMaxAge();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/conversationattributes/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/conversationattributes/ConversationAttributesAnnotationTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/vtest/java-api/annotations/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/pom.xml?rev=649999&r1=649998&r2=649999&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/pom.xml (original)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/pom.xml Sun Apr 20 17:12:16 2008
@@ -59,6 +59,7 @@
                 <module>scope</module>
                 <module>oneway</module>
                 <module>conversational</module>
+                <module>conversationattributes</module>
            </modules>
         </profile>
     </profiles>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org