I've attached a patch, which seems to work for me. What do you think?
Jon
On 10/01/2011 22:22, Jonathan Gallimore wrote:
I had a quick look at this - looks like the Pojo webservice isn't
deployed at all. Line 280 of WsSerrvice does this:
WebContext webContext = containerSystem.getWebContext(webApp.moduleId);
if (webContext == null) return;
Unfortunately, the webcontext hasn't been pushed with
containerSystem.addWebDeployment() at this point - its invoked by
Assembler.createApplication(), which in turn is called by
TomcatWebAppBuilder.start(), line 311. The web deployment is updated
in the container system later in this method (line 347).
Looks like this used to be done by TomcatWebAppBuilder.afterStart().
Perhaps we could defer the
Assembler.fireAfterApplicationCreated(appInfo) call to
TomcatWebAppBuilder.afterStart when we're running in Tomcat? What do
you think?
Jon
On 10/01/2011 13:23, Jonathan Gallimore wrote:
Jean-Louis,
Thanks for getting that in. I'll have a go with it this evening. If
you can look at the webservice stuff that would be great - my guess
is its something in TomcatWebAppBuilder or TomcatWsRegistry, but I
imagine you'll be able to figure it out quicker than I can!
Cheers
Jon
On 10/01/2011 13:08, Jean-Louis MONTEIRO wrote:
Jon,
All committed!
If you want, i can try looking at WebService stuff?
BTW, i tested under Tomcat 6.0.24
Jean-Louis
Index:
openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWebAppBuilder.java
===================================================================
---
openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWebAppBuilder.java
(revision 1057189)
+++
openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWebAppBuilder.java
(working copy)
@@ -422,6 +422,9 @@
}
OpenEJBValve openejbValve = new OpenEJBValve();
standardContext.getPipeline().addValve(openejbValve);
+
+ Assembler a = getAssembler();
+ a.postApplicationCreated(contextInfo.appInfo);
}
private static boolean isIgnored(StandardContext standardContext) {
Index:
openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
===================================================================
---
openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
(revision 1057189)
+++
openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java
(working copy)
@@ -737,7 +737,11 @@
logger.info("createApplication.success", appInfo.path);
deployedApplications.put(appInfo.path, appInfo);
- fireAfterApplicationCreated(appInfo);
+
+ // we'll fire this another way if we're running in Tomcat
+ if (!
"tomcat-system".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.loader")))
{
+ fireAfterApplicationCreated(appInfo);
+ }
appContext.getDeployments().addAll(allDeployments);
@@ -1552,4 +1556,10 @@
}
}
+ public void postApplicationCreated(AppInfo appInfo) {
+ if
("tomcat-system".equalsIgnoreCase(SystemInstance.get().getProperty("openejb.loader")))
{
+ fireAfterApplicationCreated(appInfo);
+ }
+ }
+
}