-
1. Re: Datasource JNDI name mapping
jessstock Aug 21, 2003 12:49 PM (in response to firsttimer)I have the same question. Some one please answer!
-
2. Re: Datasource JNDI name mapping
mindschreck Aug 23, 2003 1:08 PM (in response to firsttimer)Greetings,
I think I had the same issue, but correct me if I'm wrong. You want the JNDI datasource to not be in the java: namespace so that you can access it externally? If that's your question, then I have two answers:
1.) You cannot move those datasources outside of java:, meaning they have to be used by JBoss components residing in JBoss' JVM.
2.) You CAN move them externally by creating some sort of proxy objects with public remote interfaces that return datasource objects.
That seems to be the picture I have gotten from others.
Hope that helps!
Cheers,
Jason -
3. Re: Datasource JNDI name mapping
jessstock Aug 25, 2003 10:26 AM (in response to firsttimer)Thanks for the info.
Let me try and reword the question. I want to be able to map the JNDI name to "datasouce" with out the java:/. Then when I do a lookup in code, I don't have to have the java:/ in front of the data source name. WebLogic allows you to map the JNDI name to anything you wish. Thanks -
4. Re: Datasource JNDI name mapping
tad_shimada Jan 5, 2004 9:14 PM (in response to firsttimer)Hi,
Has anyone figured this out yet? Basically, I have the same question. I have the app that needs to be deployed into JBoss and WebLogic. For JBoss, I would have to look up the datasource using "java:/myDS". Any way to work around this so that I can just look it up by using "myDS" in my code? Or better yet, any way to look it up using "java:comp/env/myDS" in JBoss?
Thanks in advance,
TS -
5. Re: Datasource JNDI name mapping
nsdeonia Jan 6, 2004 11:26 AM (in response to firsttimer)Hi
If you use "java:comp/env/jdbc/myDS" for look up to datasource from a session bean
add following to your tag in ejb-jar.xml
<resource-ref>
<res-ref-name>jdbc/myDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and following to tag in jboss.xml
<resource-ref>
<res-ref-name>jdbc/myDS</res-ref-name>
<jndi-name>java:/YourDBPoolJNDIName</jndi-name>
</resource-ref>
I hope this will solve your problem.
regards
Narinder. -
6. Re: Datasource JNDI name mapping
milowe Jan 8, 2004 8:32 AM (in response to firsttimer)Using same JNDI in JBoss and Weblogic
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=39684