-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: DriverMAnager vs. Datasource
PostPosted: Wed Jun 18, 2008 1:47 pm 
Beginner
Beginner

Joined: Wed Apr 23, 2008 2:00 pm
Posts: 20
Hello,
i'm implementing hibernate 3 and i don't know the advantadges and problems of using Datasources or DriverManager for the connection.

If somebody could give a clue of which one is better..
Thanks in advance !


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 18, 2008 9:15 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
A datasource is really a connection pool. It helps manage a number of connections, and can help spread out use over multiple clients.

When you're talking DriverManager, you're probably talking about creating a direct connection per request. That's pretty resource intensive, and a waste of critical resources.

Use a datasource!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.