This week's book giveaway is in the
We're giving away four copies of
and have Sam Newman on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
JDBC and Relational Databases
JNDI lookup in standalone jar file
Joined: Nov 20, 2006
Jan 06, 2010 00:38:50
I have a standalone jar file which makes a DB connection. Can i use JNDI lookup for connection as we do in web applications ?
If we can use can anyone provide the sample code. Also provide information on how to setup the jndi name.
Thanks in Advance
Thanks.<br />Paresh Doshi<br />SCJP 1.4
Joined: Oct 23, 2005
Jan 06, 2010 06:50:30
If the DataSource is setup as a resource (in the app or on the server) then yes.
[OCA 8 Book]
I agree. Here's the link:
subject: JNDI lookup in standalone jar file
Binding DataSource with JBoss
RMH J2EE WS page 339
question about ejb-ref and jndi .. HELP!!
Remove dependency for sas.client.props
DataSource ? : can you use outside of an appserver?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015