geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r738116 - in /geronimo/plugins/tuscany/trunk/samples: helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite helloworld-web/src/main/java/sample/HelloworldEjbServlet.java helloworld-web/src/main/webapp/WEB-INF/web.composite
Date Tue, 27 Jan 2009 15:56:17 GMT
Author: vamsic007
Date: Tue Jan 27 15:56:16 2009
New Revision: 738116

URL: http://svn.apache.org/viewvc?rev=738116&view=rev
Log:
Updated the sample to invoke HelloworldService as an SCA service as well.

Modified:
    geronimo/plugins/tuscany/trunk/samples/helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite
    geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/java/sample/HelloworldEjbServlet.java
    geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/webapp/WEB-INF/web.composite

Modified: geronimo/plugins/tuscany/trunk/samples/helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite?rev=738116&r1=738115&r2=738116&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite
(original)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-ejb/src/main/resources/META-INF/ejb-jar.composite
Tue Jan 27 15:56:16 2009
@@ -28,6 +28,11 @@
     <component name="helloworldEjbComponent">
         <implementation.ejb ejb-link="HelloworldServiceBean"/>
 
+        <service name="HelloworldService">
+            <interface.java interface="sample.ejb3.HelloworldService"/>
+            <binding.sca/>
+        </service>
+
         <reference name="service0" target="HelloworldComponent" />
         <reference name="service1" target="HelloworldComponent" />
         <reference name="service2" target="HelloworldTeluguComponent" />

Modified: geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/java/sample/HelloworldEjbServlet.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/java/sample/HelloworldEjbServlet.java?rev=738116&r1=738115&r2=738116&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/java/sample/HelloworldEjbServlet.java
(original)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/java/sample/HelloworldEjbServlet.java
Tue Jan 27 15:56:16 2009
@@ -26,6 +26,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.osoa.sca.annotations.Reference;
+
 import sample.ejb3.HelloworldService;
 
 /**
@@ -39,10 +41,14 @@
 	@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());
 
         Writer out = response.getWriter();
         out.write("<html><head><title>Apache Tuscany Helloworld Web Sample</title></head><body>");
@@ -50,6 +56,9 @@
         out.write("This page displays the response got from HelloworldServiceBean, which
is a Stateless EJB.");
         out.write("<br>Parameter sent to HelloworldService.getGreeting: "+name);
         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("</body></html>");
         out.flush();
         out.close();

Modified: geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/webapp/WEB-INF/web.composite
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/webapp/WEB-INF/web.composite?rev=738116&r1=738115&r2=738116&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/webapp/WEB-INF/web.composite
(original)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-web/src/main/webapp/WEB-INF/web.composite
Tue Jan 27 15:56:16 2009
@@ -24,6 +24,7 @@
 
     <component name="helloworldWebComponent">
         <implementation.web web-uri="helloworld-web.war"/>
+        <reference name="helloworldSca" target="helloworldEjbComponent/HelloworldService"/>
     </component>
 </composite>
 



Mime
View raw message