geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r833101 - in /geronimo/plugins/tuscany/trunk/samples: helloworld-rewire-ejb/ helloworld-rewire-ejb/src/ helloworld-rewire-ejb/src/main/ helloworld-rewire-ejb/src/main/java/ helloworld-rewire-ejb/src/main/java/sample/ helloworld-rewire-ejb/s...
Date Thu, 05 Nov 2009 17:51:25 GMT
Author: vamsic007
Date: Thu Nov  5 17:51:24 2009
New Revision: 833101

URL: http://svn.apache.org/viewvc?rev=833101&view=rev
Log:
Sample applications to demonstrate rewiring of EJB references and env entries in EJBs using
SCA

Added:
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml   (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.composite
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml   (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
  (with props)
    geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
  (with props)

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml Thu Nov  5 17:51:24
2009
@@ -0,0 +1,54 @@
+<?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.geronimo.plugins</groupId>
+        <artifactId>tuscany-samples</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>helloworld-rewire-ejb</artifactId>
+    <name>Geronimo Plugins :: Helloworld Rewire EJB Sample</name>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+       <finalName>${artifactId}</finalName>
+    </build>
+</project>

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,99 @@
+/**
+ *  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.annotation.Resource;
+import javax.ejb.EJB;
+import javax.ejb.Stateless;
+
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.annotations.ComponentName;
+import org.osoa.sca.annotations.Context;
+import org.osoa.sca.annotations.Property;
+import org.osoa.sca.annotations.Reference;
+
+/**
+ * HelloworldRewireService EJB implementation that accesses HelloworldService SCA and EJB
services
+ */
+@Stateless
+public class HelloworldRewireBean implements HelloworldRewireService {
+    @EJB
+    protected HelloworldService service;
+    
+    @Reference
+    protected HelloworldService scaService;
+    
+    @EJB
+    protected HelloworldService ejbService;
+
+    @Property
+    protected String scaProperty;
+    
+    @Resource(name="envEntry1")
+    protected String envEntry1;
+
+    @Resource(name="envEntry2")
+    protected String envEntry2;
+
+    @Resource(name="a/b/envEntry3")
+    protected String envEntry3;
+            
+    @Resource(name="a/b/envEntry4")
+    protected java.lang.Integer envEntry4;
+            
+    @ComponentName
+    protected String scaComponentName;
+
+    @Context
+    protected ComponentContext componentContext;
+    
+    public String getGreetings(String name) {
+        System.out.println(scaComponentName+": HelloworldRewireBean.getGreetings: "+name);
+        return prepareResponse(name);
+    }
+    
+    private String prepareResponse(String name) {
+        StringBuffer sb = new StringBuffer();
+        String greeting = service.getGreetings(name);
+        String scaGreeting = scaService.getGreetings(name);
+        String ejbGreeting = ejbService.getGreetings(name);
+        
+        sb.append("");
+        sb.append("<br><br>EJB :: HelloworldService.getGreeting: "+name);
+        sb.append("<br>"+greeting);
+        sb.append("<br><br>SCA :: HelloworldService.getGreeting: "+name);
+        sb.append("<br>"+scaGreeting);
+        sb.append("<br><br>EJB rewired using SCA :: HelloworldService.getGreeting:
"+name);
+        sb.append("<br>"+ejbGreeting);
+        sb.append("<hr>");
+        
+        sb.append("<br>SCA Property");
+        sb.append("<br>"+scaProperty);
+        sb.append("<br><br>Env Entry1");
+        sb.append("<br>"+envEntry1);
+        sb.append("<br><br>Env Entry2");
+        sb.append("<br>"+envEntry2);
+        sb.append("<br><br>Env Entry3");
+        sb.append("<br>"+envEntry3);
+        sb.append("<br><br>Env Entry4");
+        sb.append("<br>"+envEntry4);
+        sb.append("<hr>");
+
+        return sb.toString();
+    }
+}

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireBean.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
Thu Nov  5 17:51:24 2009
@@ -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;
+
+/**
+ * HelloworldRewireService EJB interface.
+ */
+
+@Remote
+public interface HelloworldRewireService {
+	String getGreetings(String name);
+}

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
Thu Nov  5 17:51:24 2009
@@ -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);
+}

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/java/sample/ejb3/HelloworldService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.composite
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.composite?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.composite
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.composite
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,38 @@
+<?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:xsd="http://www.w3.org/2001/XMLSchema"
+           name="helloworld-rewire-ejb">
+    <component name="helloworldRewireEjbComponent">
+        <implementation.ejb ejb-link="HelloworldRewireBean"/>
+        <service name="HelloworldRewireService">
+            <interface.java interface="sample.ejb3.HelloworldRewireService"/>
+            <binding.sca/>
+        </service>
+
+        <reference name="scaService" target="HelloworldServiceComponent"/>
+        <reference name="sample.ejb3.HelloworldRewireBean_ejbService" target="HelloworldServiceComponent"/>
+        <property name="scaProperty">SCA property1</property>
+        <property name="envEntry2">value configured through SCA property</property>
+        <property name="a_b_envEntry3">value configured through SCA property</property>
+    </component>
+</composite>
+

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+-->
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
+    <enterprise-beans>
+        <session>
+            <ejb-name>HelloworldRewireBean</ejb-name>
+            <env-entry>
+              <env-entry-name>envEntry1</env-entry-name>
+              <env-entry-value>env entry1 value configured in ejb-jar.xml</env-entry-value>
+              <env-entry-type>java.lang.String</env-entry-type>
+            </env-entry>
+            <env-entry>
+              <env-entry-name>envEntry2</env-entry-name>
+              <env-entry-value>env entry2 value configured in ejb-jar.xml</env-entry-value>
+              <env-entry-type>java.lang.String</env-entry-type>
+            </env-entry>
+            <env-entry>
+              <env-entry-name>a/b/envEntry3</env-entry-name>
+              <env-entry-value>env entry3 value configured in ejb-jar.xml</env-entry-value>
+              <env-entry-type>java.lang.String</env-entry-type>
+            </env-entry>
+            <env-entry>
+              <env-entry-name>a/b/envEntry4</env-entry-name>
+              <env-entry-value>12345</env-entry-value>
+              <env-entry-type>java.lang.Integer</env-entry-type>
+            </env-entry>
+        </session>
+    </enterprise-beans>
+</ejb-jar>
\ No newline at end of file

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/ejb-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,62 @@
+<?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.    
+-->
+<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>helloworld-rewire-ejb</dep:artifactId>
+            <dep:version>1.0</dep:version>
+            <dep:type>jar</dep:type>
+        </dep:moduleId>
+        <dep:dependencies>
+            <dep:dependency>
+                <dep:groupId>test</dep:groupId>
+                <dep:artifactId>helloworld-simple-ejb</dep:artifactId>
+                <dep:version>1.0</dep:version>
+                <dep:type>jar</dep:type>
+            </dep:dependency>
+        </dep:dependencies>
+        <dep:hidden-classes/>
+        <dep:non-overridable-classes/>
+    </dep:environment>
+    <ejb:enterprise-beans>
+        <ejb:session>
+            <ejb:ejb-name>HelloworldRewireBean</ejb:ejb-name>
+		    <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
+		        <nam:ref-name>service</nam:ref-name>
+		        <nam:pattern>
+		            <nam:groupId>test</nam:groupId>
+		            <nam:artifactId>helloworld-simple-ejb</nam:artifactId>
+		            <nam:version>1.0</nam:version>
+		            <nam:name>HelloworldServiceSimpleBean</nam:name>
+		        </nam:pattern>
+		    </nam:ejb-ref>
+		    <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
+		        <nam:ref-name>ejbService</nam:ref-name>
+		        <nam:pattern>
+		            <nam:groupId>test</nam:groupId>
+		            <nam:artifactId>helloworld-simple-ejb</nam:artifactId>
+		            <nam:version>1.0</nam:version>
+		            <nam:name>HelloworldServiceSimpleBean</nam:name>
+		        </nam:pattern>
+		    </nam:ejb-ref>
+        </ejb:session>
+    </ejb:enterprise-beans>
+</ejb:openejb-jar>

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-ejb/src/main/resources/META-INF/openejb-jar.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml (added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml Thu Nov  5 17:51:24
2009
@@ -0,0 +1,65 @@
+<?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.geronimo.plugins</groupId>
+        <artifactId>tuscany-samples</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>helloworld-rewire-servlet</artifactId>
+    <name>Geronimo Plugins :: Helloworld Rewire Servlet sample</name>
+    <packaging>war</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-sca-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-annotation_1.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.0_spec</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+            </plugin>
+        </plugins>
+        <finalName>${artifactId}</finalName>
+    </build>
+</project>

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,55 @@
+/*
+ * 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;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import javax.ejb.EJB;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import sample.ejb3.HelloworldRewireService;
+
+/**
+ * Servlet to demonstrate re-wiring of EJB references in EJBs through SCA.
+ */
+public class HelloworldServlet extends HttpServlet {
+    private static final long serialVersionUID = -4448818871934180718L;
+
+    @EJB
+    protected HelloworldRewireService service;
+    
+    @Override
+    protected void service(HttpServletRequest request, HttpServletResponse response) throws
IOException {
+        String name = request.getParameter("name");
+        String greeting = service.getGreetings(name);
+
+        Writer out = response.getWriter();
+        out.write("<html><head><title>Apache Tuscany Helloworld Rewire
Servlet Sample</title></head><body>");
+        out.write("<h2>Apache Tuscany Helloworld Rewire Servlet Sample</h2>");
+        out.write("This page displays the responses got from an EJB which has rewiring of
EJB references using SCA");
+        out.write("<br><br>EJB :: HelloworldRewireService.getGreeting: "+name);
+        out.write("<br><br>"+greeting);
+        out.write("</body></html>");
+        out.flush();
+        out.close();
+    }
+}

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/HelloworldServlet.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
Thu Nov  5 17:51:24 2009
@@ -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;
+
+/**
+ * HelloworldRewireService EJB interface.
+ */
+
+@Remote
+public interface HelloworldRewireService {
+	String getGreetings(String name);
+}

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/java/sample/ejb3/HelloworldRewireService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  * 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.    
+-->
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
+    <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
+        <dep:moduleId>
+            <dep:groupId>test</dep:groupId>
+            <dep:artifactId>helloworld-rewire-servlet</dep:artifactId>
+            <dep:version>1.0</dep:version>
+            <dep:type>war</dep:type>
+        </dep:moduleId>
+        <dep:dependencies>
+            <dep:dependency>
+                <dep:groupId>test</dep:groupId>
+                <dep:artifactId>helloworld-rewire-ejb</dep:artifactId>
+                <dep:version>1.0</dep:version>
+                <dep:type>jar</dep:type>
+            </dep:dependency>
+        </dep:dependencies>
+    </dep:environment>
+    <context-root>helloworld-rewire-servlet</context-root>
+    <nam:ejb-ref xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2">
+        <nam:ref-name>sample.HelloworldServlet/service</nam:ref-name>
+        <nam:pattern>
+            <nam:groupId>test</nam:groupId>
+            <nam:artifactId>helloworld-rewire-ejb</nam:artifactId>
+            <nam:version>1.0</nam:version>
+            <nam:name>HelloworldRewireBean</nam:name>
+        </nam:pattern>
+    </nam:ejb-ref>
+</web-app>
\ No newline at end of file

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/geronimo-web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  * 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.    
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
+Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+  <display-name>Helloworld Rewire Servlet Sample</display-name>
+
+  <servlet>
+     <servlet-name>HelloworldServlet</servlet-name>
+     <servlet-class>sample.HelloworldServlet</servlet-class>
+  </servlet>
+
+  <servlet-mapping>
+     <servlet-name>HelloworldServlet</servlet-name>
+     <url-pattern>/HelloworldServlet</url-pattern>
+  </servlet-mapping>
+
+  <welcome-file-list id="WelcomeFileList">
+    <welcome-file>hello.html</welcome-file>
+  </welcome-file-list>
+</web-app>

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html?rev=833101&view=auto
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
(added)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
Thu Nov  5 17:51:24 2009
@@ -0,0 +1,46 @@
+<!--
+ * 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.
+-->
+<html>
+
+<head>
+<title>Apache Tuscany Helloworld Rewire Servlet Sample</title>
+</head>
+
+<body>
+
+<h2>Apache Tuscany Helloworld Rewire Servlet Sample</h2>
+
+<form action="HelloworldServlet" method="post">
+    <table>
+        <tr>
+            <td>Enter your name:</td>
+            <td>
+                <input type="text" name="name" width="10">
+            </td>
+        </tr>
+        <tr>
+            <td align="left" colspan="2">
+                <button name="submit" type="submit">Say hello</button>
+            </td>
+        </tr>
+    </table>
+</form>
+
+</body>
+</html>

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/plugins/tuscany/trunk/samples/helloworld-rewire-servlet/src/main/webapp/hello.html
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message