diff options
Diffstat (limited to 'branches/sca-java-1.x/itest/contribution-jee-samples')
19 files changed, 542 insertions, 62 deletions
diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml new file mode 100644 index 0000000000..d1f77dfae0 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/pom.xml @@ -0,0 +1,90 @@ +<?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>itest-contribution-jee-samples</artifactId> + <version>1.6-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit</artifactId> + <name>Apache Tuscany SCA iTest Contribution Java EE Samples 29</name> + <packaging>ear</packaging> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>1.6-SNAPSHOT</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-ejb_3.0_spec</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</artifactId> + <version>1.6-SNAPSHOT</version> + <type>ejb</type> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>itest-contribution-jee-samples-1-war-nonenhanced</artifactId> + <version>1.6-SNAPSHOT</version> + <type>war</type> + <scope>provided</scope> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <configuration> + <modules> + <ejbModule> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</artifactId> + <bundleDir>/</bundleDir> + </ejbModule> + <webModule> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>itest-contribution-jee-samples-1-war-nonenhanced</artifactId> + <bundleDir>/</bundleDir> + </webModule> + </modules> + </configuration> + </plugin> + </plugins> + <finalName>${artifactId}</finalName> + </build> +</project> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite new file mode 100644 index 0000000000..fa9a66af7f --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite @@ -0,0 +1,35 @@ +<?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://sample" + xmlns:sample="http://sample" + name="Calculator"> + + <component name="HelloworldServiceComponent"> + <implementation.ejb ejb-link="itest-contribution-jee-samples-7-ejb-nonenhanced.jar#HelloworldServiceBean"/> + <service name="HelloworldService"> + <interface.java interface="sample.ejb3.HelloworldService"/> + <binding.sca/> + </service> + </component> + + <service name="TheService" promote="HelloworldServiceComponent/HelloworldService"/> + +</composite> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/pom.xml index fb6cceabf0..d408db67c9 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/pom.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/pom.xml @@ -50,6 +50,7 @@ <groupId>org.apache.tuscany.sca</groupId> <artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</artifactId> <version>1.6-SNAPSHOT</version> + <type>ejb</type> <scope>provided</scope> </dependency> @@ -70,11 +71,11 @@ <artifactId>maven-ear-plugin</artifactId> <configuration> <modules> - <jarModule> + <ejbModule> <groupId>org.apache.tuscany.sca</groupId> <artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</artifactId> <bundleDir>/</bundleDir> - </jarModule> + </ejbModule> <webModule> <groupId>org.apache.tuscany.sca</groupId> <artifactId>itest-contribution-jee-samples-1-war-nonenhanced</artifactId> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/application.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/application.xml deleted file mode 100644 index ccbc1a0f12..0000000000 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/application.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5"> - <description>simple-app ear</description> - <display-name>simple-app ear</display-name> - <module> - <ejb>ejb-nonenhanced.jar</ejb> - </module> - <module> - <web> - <web-uri>war-nonenhanced.war</web-uri> - <context-root>/webroot</context-root> - </web> - </module> -</application> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/geronimo-application.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/geronimo-application.xml deleted file mode 100644 index 7e4cfb3577..0000000000 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-nonenhanced/src/main/resources/META-INF/geronimo-application.xml +++ /dev/null @@ -1,32 +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. ---> - -<!-- $Rev$ $Date$ --> - -<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2"> - <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.2"> - <moduleId> - <groupId>test</groupId> - <artifactId>simple-app</artifactId> - <version>1.0</version> - <type>ear</type> - </moduleId> - </environment> -</application> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml index 8871518c38..74034924d3 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/pom.xml @@ -29,6 +29,7 @@ <artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</artifactId> <name>Apache Tuscany SCA iTest Contribution Java EE Samples 7</name> + <packaging>ejb</packaging> <dependencies> <dependency> @@ -51,14 +52,17 @@ <scope>provided</scope> </dependency> </dependencies> - + <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-war-plugin</artifactId> - </plugin> + <finalName>${artifactId}</finalName> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ejb-plugin</artifactId> + <configuration> + <ejbVersion>3.0</ejbVersion> + </configuration> + </plugin> </plugins> - <finalName>${artifactId}</finalName> </build> </project> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml index ee4321c867..7428735903 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-nonenhanced/src/main/resources/META-INF/openejb-jar.xml @@ -12,7 +12,7 @@ * * 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 + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY"src/main/resources/META-INF/application.xml" * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. @@ -21,7 +21,7 @@ <dep:environment> <dep:moduleId> <dep:groupId>test</dep:groupId> - <dep:artifactId>helloworld-ejb</dep:artifactId> + <dep:artifactId>itest-contribution-jee-samples-7-ejb-nonenhanced</dep:artifactId> <dep:version>1.0</dep:version> <dep:type>jar</dep:type> </dep:moduleId> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml index da819e3c59..68563a0233 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/pom.xml @@ -43,6 +43,9 @@ <module>war-appcomp-contrib-implicit</module> <module>ejb-nonenhanced</module> <module>ear-nonenhanced</module> + <module>ear-appcomp-contrib-implicit</module> + <module>scajar-ear-nonenhanced</module> + <module>scajar-ear-appcomp</module> </modules> </profile> </profiles> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml new file mode 100644 index 0000000000..306b27fd5c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/pom.xml @@ -0,0 +1,72 @@ +<?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>tuscany-sca</artifactId> + <version>1.6-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + <artifactId>itest-contribution-jee-samples-41-scajar-ear-appcomp</artifactId> + <name>Apache Tuscany SCA iTest Contribution Java EE Samples 41</name> + + <repositories> + <repository> + <id>apache.incubator</id> + <url>http://people.apache.org/repo/m2-incubating-repository</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>1.6-SNAPSHOT</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.6-SNAPSHOT</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-ejb_3.0_spec</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.5</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + </build> +</project> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java new file mode 100644 index 0000000000..0194d1870c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/ejb3/HelloworldService.java @@ -0,0 +1,33 @@ +/* + * 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 sample.ejb3; + +import javax.ejb.Remote; + +/** + * HelloworldService EJB interface. + * + * @version $Rev$ $Date$ + */ + +@Remote +public interface HelloworldService { + String getGreetings(String name); +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient.java new file mode 100644 index 0000000000..6f37c9b272 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClient.java @@ -0,0 +1,25 @@ +/* + * 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 sample.pojo; + +public interface HelloworldClient { + + String getGreetings(String name); + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java new file mode 100644 index 0000000000..a38c4a773f --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/java/sample/pojo/HelloworldClientImpl.java @@ -0,0 +1,34 @@ +/* + * 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 sample.pojo; + +import org.osoa.sca.annotations.Reference; + +import sample.ejb3.HelloworldService; + +public class HelloworldClientImpl implements HelloworldClient { + + @Reference + protected HelloworldService hwService; + + public String getGreetings(String name){ + return hwService.getGreetings(name); + } + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..c847c24c57 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-appcomp/src/main/resources/helloworld.composite @@ -0,0 +1,34 @@ +<?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://sample" + xmlns:sample="http://sample" + name="Calculator"> + + <component name="HelloworlClientComponent"> + <implementation.java class="sample.pojo.HelloworldClientImpl"/> + <reference name="hwService" target="HelloworlderviceComponent" /> + </component> + + <component name="HelloworldServiceComponent"> + <implementation.jee archive="itest-contribution-jee-samples-29-ear-appcomp-contrib-implicit.ear"/> + </component> + +</composite> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml new file mode 100644 index 0000000000..d13e11262c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/pom.xml @@ -0,0 +1,72 @@ +<?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>tuscany-sca</artifactId> + <version>1.6-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + <artifactId>itest-contribution-jee-samples-35-scajar-ear-nonenhanced</artifactId> + <name>Apache Tuscany SCA iTest Contribution Java EE Samples 35</name> + + <repositories> + <repository> + <id>apache.incubator</id> + <url>http://people.apache.org/repo/m2-incubating-repository</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-sca-api</artifactId> + <version>1.6-SNAPSHOT</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.apache.tuscany.sca</groupId> + <artifactId>tuscany-implementation-java-runtime</artifactId> + <version>1.6-SNAPSHOT</version> + <scope>runtime</scope> + </dependency> + + <dependency> + <groupId>org.apache.geronimo.specs</groupId> + <artifactId>geronimo-ejb_3.0_spec</artifactId> + <version>1.0</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.5</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <finalName>${artifactId}</finalName> + </build> +</project> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java new file mode 100644 index 0000000000..0194d1870c --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/ejb3/HelloworldService.java @@ -0,0 +1,33 @@ +/* + * 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 sample.ejb3; + +import javax.ejb.Remote; + +/** + * HelloworldService EJB interface. + * + * @version $Rev$ $Date$ + */ + +@Remote +public interface HelloworldService { + String getGreetings(String name); +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java new file mode 100644 index 0000000000..6f37c9b272 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClient.java @@ -0,0 +1,25 @@ +/* + * 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 sample.pojo; + +public interface HelloworldClient { + + String getGreetings(String name); + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java new file mode 100644 index 0000000000..a38c4a773f --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/java/sample/pojo/HelloworldClientImpl.java @@ -0,0 +1,34 @@ +/* + * 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 sample.pojo; + +import org.osoa.sca.annotations.Reference; + +import sample.ejb3.HelloworldService; + +public class HelloworldClientImpl implements HelloworldClient { + + @Reference + protected HelloworldService hwService; + + public String getGreetings(String name){ + return hwService.getGreetings(name); + } + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite new file mode 100644 index 0000000000..068b92dab8 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/scajar-ear-nonenhanced/src/main/resources/helloworld.composite @@ -0,0 +1,34 @@ +<?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://sample" + xmlns:sample="http://sample" + name="Calculator"> + + <component name="HelloworlClientComponent"> + <implementation.java class="sample.pojo.HelloworldClientImpl"/> + <reference name="hwService" target="HelloworlderviceComponent" /> + </component> + + <component name="HelloworldServiceComponent"> + <implementation.jee archive="itest-contribution-jee-samples-13-ear-nonenhanced.ear"/> + </component> + +</composite> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java b/branches/sca-java-1.x/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java index ae8613f8db..71055bbdfe 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/war-nonenhanced/src/main/java/sample/HelloworldEjbServlet.java @@ -41,14 +41,11 @@ public class HelloworldEjbServlet extends HttpServlet { @EJB private HelloworldService service; - @Reference - protected HelloworldService helloworldSca; - @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException { String name = request.getParameter("name"); String greeting = service.getGreetings(name); - String greeting2 = helloworldSca.getGreetings(name.toUpperCase()); + //String greeting2 = helloworldSca.getGreetings(name.toUpperCase()); Writer out = response.getWriter(); out.write("<html><head><title>Apache Tuscany Helloworld Web Sample</title></head><body>"); @@ -58,7 +55,7 @@ public class HelloworldEjbServlet extends HttpServlet { out.write(greeting); out.write("The following is got by invoking the HelloworldService SCA service provided by the HelloworldServiceBean"); out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name.toUpperCase()); - out.write(greeting2); + //out.write(greeting2); out.write("</body></html>"); out.flush(); out.close(); |