File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI lookup in standalone jar file

 
paresh doshi
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
 
Scott Selikoff
author
Saloon Keeper
Posts: 3890
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the DataSource is setup as a resource (in the app or on the server) then yes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic