Hello all,
I have a 2-fold question in which I cannot find any information on from the docs, archives, google, etc. Any help would be greatly appreciated.


What is the correct way to set up a JDBC resource from my Axis Web Service? It seems that the Axis Service is itself a Servlet, so I do not understand where my init() function that would do the JDBC resource connection would go. For example, I want to do this in my Web Service:

  Context init = new InitialContext();
  dataSource = (DataSource)init.lookup( "java:comp/env/jdbc/mysql");

I have this working in a function called getDB() within the Web Service but I don't understand how it recognizes the Context it is in because I do not have a WEB-INF/web.xml file that would normally define the resource such as :

<resource-ref>
     <description>DB Connection</description>
     <res-ref-name>jdbc/mysql</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <res-auth>Container</res-auth>
</resource-ref>

Does Axis know of the application specific WEB-INF/web.xml ? I have set up Data Sources correcty when useing the JWS SDK and within that I needed a resource identified correctly in my application specific WEB-INF/web.xml , but Axis seems to not even care about that file.

_________________________________________________________________
Check out the new MSN 9 Dial-up — fast & reliable Internet access with prime features! http://join.msn.com/?pgmarket=en-us&page=dialup/home&ST=1




Reply via email to