[jboss-user] [JNDI/Naming/Network] - Why java:comp/env/jdbc/DataSource does not work?

EugeneT do-not-reply at jboss.com
Sun Nov 23 19:04:31 EST 2008


Sorry, very stupid question.

When I describe my database as simple word, like:


  <local-tx-datasource>
    <jndi-name>DataSource</jndi-name>

all works fine as ctx.lookup("java:DataSource");

but in other application servers (for ex. Weblogic) my DataSource resource achieved thru ctx.lookup("java:comp/env/jdbc/DataSource")

so, I want compatibility and if I describe my database like

    <jndi-name>comp/env/jdbc/DataSource</jndi-name>

I see in logs that it mapped to java:comp/env/jdbc/DataSource
but trying to lookup as "java:comp/env/jdbc/DataSource" was failed with exception.

How I can force JBoss AS to lookup java:comp/env/jdbc/DataSource resource?


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

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



More information about the jboss-user mailing list