Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JBoss/WildFly
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Communication Patterns: A Guide for Developers and Architects
this week in the
Design and Architecture
forum!
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:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Liutauras Vilda
Sheriffs:
Jeanne Boyarsky
paul wheaton
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Tim Moores
Carey Brown
Mikalai Zaikin
Bartenders:
Lou Hamers
Piet Souris
Frits Walraven
Forum:
JBoss/WildFly
DataSource JNDI name
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Anyone know how you configure a DataSource so it can be looked up from an
EJB
in
java
:comp/env/ rather than directly from java:/ ?
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Jaikiran Pai
Sheriff
Posts: 10445
227
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
A resource-ref entry needs to be made in the ejb-jar.xml and the corresponding jboss.xml. Something like this:
ejb-jar.xml:
<resource-ref> <res-ref-name>someName/someOtherName</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref>
jboss.xml:
<resource-ref> <res-ref-name>someName/someOtherName</res-ref-name> <jndi-name>java:/theDatasourceJNDINameFromDSdotXml</jndi-name> </resource-ref>
The datasource will then be available to that EJB at java:comp/env/someName/someOtherName.
[
My Blog
] [
JavaRanch Journal
]
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ah - of course! Thanks Jaikiran.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
is a method in a class part of a transaction?
get datasource outside action class
COnnection from DriverManager and DataSource
Reg : How get the DatasourceName?
JAVA with AS/400
More...