Where are you making the call from, if you are in a separate VM the datasource will not be available as it is only bound in the local JNDI registry on the server.
Thank you very much. I was making the connection from a program which was in different JVM. Then I used the same code in a servlet and deployed it in TOMCAT and it worked. (TOMCAT and JBoss in same JVM)
Thanks once again
Hi. I would appreciate it if anyone can answer the
1. Is there a way to access the data source from a
2. Why is it that I can access an EJB from another VM,
but I can't access a data source?
2. The ejb stuff is specifically designed for remote access through rmi (or possibly other means, but definitely remote access): thats more or less the purpose of the container, home and remote interfaces, etc. Despite Webligics wrapping connection factories in remotable DataSources, database connections are not designed to be remotable, and if you think about it, its not a very good idea (IMHO): from a purely practical standpoint you are adding an extra hop between vms in an already very slow process, and from an architectural standpoint you are mixing logical layers in your app.