[jboss-user] [JNDI/Naming/Network] - Re: Configuring JNDI Datasource (MySQL-5.1.36) in JBOSS 5.1.

jaikiran do-not-reply at jboss.com
Thu Aug 6 09:45:08 EDT 2009

The jndi name can be anything. You just have to remember that name so that you can use it while looking up your datasource in the code. 

So if jndiname is:


Then your code to lookup the datasource (within the server) will be:

  | Context ctx = new InitialContext();
  | DataSource ds = (DataSource) ctx.lookup("java:xyz");

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

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

More information about the jboss-user mailing list