diff options
-rw-r--r-- | java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java | 12 | ||||
-rw-r--r-- | java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite | 4 |
2 files changed, 2 insertions, 14 deletions
diff --git a/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java b/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java index 7448308ca7..84f46ad4a0 100644 --- a/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java +++ b/java/sca/samples/helloworld-servlet/src/main/java/sample/HelloworldServlet.java @@ -21,7 +21,6 @@ package sample; 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 @@ public class HelloworldServlet extends HttpServlet { 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"); diff --git a/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite b/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite index 58055195d2..b863c16fab 100644 --- a/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite +++ b/java/sca/samples/helloworld-servlet/src/main/webapp/META-INF/sca-deployables/web.composite @@ -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>
|