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
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
paul wheaton
Ron McLeod
Devaka Cooray
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Paul Clapham
Saloon Keepers:
Tim Holloway
Carey Brown
Piet Souris
Bartenders:
Forum:
JBoss/WildFly
DataSource JNDI name
Paul Sturrock
Bartender
Posts: 10336
I like...
posted 17 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 17 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 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ah - of course! Thanks Jaikiran.
JavaRanch FAQ
HowToAskQuestionsOnJavaRanch
Don't get me started about those stupid
light bulbs
.
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...