Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
jaffrin abdul salam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The app server takes care of connection pooling and transaction management for you.
 
Jan Cumps
Bartender
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
jaffrin abdul salam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic