[jboss-user] [Datasource Configuration] - Re: Can't connect to global namespace datasource from servle

LostJBossIdeUser do-not-reply at jboss.com
Tue Nov 7 10:09:12 EST 2006


I'm not sure exactly how I solved it. But I have pasted for you the parts in my code which are different from my original post.

web.xml:
<resource-ref>
  | 	<res-ref-name>jdbc/MySqlDS</res-ref-name>
  | 	<jndi-name>jdbc/MySqlDS</jndi-name>
  | </resource-ref>

DS lookup:
Context ctx = new InitialContext();
  | this.dataSource = (DataSource) ctx.lookup("java:comp/env/jdbc/MySqlDS");

The rest of the files remain the same. Try it, and it should work. Good luck!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983787#3983787

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983787



More information about the jboss-user mailing list