File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 30506
    
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: 2499
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what are the all advantages of obtaning datasources via JNDI that is configured in J2ee server?