This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JDBC and the fly likes Setting up a DataSource outside an AS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Setting up a DataSource outside an AS" Watch "Setting up a DataSource outside an AS" New topic

Setting up a DataSource outside an AS

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3476

Hey all.
I have the following code to create a datasource outside a container :
(the following code is from a tutorial at developerWorks)

my question is :
What to specify in setDatabaseName( ) ?
is it the name of my created database (in my case, it is ToddDB) ?
the tutorial do the following :
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
It probably took you longer to write this post than it would have done just to try it... So, try it! :roll: What happened?
I agree. Here's the link:
subject: Setting up a DataSource outside an AS
Similar Threads
Need JNDI example
Creating a Datasource
Datasource JNDI Lookup in WSAD from standalone app
How to bind DataSource using context.bind. Connection pooling etc.
cannot lookup jndi if using following method