axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: JNDI in Axis
Date Thu, 30 Sep 2004 06:51:10 GMT

I'm still new to this myself but here's my take on it. Axis provides a 
servlet, which is deployed in an application, through which all HTTP 
request for a service go. From Tomcat's (or any other application 
server's) point of view, it's just another web application. If you have 
configuration for an old application, containing servlets that you are 
converting to Axis services, then that configuration needs to be 
duplicated in the Axis web application. You probably shouldn't be using 
absolute paths but paths relative to the application context.

So, Axis is just a servlet. Your services are just part of the servlet, as 
far as Tomcat is concerned.

I don't think Axis needs to provide any direct support for the 
technologies that Tomcat supports. With JNDI, for example, Axis isn't 
another layer, it's a normal servlet. It's a while since I used JNDI with 
a servlet but I seem to remember that I didn't have to do anything 
special, once I'd defined the JNDI entries in Tomcat's configuration for 
the application (probably in server.xml). Maybe you need to use the 
servlet context (retrieved from the current message context) in some way, 
but I'm not sure even that is necessary, just get the initial context and 
off you go; it shouldn't be any different to how it was done in the 
original servlet.

Of course, all of the above may be garbage, in which case, I hope someone 
corrects me. But I think it's a reasonable view of the situation.

By the way, it's always best to include more information, rather than 
less. Some of your questions seem to assume that everyone knows a lot 
about your individual application and set up. Try and be more explicit and 
include relevant bits of code or configuration files. For example, saying 
that you've "copied the paths", is not very informative; it would be 
helped by including the actual section of server.xml that you are 
referring to.


Does axis even support JNDI?  If so, how?  I've defined the info in my
server.xml and web.xml files, but my web service still can't find the db.


View raw message