• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

cant i look up datasource connection using environment variables

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as i said in my previous post we are migrating from oracle app server to jboss4.0.3;

in the existing beans(EJB) we used to look up for datasource connection ctx.lookUp("java:comp/env/jdbc/DB");

when i deploy existing ejb's in jboss i am getting NamingnotFound Exception when i look up datasource connection;but when i look up like this ctx.lookUp("java:jdbc/DB");i am getting database connection.

in oracle-ds.xml i mentioned JNDI name as jdbc/DB;

in jboss.xml also i metioned <res-ref-name>jdbc/DB</res-ref-name>
<resource-name>jdbc/DB</resource-name>

in all our existing beans we used look up ctx.lookUp("java:comp/env/jdbc/DB") like this;

should i change all beans to like this ctx.lookUp("java:jdbc/DB");
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic