and then your URL should read 'java:comp/env/jdbc/mySQLDB' - no slash
between 'java:' and 'comp'

-danch

Nguyen Thanh Phong wrote:
> 
> You have to configure the resource reference before you can use it.
> 
> Put this into your ejb-jar.xml
> 
>         <resource-ref>
>           <res-ref-name>jdbc/mySQLDB</res-ref-name>
>           <res-type>javax.sql.DataSource</res-type>
>           <res-auth>Container</res-auth>
>         </resource-ref>
> 
> Put this into your jboss.xml
> 
>       <resource-ref>
>         <res-ref-name>jdbc/mySQLDB</res-ref-name>
>         <resource-name>java:/mySQLDB</resource-name>
>       </resource-ref>
> 
> Nguyen Thanh Phong                           Tel: 84-8-837 25 06/837 25 07
> Saigon Software Development Company (SDC)    Fax: 84-8-837 25 11
> 10 Co Giang Street, Dist I, HCMC             Email:
> [EMAIL PROTECTED]
> Vietnam
> 
> ----- Original Message -----
> From: Jeff Holmes <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, April 26, 2001 8:07 AM
> Subject: [JBoss-user] Getting BMP JDBC Connection - HELP...
> 
> > I'm using the Enterprise Java Beans book from Oreilly to learn how to use
> > EJB's.  I am stuck right now.  I use mySQL and have succeded in creating a
> > CMP, but I anc not get a DB connection using the BMP.
> > (DataSource)jndiCntx.lookup("java:/comp/env/jdbc/mySQLDB");
Confidential e-mail for addressee only.  Access to this e-mail by anyone else is 
unauthorized.
If you have received this message in error, please notify the sender immediately by 
reply e-mail 
and destroy the original communication.


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

Reply via email to