Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Design on connecting to db

843859May 16 2007 — edited May 18 2007
Hi,

I am using SUN ONE application server as my web server and connection pooling has been configured.

I am wondering what is the best design to connect to database ( consider about the memory). From my reseach over the Internet. I saw a lot of ppls are using lookup of JNDI and storing the connection in datasource in the main entrance. Then they pass the datasource to different class which need connection. Some of them do the lookup JNDI and store in data source when each single sql is called

My concern is passing datasource to different class does it taking lots memory? What about each single sql and do the lookup n store in datasource does it consuming quite lots of time?

Any other better way on the design? Any idea is appreciate!

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2007
Added on May 16 2007
8 comments
86 views