You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/07/14 19:51:18 UTC
svn commit: r421966 - in
/incubator/tuscany/java/samples/sca/recursive/helloworldweb/src:
main/resources/helloworldweb.composite main/resources/webapp.composite
main/webapp/HelloWorldWeb.jsp test/java/helloworld/HelloWorldTestCase.java
Author: jsdelfino
Date: Fri Jul 14 10:51:18 2006
New Revision: 421966
URL: http://svn.apache.org/viewvc?rev=421966&view=rev
Log:
Changed JSP to use composite context and renamed composite file
Added:
incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/webapp.composite
Removed:
incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/helloworldweb.composite
Modified:
incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/webapp/HelloWorldWeb.jsp
incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/test/java/helloworld/HelloWorldTestCase.java
Added: incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/webapp.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/webapp.composite?rev=421966&view=auto
==============================================================================
--- incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/webapp.composite (added)
+++ incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/resources/webapp.composite Fri Jul 14 10:51:18 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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.
+ -->
+<module xmlns="http://www.osoa.org/xmlns/sca/0.9" xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9"
+ name="helloworldweb">
+
+ <component name="HelloWorldServiceComponent">
+ <implementation.java class="helloworld.HelloWorldImpl"/>
+ </component>
+
+</module>
Modified: incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/webapp/HelloWorldWeb.jsp
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/webapp/HelloWorldWeb.jsp?rev=421966&r1=421965&r2=421966&view=diff
==============================================================================
--- incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/webapp/HelloWorldWeb.jsp (original)
+++ incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/main/webapp/HelloWorldWeb.jsp Fri Jul 14 10:51:18 2006
@@ -23,8 +23,8 @@
import="helloworld.HelloWorldService"
import="java.io.PrintWriter"
import="java.io.StringWriter"
- import="org.osoa.sca.CurrentModuleContext"
- import="org.osoa.sca.ModuleContext"
+ import="org.osoa.sca.CurrentCompositeContext"
+ import="org.osoa.sca.CompositeContext"
%>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
@@ -35,7 +35,7 @@
</HEAD>
<BODY>
-<H2>Tuscany HelloWorld Web Application Sample</H2>
+<H2>Tuscany HelloWorld Web Application Sample - uses the new assembly model</H2>
<P> </P>
@@ -50,8 +50,8 @@
<%
try {
if (null != name) {
- ModuleContext moduleContext = CurrentModuleContext.getContext();
- HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorldServiceComponent");
+ CompositeContext compositeContext = CurrentCompositeContext.getContext();
+ HelloWorldService helloworldService = compositeContext.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
String value = helloworldService.getGreetings(name);
%>
<HR>
Modified: incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/test/java/helloworld/HelloWorldTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/test/java/helloworld/HelloWorldTestCase.java?rev=421966&r1=421965&r2=421966&view=diff
==============================================================================
--- incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/test/java/helloworld/HelloWorldTestCase.java (original)
+++ incubator/tuscany/java/samples/sca/recursive/helloworldweb/src/test/java/helloworld/HelloWorldTestCase.java Fri Jul 14 10:51:18 2006
@@ -33,7 +33,7 @@
super.setUp();
// Create a Tuscany runtime
- tuscany = new TuscanyRuntime("HelloWorldWebSample", "helloworldweb");
+ tuscany = new TuscanyRuntime("HelloWorldWebSample", "webapp");
// Start the Tuscany runtime and associate it with this thread
tuscany.start();
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org