You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/22 22:55:23 UTC
svn commit: r510668 - in /incubator/tuscany/java/sca/runtime/webapp:
webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/
webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/
webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/
Author: jboynes
Date: Thu Feb 22 13:55:22 2007
New Revision: 510668
URL: http://svn.apache.org/viewvc?view=rev&rev=510668
Log:
use correct componentId (without trailing /) to avoid assertion in ComponentManager
Modified:
incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/TuscanyContextListener.java
incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/TuscanyContextListenerTestCase.java
incubator/tuscany/java/sca/runtime/webapp/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java
Modified: incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/TuscanyContextListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/TuscanyContextListener.java?view=diff&rev=510668&r1=510667&r2=510668
==============================================================================
--- incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/TuscanyContextListener.java (original)
+++ incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/main/java/org/apache/tuscany/runtime/webapp/TuscanyContextListener.java Thu Feb 22 13:55:22 2007
@@ -60,7 +60,7 @@
WebappUtil utils = getUtils(servletContext);
try {
// FIXME work this out from the servlet context
- String defaultComposite = "http://locahost/sca/";
+ String defaultComposite = "http://locahost/sca";
URI compositeId = new URI(utils.getInitParameter(COMPOSITE_PARAM, defaultComposite));
URI componentId = new URI(utils.getInitParameter(COMPONENT_PARAM, "webapp"));
String scdlPath = utils.getInitParameter(APPLICATION_SCDL_PATH_PARAM, APPLICATION_SCDL_PATH_DEFAULT);
Modified: incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/TuscanyContextListenerTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/TuscanyContextListenerTestCase.java?view=diff&rev=510668&r1=510667&r2=510668
==============================================================================
--- incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/TuscanyContextListenerTestCase.java (original)
+++ incubator/tuscany/java/sca/runtime/webapp/webapp-api/src/test/java/org/apache/tuscany/runtime/webapp/TuscanyContextListenerTestCase.java Thu Feb 22 13:55:22 2007
@@ -47,6 +47,7 @@
private URL systemUrl;
private URL scdl;
private WebappUtil utils;
+ private String compositeId;
public void testInitializationUsingDefaults() throws Exception {
ServletContextEvent event = createMock(ServletContextEvent.class);
@@ -55,7 +56,7 @@
WebappRuntime runtime = createMock(WebappRuntime.class);
expect(utils.getBootClassLoader(cl)).andReturn(bootClassLoader);
- expect(utils.getInitParameter("tuscany.composite", "http://locahost/sca/")).andReturn("http://locahost/sca/");
+ expect(utils.getInitParameter("tuscany.composite", compositeId)).andReturn(compositeId);
expect(utils.getInitParameter("tuscany.component", contextName)).andReturn(contextName);
expect(utils.getInitParameter("tuscany.online", "true")).andReturn("true");
expect(utils.getInitParameter(APPLICATION_SCDL_PATH_PARAM, APPLICATION_SCDL_PATH_DEFAULT))
@@ -77,7 +78,7 @@
runtime.setHostClassLoader(cl);
runtime.setSystemScdl(systemUrl);
runtime.initialize();
- runtime.deploy(URI.create("http://locahost/sca/"), scdl, URI.create(contextName));
+ runtime.deploy(URI.create(compositeId), scdl, URI.create(contextName));
replay(runtime);
ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
@@ -107,5 +108,6 @@
systemUrl = new URL("file:/system.scdl");
scdl = new URL("file:/app.scdl");
contextName = "webapp";
+ compositeId = "http://locahost/sca";
}
}
Modified: incubator/tuscany/java/sca/runtime/webapp/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/webapp/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java?view=diff&rev=510668&r1=510667&r2=510668
==============================================================================
--- incubator/tuscany/java/sca/runtime/webapp/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java (original)
+++ incubator/tuscany/java/sca/runtime/webapp/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java Thu Feb 22 13:55:22 2007
@@ -132,6 +132,7 @@
component.start();
}
+ compositeId = URI.create(compositeId.toString()+'/');
componentId = compositeId.resolve(componentId);
Component component = getComponentManager().getComponent(componentId);
if (component == null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org