geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r721106 - in /geronimo/plugins/tuscany/trunk/samples/helloworld-servlet: pom.xml src/main/java/sample/HelloworldServlet.java
Date Thu, 27 Nov 2008 07:14:20 GMT
Author: vamsic007
Date: Wed Nov 26 23:14:19 2008
New Revision: 721106

URL: http://svn.apache.org/viewvc?rev=721106&view=rev
Log:
Init method is not required since we have dependency injection now.

Modified:
    geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/pom.xml
    geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java

Modified: geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/pom.xml?rev=721106&r1=721105&r2=721106&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/pom.xml (original)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/pom.xml Wed Nov 26 23:14:19
2008
@@ -44,24 +44,6 @@
             <artifactId>geronimo-servlet_2.5_spec</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>geronimo-kernel</artifactId>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.plugins</groupId>
-            <artifactId>geronimo-tuscany</artifactId>
-            <version>${version}</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.plugins</groupId>
-            <artifactId>geronimo-tuscany-implementation-web</artifactId>
-            <version>${version}</version>
-            <scope>provided</scope>
-        </dependency>
-
     </dependencies>
 
     <build>

Modified: geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java
URL: http://svn.apache.org/viewvc/geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java?rev=721106&r1=721105&r2=721106&view=diff
==============================================================================
--- geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java
(original)
+++ geronimo/plugins/tuscany/trunk/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java
Wed Nov 26 23:14:19 2008
@@ -21,12 +21,10 @@
 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;
 
-import org.apache.tuscany.sca.implementation.web.ComponentContextLocator;
 import org.osoa.sca.ComponentContext;
 import org.osoa.sca.annotations.ComponentName;
 import org.osoa.sca.annotations.Context;
@@ -107,21 +105,6 @@
     }
 
     @Override
-    public void init(ServletConfig config) {
-        if (service == null) {
-            System.out.println("service is initialized in init method.");
-            // TODO:The helloworldService reference will only be injected from the @Reference

-            // annotation in containers supporting SCA "deep" integration. In other 
-            // environments in can be looked up from the ComponentContext.
-            // for now do it this way:
-            ComponentContext componentContext = ComponentContextLocator.getComponentContext(config.getServletContext());
-            service = componentContext.getService(Helloworld.class, "service");
-        } else {
-            System.out.println("service is injected.");
-        }
-    }
-    
-    @Override
     protected void service(HttpServletRequest request, HttpServletResponse response) throws
IOException {
 
         String name = request.getParameter("name");



Mime
View raw message