Hi,

Thank you for bringing this up. IMO, it's all about how to create a NodeConfiguration from web.xml (ServletContext) with some reasonable defaults.

It was me who made the changes as part of the NodeConfiguration work. Let me explain how it works.

1) We first check if there is a init parameter named "node.configuration" whose value is the uri to the XML configuration of the node. It can be relative to the root of the webapp or an absolute URL (potentially a live URL connecting to the SCA domain controller).

2) If 1) is not present, then we look for init parameters whose name starts with "contribution." . They are used to configure SCA contributions. The location can be relative to the root of the webapp or an absolute URL. (It seems that init parameters cannot have the same name and I use the "contribution." prefix to allow multiple occurrences.)

If no contribution is not defined, then it defaults to "/WEB-INF/classes" (I'm open to use the root of the webapp if it makes more sense. I initially chose /WEB-INF/classes so that URIs of the artifacts are relative to the root of the classpath).

3) If "/WEB-INF/web.composite" is present, then it will be used as the deployable composite. Otherwise, the META-INF/sca-contributions.xml should be present.

4) It also looks for "node.uri" and "domain.uri" to configure the URI of the node and URI of the domain. The node URI is default to the context path of the web app.

An example for the web.xml.

<context-param>
   <param-name>node.configuration</param-name>
   <param-value>WEB-INF/node.xml</<param-value>
   ...
</context-param>

We could also use the <init-param> for the Tuscany filter or listener configuration.

It's important to point out that the contributions can live outside the WAR or inside the WAR (any locations, not necessarily on the classpath of the webapp).

Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Saturday, May 23, 2009 1:34 AM
To: <[email protected]>
Subject: 2.x webapp contributions

The host-webapp module recently change which part of a webapp is
considered the sca contribution when starting a Node. Previously the
entire contents of the webapp was included in the contribution, then
it changed to just /WEB-INF/classes, now i've changed it back again to
the entire webapp, but I'm still having problems with that in some
webapp scenarios.

So before working out which to fix, what do we think should be the
webapp contribution, everything or just some bits of the webapp? What
would get everything working for me would be everything except the
/WEB-INF directory plus everything in the webapp classloader excluding
the parent classloader, but i'm not sure how easy that would be to
implement.

...ant

Reply via email to