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.  [ 5 posts ] 
Author Message
 Post subject: Using 3rd party connection pools
PostPosted: Wed Jun 27, 2007 3:28 pm 
Newbie

Joined: Wed Jun 27, 2007 3:21 pm
Posts: 2
I am working on a simple command line app demonstrating the use of Hibernate. I would like to use a 3rd part connection pool in my example, not the c3p0 or Proxool that are list in the documentation. I understand that if I ran in an App Server I could use that pool manager but for my purposes a stand alone is all I need for now.

Looking at the docs is seems that Hibernate only supports c3p0, Proxool or using an App Servers pool manager. Is this correct or is it possible to use any 3rd party pool manager?

Thanks,
Bruce


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 27, 2007 5:36 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
You can use connections from anywhere if you create a connection provider:
http://www.hibernate.org/hib_docs/v3/ap ... vider.html

You the specify the class name of your implementation in hibernate.connection.provider_class.

This is a very common extension point and should be quite easy to implement.

Cheers,

Chris

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 10:01 am 
Newbie

Joined: Wed Jun 27, 2007 3:21 pm
Posts: 2
Thanks for the idea. I decided to create a jndi datasource and store it in a binding file. The pool manager I am using will work fine with this.


Top
 Profile  
 
 Post subject: connection pool file
PostPosted: Thu Jun 28, 2007 11:52 am 
Beginner
Beginner

Joined: Sat May 12, 2007 2:55 am
Posts: 24
hi cbredesen,

can i use my own connection pooling class that i have created and is working fine with my jdbc based implementations? pl. provide a fragment so that newbie to hibernate like me can understand..


thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 28, 2007 11:55 am 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
I would not recommend that anyone write his own connection pool. But if you are able to code that reliably, then certainly you can understand the lifecycle of a Connection and the ConnectionProvider interface will make sense to you.

http://www.hibernate.org/hib_docs/v3/ap ... vider.html

-Chris

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.