using JNDI when websphere is shutdown
I am trying to test my we based project.I have created main method and its call some db related classes.Now the db related classes uses JNDI , so when running the code i get exception
Can i use JNDI when websphere server is开发者_开发技巧 stopped?If now how can i go about it?i dont want to run entire flow, i want to test my functionality by calling classes from main method
You can use "Simple JNDI" for this. Gives you a simple file based JNDI environment well suited for non-EE applications, or in situations where you do not want to occupy the network port.
http://www.osjava.org/simple-jndi/
You cannot use WebSphere's JNDI facilities when the server is in quiescing mode (shutting down).
I suspect something is a bit off with the way that you're testing your application. To help you, you'll have to provide us with more information about your architecture. Is it a standard servlet-JSP based WebApp that you're testing? What does your "main method" look like?
Isaac
精彩评论