diff options
Diffstat (limited to 'branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src')
5 files changed, 160 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldService.java b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldService.java new file mode 100644 index 0000000000..73d816311f --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldService.java @@ -0,0 +1,31 @@ +/* + * 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. + */ + +@Remote +public interface HelloworldService { + String getGreetings(String name); +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldServiceBean.java b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldServiceBean.java new file mode 100644 index 0000000000..19879d9c42 --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/java/sample/ejb3/HelloworldServiceBean.java @@ -0,0 +1,40 @@ +/** + * 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.Stateless; + +import org.osoa.sca.annotations.ComponentName; + +/** + * HelloworldService EJB implementation with no SCA enhancement + + */ +@Stateless +public class HelloworldServiceBean implements HelloworldService { + + @ComponentName + protected String componentName; + + public String getGreetings(String name) { + String greeting = componentName+" says, Hello " + name; + System.out.println(greeting); + return greeting; + } + +} diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/ejb-jar.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/ejb-jar.composite new file mode 100644 index 0000000000..a6701d36cb --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/ejb-jar.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="itest-contribution-jee-samples-11">
+
+ <component name="HelloworldServiceEJBComponent">
+ <implementation.ejb ejb-link="HelloworldServiceBean"/>
+ <service name="HelloworldService">
+ <interface.java interface="sample.ejb3.HelloworldService"/>
+ <binding.sca/>
+ <!--binding.ws uri="http://alexander:8080/tuscany/HelloworldService11"/-->
+ </service>
+ </component>
+
+ <!--service name="TheService" promote="HelloworldServiceComponent/HelloworldService"/-->
+</composite>
diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/openejb-jar.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/openejb-jar.xml new file mode 100644 index 0000000000..13a375bc0b --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/openejb-jar.xml @@ -0,0 +1,32 @@ +<?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"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. +--> +<ejb:openejb-jar xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2" xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2"> + <dep:environment> + <dep:moduleId> + <dep:groupId>test</dep:groupId> + <dep:artifactId>itest-contribution-jee-samples-11-ejb-appcomp-contrib-explicit</dep:artifactId> + <dep:version>1.0</dep:version> + <dep:type>jar</dep:type> + </dep:moduleId> + <dep:dependencies/> + <dep:hidden-classes/> + <dep:non-overridable-classes/> + </dep:environment> +</ejb:openejb-jar> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/sca-contribution.xml b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..bc8fb5366d --- /dev/null +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-appcomp-contrib-explicit/src/main/resources/META-INF/sca-contribution.xml @@ -0,0 +1,22 @@ +<?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. +--> +<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" xmlns:sample="http://sample"> + <deployable composite="sample:Calculator" /> +</contribution>
\ No newline at end of file |