This content has been marked as final.
Show 3 replies
-
1. Re: Unable to get connectin form DB connection pool
jbossuser Jan 23, 2002 3:31 PM (in response to lakshminarasimhan)I don't think your problem is connection pool, but with JNDI. Do you notice the stack trace?
If you are not in an EJB within JBoss, you need to use an initial context factory. JBoss has a way of allowing you to use a properties file to specify the initial context properties, or you can pass them when creating the InitialContext. This is well documented. -
2. Re: Unable to get connectin form DB connection pool
sachin Jan 24, 2002 3:28 AM (in response to lakshminarasimhan)Hi,
I am using the following piece of code to connect. Try it out:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("DB JNDI NAME");
con = ds.getConnection();
Regards,
Sachin -
3. Re: Unable to get connectin form DB connection pool
tclouser Jan 24, 2002 4:12 PM (in response to lakshminarasimhan)This question has been answered here:
http://main.jboss.org/thread.jsp?forum=46&thread=7263
HTH,
TC