You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2008/08/01 10:02:17 UTC

svn commit: r681625 - in /tuscany/java/sca/samples/helloworld-servlet/src/main: java/sample/HelloworldServlet.java webapp/META-INF/sca-deployables/web.composite

Author: antelder
Date: Fri Aug  1 01:02:16 2008
New Revision: 681625

URL: http://svn.apache.org/viewvc?rev=681625&view=rev
Log:
correct typo in service name and remove init method as @Reference annottaion now works

Modified:
    tuscany/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java
    tuscany/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite

Modified: tuscany/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java?rev=681625&r1=681624&r2=681625&view=diff
==============================================================================
--- tuscany/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java (original)
+++ tuscany/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java Fri Aug  1 01:02:16 2008
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.io.Writer;
 
-import javax.servlet.ServletConfig;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -37,17 +36,6 @@
     protected HelloworldService helloworldService;
 
     @Override
-    public void init(ServletConfig config) {
-    	/*
-    	 * TODO: obviously Tuscany should be creating the service, either
-    	 * from the @Reference annotation or perhaps for non-SCA runtimes something like:
-    	 *    ComponentContext context = ComponentContext.getContext(config);
-    	 *    helloworldService = context.getService("helloworldService", HelloworldService.class);
-    	 */
-    	helloworldService = new HelloworldServiceImpl();
-    }
-	
-    @Override
     protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
 
     	String name = request.getParameter("name");

Modified: tuscany/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite?rev=681625&r1=681624&r2=681625&view=diff
==============================================================================
--- tuscany/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite (original)
+++ tuscany/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite Fri Aug  1 01:02:16 2008
@@ -23,10 +23,10 @@
 
     <component name="WebClient">
         <implementation.web web-uri=""/>
-        <reference name="helloworldService" target="HelloworldService"/>
+        <reference name="helloworldService" target="helloworldService"/>
     </component>
 
-    <component name="HelloworldService">
+    <component name="helloworldService">
         <implementation.java class="sample.HelloworldServiceImpl"/>
     </component>