[jboss-user] [Beginners Corner] - Re: isolate a datasource ( not share for all web application

jaikiran do-not-reply at jboss.com
Tue Jun 2 10:23:43 EDT 2009


Datasources in jboss are by default bound to java: namespace. So if you want to just use this jndi name then your jsp would look like (let's assume the datasource jndi-name is abc):

  | Context ctx = new InitialContext();
  | ctx.lookup("java:abc");

If you want to bind the datasource in global jndi namespace (i.e. make it available outside the server JVM) then you can follow these steps http://www.jboss.org/community/wiki/HowCanIAccessADataSourceFromAClient

Once you have made available the datasource globally, you can access it without the java: namespace:


  | Context ctx = new InitialContext();
  | ctx.lookup("abc");



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

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



More information about the jboss-user mailing list