I use most of these libs with axis2 - except I use spring for the datasource. The way I do it is I only put the ServiceClass - referenced in service.xml - inside the aar. In this case, the aar uses a seperate classloader only for this case.

An aar provides good isolation and versioning for multiple services, and for those not using hibernate, spring etc, there is an advantage. The deployment and structure of an aar is IMHO simple that axis 1.x and in my experience its easier to explain. But I'd just stick with a plain old WEB-INF configuration when using libs that depend on the TCCL.

HTH,
Robert
http://www.braziloutsource.com/

On 5/10/06, Jilles van Gurp <[EMAIL PROTECTED]> wrote:
Hi,

I'm currently exploring axis2. I am developing a web service that includes a
few pojos that persist to a hibernate datalayer. Currently I am using the
tomcat db connection pool and I was wondering at what is the recommended
practice for configuring all this as a nice aar.

What I would prefer not to do is make any modifications to the axis2 web
application. However, currently I see no other way of doing this:
- I need to enable the hibernate listener somewhere, the axis2 web.xml seems
the only place to do that.
- I need to provide a context.xml with the jndi datasource: the axis2
META-INF directory seems the place to put it.
- hibernate libraries need to be available for the service container so I
need to add libraries to the WEB-INF/lib directory.
- the mysql jdbc driver needs to be available to tomcat, common/lib is the
place to put it

In other words I am putting files all over the place to achieve an extremely
simple use case (simple database connectivity).

Is there an alternative to this or do I need to break encapsulation here and
modify the container to deploy my web service? In practice this is what I do
for axis1: all my services come with a customized service container based on
the axis1 web application. Effectively my unit of deployment is a war file.
I see myself ending up doing exactly the same for axis2 now even though the
intention of the whole aar thing seems to be not to do that.

_________________________________________________________________
Talk with your online friends with MSN Messenger http://messenger.msn.nl/


Reply via email to