I have included my oracle-service.xml. It registers a jndi name of "jdbc/memberzDB". code to access:
ctx = new InitialContext();
Context me = (Context) ctx.lookup("java:comp/env");
ds = (DataSource)ctx.lookup("jdbc/memberzDB");
Many Thanks Alan.
This works. The trick is the 2-step context lookup.
Otherwise the single lookup of :
"java:comp/env/jdbc/DataSource" always fails.
Are you able to get the data connection from the lookup datasource and use that connection to do database operations, like prepare statement, ? If so, could you post those examples of configuration files (*.xml) ?
I am suffering from the problem that I can't make use of the connection to do any database operations. It always says that the "connection handler is not currently associated with managedconnection".
I am sure that the connection is binded to the oracle server. Actually, it works in JBoss2.4.4, but when migrating to JBoss 3, it doesn't work. Any changes to the bean's code ?
Thanks in advance.