wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Can I get a database pool with JNDI? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Can I get a database pool with JNDI?" Watch "Can I get a database pool with JNDI?" New topic
Author

Can I get a database pool with JNDI?

Jennifer Debroone
Greenhorn

Joined: Apr 28, 2010
Posts: 5
I want to get to the database through the database pool which is running on an application server. Can I use JNDI to do this from an application that does not run inside the application server? Or are the database pools only available for anything inside the application server? You know what I mean?

Thanks,

J.
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

Did you get an error when you tried? The answer is yes when the app server is running. Now whether this is recommended is another question

ram.

Ran Pleasant
Ranch Hand

Joined: Jan 16, 2003
Posts: 75
Jennifer Debroone wrote:I want to get to the database through the database pool which is running on an application server. Can I use JNDI to do this from an application that does not run inside the application server? Or are the database pools only available for anything inside the application server? You know what I mean?

Question: If you are wanting to hit an application server in order to get to a DataSource (connection pool) then why not just build a data service (EJB) on the application server and call the service rather than trying to get a JDBC connection? I'm not saying you should not do as you are planning, just that you should have a very good reason.


Ran
Jennifer Debroone
Greenhorn

Joined: Apr 28, 2010
Posts: 5
Ran Pleasant wrote:
Jennifer Debroone wrote:I want to get to the database through the database pool which is running on an application server. Can I use JNDI to do this from an application that does not run inside the application server? Or are the database pools only available for anything inside the application server? You know what I mean?

Question: If you are wanting to hit an application server in order to get to a DataSource (connection pool) then why not just build a data service (EJB) on the application server and call the service rather than trying to get a JDBC connection? I'm not saying you should not do as you are planning, just that you should have a very good reason.


ya, good idea, thanks for the answer !
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can I get a database pool with JNDI?
 
Similar Threads
Can I connect to database at runtime from WSAD5.0?
Attn : Kyle - JTA Enabling in WAS 4.0.2(Urgent)
How to open a connection pool to a database?
Connection Pool
Externally specified environment