If your db is Oracle, otn has exact code samples in the Java samples. Works great.
HTH, Elaine
Robert Bateman wrote:
I have a doc/lit based web service created by WSDL2Java that implements java.rmi.Remote.
In my code, I have been asked to remove my hard coding of how I access our Data Bases services and to load init parameters to look that information up.
I did a search of the list and found 1 thread from July of 2003 that talked about the getInitParameter() call. In that thread, the author appeared to implement ServiceLifecycle and get access to his context in the init() method.
2 questions:
1) Can I replace the reference to java.rmi.Remote in my code with javax.xml.rpc.server.ServiceLifecycle and use the init() method? I suspect not as my code is doc/lit, but I am no expert.
2) If I can't do the replacement, is the following code correct for accessing the init parameters?
HttpServlet servletContext = (HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET);
String strStaging = servletContaxt.getInitParameter( "MySQL_Staged_ACI"
);
I know that the MySQL_Staged_ACI parameter is defined correctly in my web.xml as I can load it's value from a JSP page and from a servlet I'm using as a reference template.
Thanks for your time!
Bob
-- <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~