Thanks, Dan. I switched to jndi and everything works fine. The new code 
looks like:

InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:/DBPool");
Connection conn = ds.getConnection();
// do the db work.

Kobi


>From: "danch (Dan Christopherson)" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: [JBoss-user] Problem with stateless session bean BMP on 
>Postgresql 7.1.1, JBoss 2.2.1
>Date: Tue, 29 May 2001 11:15:46 -0500
>
>Kobi Schecider wrote:
>
>
>>            conn = DriverManager.getConnection(
>>                    "jdbc:postgresql://myhost/mydb", "id", "pwd");
>
>
>don't do that! Get the connection by looking up a DataSource from JNDI.
>There are a lot of examples of how to do this out on the web and in print.
>
><< InterScan_Disclaimer.txt >>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to