This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2543
    
  10

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
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.
 
Have you checked out Aspose?
 
subject: what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?
 
It's not a secret anymore!