This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes JBOSS connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JBOSS connection pooling" Watch "JBOSS connection pooling" New topic

JBOSS connection pooling

Mike Blair

Joined: Sep 10, 2003
Posts: 19
I am trying to get a simple session bean to access my oracle DB. I can't figure out what all needs to be setup for the JBOSS connection pooling. My java code looks as follows:
DataSource dataSource = (DataSource) (new InitialContext()).lookup( "java:comp/env/jdbc/REGENT" );
Connection con = dataSource.getConnection();
Statement stmt = con.createStatement();
I have this wrapped in a try-catch and the error being returned is "JDBC not bound".
I guess my issue is not knowing what all xml files need setup for jndi to work properly. Here is what I think :
add to web.xml
<description>Regent Datasource</description>
<res-type> javax.sql.DataSource</res-type>
add to ejb-jar.xml
any thing else?
I agree. Here's the link:
subject: JBOSS connection pooling
Similar Threads
Error confguring multiple contexts/data sources in Tomcat 5
help with Jboss datasource lookup with springs
Query in : JNDI look up of DataSource
Transaction EJB session bean
How do I implement Connection Pooling with Tomcat and MySQL 4.1