This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JDBC and the fly likes what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?" Watch "what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?" New topic
Author

what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?

jaffrin abdul salam
Greenhorn

Joined: Sep 16, 2005
Posts: 23
We obtain the datasoure via JNDI in production enviroment that is configured in application server. For dev environment we use DriverManagerDataSource from spring to obtain the datasource. My question is , I know we can use the same JNDI in dev environment too to obtain the datasource . I beleive that to get the datasource via JNDI in dev environment is heavy weight. Is there any other advantages ?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30392
    
150

The app server takes care of connection pooling and transaction management for you.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

Hi Jaffrin.
jaffrin abdul salam wrote: I beleive that to get the datasource via JNDI in dev environment is heavy weight.


Where is that believe based on? Do you have performance issues in your application caused by the connection lookup part?

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
jaffrin abdul salam
Greenhorn

Joined: Sep 16, 2005
Posts: 23
In development environment we use DriverManagerDataSource instead of JNDI. My question is why can't I use the same JNDI in dev environment instead of DriverManagerDataSource.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?