diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:14:18 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:14:18 +0000 |
commit | fdd5b43d3c139cf2cbd1655d2efbfaf9032a5b5e (patch) | |
tree | bcd16e19fa4bbd45f956812be8b65f7a143b573f /branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main | |
parent | 3caf8614f25d6b1962e20331fdf423c863bc02f3 (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main')
29 files changed, 0 insertions, 1914 deletions
diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java deleted file mode 100644 index b7cf3fba71..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/AService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.scope; - - -/** - * Simple Service - */ -public interface AService { - - public String getName(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java deleted file mode 100644 index 7da9d29424..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/BService.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.scope; - -/** - * Simple Service - */ -public interface BService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java deleted file mode 100644 index 208c6a78b0..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/CService.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.scope; - -/** - * Simple Service - */ -public interface CService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java deleted file mode 100644 index d4cedcc979..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/DService.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface DService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java deleted file mode 100644 index 7844ba7b62..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/FService.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface FService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.java deleted file mode 100644 index 7a047414dc..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/GService.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface GService { - - public String getName(); - - public int getInitCalledCounter(); - - public int getDestroyCalledCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java deleted file mode 100644 index 555cdd5be0..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/HService.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - - -/** - * Simple Service - */ -@Remotable -public interface HService { - - public String getName(); - - public String test(); - - public String testCounters(int n); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.java deleted file mode 100644 index 79e20a3879..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/IService.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; - -/** - * Simple Service - */ -@Conversational -public interface IService { - - public String getName(); - - public boolean isInitReady(); - - public String getCurrentState(); - - public String getConversationId(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - - @EndsConversation - public void endConversation(); -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java deleted file mode 100644 index 95813f0e32..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/JService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface JService { - - public String getName(); - - public String getFailedReason(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java deleted file mode 100644 index b4c95965ff..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/KService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface KService { - - public String getName(); - - public String callL1(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java deleted file mode 100644 index 5c0fc12fa3..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/LService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface LService { - - public String getName(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java deleted file mode 100644 index ab6a3f946a..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/MService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface MService { - - public String getName(); - - public String getFailedReason(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java deleted file mode 100644 index c544bf6e02..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/NService.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface NService { - - public String getName(); - - public String callO1(int nthTime); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java deleted file mode 100644 index 0104030f2e..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/OService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.scope; - -import org.osoa.sca.annotations.Remotable; - -/** - * Simple Service - */ -@Remotable -public interface OService { - - public String getName(); - - public String getCurrentState(); - - public String setCurrentState(String currentState); - - public int getDestroyCalledCounter(); - - public int getInitCalledCounter(); - - public int getInstanceCounter(); - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java deleted file mode 100644 index 9c17b06b16..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/AServiceImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.osoa.sca.annotations.Service; - -@Service(AService.class) -public class AServiceImpl implements AService { - - public String getName() { - return "AService"; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java deleted file mode 100644 index 2a8bd80e9a..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/BServiceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.BService; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Destroy; - -@Service(BService.class) -public class BServiceImpl implements BService { - - private static int instanceCounter = 0; - - private static int initCalledCounter = 0; - - private static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - private int currentInstanceId = 0; - - public String currentState = null; - - private boolean isInitReady = false; - - public BServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initBService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - } - - @Destroy - public void destroyBService() { - destroyCalledCounter++; - } - - public String getName() { - return "BService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java deleted file mode 100644 index c99f5f5e74..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/CServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.CService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(CService.class) -@Scope("STATELESS") -public class CServiceImpl implements CService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public CServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initCService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - } - - @Destroy - public void destroyCService() { - destroyCalledCounter++; - } - - public String getName() { - return "CService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java deleted file mode 100644 index cc41994106..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/DServiceImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.DService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(DService.class) -@Scope("REQUEST") -public class DServiceImpl implements DService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public DServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initDService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("DService" + currentInstanceId + "->initDService"); - } - - @Destroy - public void destroyDService() { - destroyCalledCounter++; - System.out.println("DService" + currentInstanceId + "->destroyDService"); - } - - public String getName() { - return "DService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "DService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java deleted file mode 100644 index 4fb7386484..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/FServiceImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.FService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(FService.class) -@Scope("COMPOSITE") -public class FServiceImpl implements FService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - public int currentInstanceId = 0; - - public String currentState = null; - - public boolean isInitReady = false; - - public FServiceImpl() { - currentInstanceId = ++instanceCounter; - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initFService() throws Exception { - initCalledCounter++; - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("FService" + currentInstanceId + "->initFService"); - } - - @Destroy - public void destroyFService() { - destroyCalledCounter++; - System.out.println("FService" + currentInstanceId + "->destroyFService"); - } - - public String getName() { - return "FService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "FService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java deleted file mode 100644 index 994469cb3a..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/GServiceImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.GService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.EagerInit; - -@Scope("COMPOSITE") -@EagerInit -public class GServiceImpl implements GService { - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public AService a1; - - public String p1; - - @Init - public void initGService() throws Exception { - initCalledCounter++; - System.out.println("GService->initGService"); - } - - @Destroy - public void destroyGService() { - destroyCalledCounter++; - System.out.println("GService->destroyGService"); - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - public String getName() { - return "GService"; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java deleted file mode 100644 index 2fa610def7..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/HServiceImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.IService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.HService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; - -@Service(HService.class) -public class HServiceImpl implements HService { - - @Reference - public IService i1; - - public String getName() { - return "HService"; - } - - public String test() { - - String serviceName = i1.getName(); - String conversationIdBefore = i1.getConversationId(); - - for (int i = 0; i < 10; i++) { - String newState = "state-" + i; - i1.setCurrentState(newState); - String currentState = i1.getCurrentState(); - if (currentState == null || !currentState.equals(serviceName + "-" + newState)) { - i1.endConversation(); - return "CurrentStateLost - " + currentState; - } - } - - boolean isInitReady = i1.isInitReady(); - - String conversationIdAfter = i1.getConversationId(); - - i1.endConversation(); - - if (!isInitReady) - return "InitNotReady"; - - if (!conversationIdBefore.equals(conversationIdAfter)) - return "DifferentConversationId"; - - return "None"; - } - - public String testCounters(int n) { - int instanceCounter = i1.getInstanceCounter(); - int initCalledCounter = i1.getInitCalledCounter(); - int destroyCalledCounter = i1.getDestroyCalledCounter(); - - System.out.println("instanceCounter=" + instanceCounter); - System.out.println("initCalledCounter=" + initCalledCounter); - System.out.println("destroyCalledCounter=" + destroyCalledCounter); - - if (instanceCounter != n + 1) - return "IncorrectInstanceCounter"; - if (initCalledCounter != n + 1) - return "IncorrectInitCalledCounter"; - if (destroyCalledCounter != n) - return "IncorrectDestroyCalledCounter"; - - return "None"; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java deleted file mode 100644 index 9f6019a1fd..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/IServiceImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.AService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.IService; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Property; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(IService.class) -@Scope("CONVERSATION") -public class IServiceImpl implements IService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - @ConversationID - protected String conversationId; - - public int currentInstanceId = 0; - - public AService a1; - - public String p1; - - public String currentState = null; - - public boolean isInitReady = false; - - public IServiceImpl() { - synchronized (IServiceImpl.class) { - currentInstanceId = ++instanceCounter; - } - isInitReady = false; - } - - @Reference - public void setA1(AService a1) { - this.a1 = a1; - } - - @Property - public void setP1(String p1) { - this.p1 = p1; - } - - @Init - public void initIService() throws Exception { - synchronized (IServiceImpl.class) { - initCalledCounter++; - } - if (p1.equals("p1") && a1.getName().equals("AService")) - isInitReady = true; - System.out.println("IService" + currentInstanceId + "->initIService"); - } - - @Destroy - public void destroyIService() { - synchronized (IServiceImpl.class) { - destroyCalledCounter++; - } - System.out.println("IService" + currentInstanceId + "->destroyIService"); - } - - public void endConversation() { - System.out.println("IService" + currentInstanceId + "->endConversation"); - } - - public String getName() { - return "IService" + currentInstanceId; - } - - public AService getA1() { - return a1; - } - - public String getP1() { - return p1; - } - - public String getCurrentState() { - return currentState; - } - - public String getConversationId() { - return conversationId; - } - - public String setCurrentState(String currentState) { - this.currentState = "IService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public boolean isInitReady() { - return isInitReady; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java deleted file mode 100644 index a5851598a0..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/JServiceImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.scope.impl; - -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.KService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.JService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(JService.class) -@Scope("COMPOSITE") -public class JServiceImpl implements JService { - - @Reference - public KService k1; - - public static String failedReason = ""; - - public static Timer aTimer = null; - - @Init - public void initJService() throws Exception { - aTimer = new Timer(); - aTimer.schedule(new JTimerTask(), 1000); - System.out.println("JService->initJService"); - } - - @Destroy - public void destroyJService() { - aTimer.cancel(); - System.out.println("JService->destroyJService"); - } - - public String getName() { - return "JService"; - } - - public String getFailedReason() { - return failedReason; - } - - private class JTimerTask extends TimerTask { - - public boolean cancel() { - return true; - } - - public void run() { - String result = k1.callL1(); - if (!result.equals("None")) - failedReason = failedReason + ";" + result; - } - - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java deleted file mode 100644 index 7088562c57..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/KServiceImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.KService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.LService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(KService.class) -@Scope("STATELESS") -public class KServiceImpl implements KService { - - public static int instanceCounter = 0; - - public String previousL1Name = null; - - public int currentInstanceId = 0; - - @Reference - public LService l1; - - public KServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - - public String getName() { - return "KService"+currentInstanceId; - } - - public String callL1() { - - for (int i = 1; i < 11; i++) { - System.out.println(getName() + " calls LService " + i + (i == 1 ? "st time:" : (i == 2 ? "nd time:" : (i == 3 ? "rd time:" : "th time")))); - - String serviceName = l1.getName(); - for (int j = 0; j < 10; j++) { - String newState = "state-" + j; - l1.setCurrentState(newState); - String currentState = l1.getCurrentState(); - if (!currentState.equals(serviceName + "-" + newState)) { - return "CurrentStateLost - " + currentState; - } - } - - System.out.print(" Name=" + serviceName); - System.out.print(", #Instance=" + l1.getInstanceCounter()); - System.out.print(", #InitCalled=" + l1.getInitCalledCounter()); - System.out.println(", #DestroyCalled=" + l1.getDestroyCalledCounter()); - - if (previousL1Name == null) { - previousL1Name = serviceName; - } else { - if (!previousL1Name.equals(serviceName)) - return "DifferentLServiceInstance"; - } - } - return "None"; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java deleted file mode 100644 index 274e0570d9..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/LServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.LService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(LService.class) -@Scope("REQUEST") -public class LServiceImpl implements LService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public int currentInstanceId = 0; - - public String currentState = null; - - public LServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - @Init - public void initLService() throws Exception { - initCalledCounter++; - System.out.println("LService" + currentInstanceId + "->initLService"); - } - - @Destroy - public void destroyLService() { - destroyCalledCounter++; - System.out.println("LService" + currentInstanceId + "->destroyLService"); - } - - public String getName() { - return "LService" + currentInstanceId; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "LService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java deleted file mode 100644 index 681b0b3776..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/MServiceImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.scope.impl; - -import java.util.Timer; -import java.util.TimerTask; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.MService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.NService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(MService.class) -@Scope("COMPOSITE") -public class MServiceImpl implements MService { - - @Reference - public NService n1; - - public static String failedReason = ""; - - public static Timer aTimer = null; - - public static int counter = 0; - - @Init - public void initMService() throws Exception { - aTimer = new Timer(); - aTimer.schedule(new MTimerTask(), 1000, 1000); - System.out.println("MService->initMService"); - } - - @Destroy - public void destroyMService() { - aTimer.cancel(); - System.out.println("MService->destroyMService"); - } - - public String getName() { - return "MService"; - } - - public String getFailedReason() { - return failedReason; - } - - private class MTimerTask extends TimerTask { - - public boolean cancel() { - return true; - } - - public void run() { - counter++; - String result = n1.callO1(counter); - if (!result.equals("None")) - failedReason = failedReason + ";" + result; - } - - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java deleted file mode 100644 index 98b94a33c7..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/NServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.NService; -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.OService; -import org.osoa.sca.annotations.Reference; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(NService.class) -@Scope("STATELESS") -public class NServiceImpl implements NService { - - public static int instanceCounter = 0; - - public String previousL1Name = null; - - public int currentInstanceId = 0; - - @Reference - public OService o1; - - public NServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - - public String getName() { - return "NService"+currentInstanceId; - } - - public String callO1(int nthTime) { - - for (int i = 1; i < 11; i++) { - System.out.println(getName() + " calls OService " + i + (i == 1 ? "st time:" : (i == 2 ? "nd time:" : (i == 3 ? "rd time:" : "th time")))); - - String serviceName = o1.getName(); - for (int j = 0; j < 10; j++) { - String newState = "state-" + j; - o1.setCurrentState(newState); - String currentState = o1.getCurrentState(); - if (!currentState.equals(serviceName + "-" + newState)) { - return "CurrentStateLost - " + currentState; - } - } - - System.out.print(" Name=" + serviceName); - System.out.print(", #Instance=" + o1.getInstanceCounter()); - System.out.print(", #InitCalled=" + o1.getInitCalledCounter()); - System.out.println(", #DestroyCalled=" + o1.getDestroyCalledCounter()); - - if (previousL1Name == null) { - previousL1Name = serviceName; - } else { - if (!previousL1Name.equals(serviceName)) - return "DifferentOServiceInstance"; - } - - } - - if (o1.getInstanceCounter() < nthTime) { - return "SharedSameInstance"; - } - - return "None"; - } -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java deleted file mode 100644 index 8cf39a072c..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/scope/impl/OServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.scope.impl; - -import org.apache.tuscany.sca.vtest.javaapi.annotations.scope.OService; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Service; -import org.osoa.sca.annotations.Scope; - -@Service(OService.class) -@Scope("REQUEST") -public class OServiceImpl implements OService { - - public static int instanceCounter = 0; - - public static int initCalledCounter = 0; - - public static int destroyCalledCounter = 0; - - public int currentInstanceId = 0; - - public String currentState = null; - - public OServiceImpl() { - currentInstanceId = ++instanceCounter; - } - - @Init - public void initOService() throws Exception { - initCalledCounter++; - System.out.println("OService" + currentInstanceId + "->initOService"); - } - - @Destroy - public void destroyOService() { - destroyCalledCounter++; - System.out.println("OService" + currentInstanceId + "->destroyOService"); - } - - public String getName() { - return "OService" + currentInstanceId; - } - - public String getCurrentState() { - return currentState; - } - - public String setCurrentState(String currentState) { - this.currentState = "OService" + currentInstanceId + "-" + currentState; - return this.currentState; - } - - public int getDestroyCalledCounter() { - return destroyCalledCounter; - } - - public int getInitCalledCounter() { - return initCalledCounter; - } - - public int getInstanceCounter() { - return instanceCounter; - } - -} diff --git a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/resources/scope.composite b/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/resources/scope.composite deleted file mode 100644 index 7c195b2b5d..0000000000 --- a/branches/sca-java-1.5.1/vtest/java-api/annotations/scope/src/main/resources/scope.composite +++ /dev/null @@ -1,110 +0,0 @@ -<?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="Scope-Composite"> - - <component name="AComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.AServiceImpl" /> - </component> - - <component name="BComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.BServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="CComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.CServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="DComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.DServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="FComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.FServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="GComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.GServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="HComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.HServiceImpl" /> - <reference name="i1" target="IComponent"/> - </component> - - <component name="IComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.IServiceImpl" /> - <reference name="a1" target="AComponent"/> - <property name="p1">p1</property> - </component> - - <component name="JComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.JServiceImpl" /> - <reference name="k1" target="KComponent"/> - </component> - - <component name="KComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.KServiceImpl" /> - <reference name="l1" target="LComponent"/> - </component> - - <component name="LComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.LServiceImpl" /> - </component> - - <component name="MComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.MServiceImpl" /> - <reference name="n1" target="NComponent"/> - </component> - - <component name="NComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.NServiceImpl" /> - <reference name="o1" target="OComponent"/> - </component> - - <component name="OComponent"> - <implementation.java - class="org.apache.tuscany.sca.vtest.javaapi.annotations.scope.impl.OServiceImpl" /> - </component> - -</composite> |