axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jilles van Gurp" <>
Subject axis2: using jndi datasource/hibernate
Date Wed, 10 May 2006 06:51:16 GMT

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

View raw message