Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

C3p0/Hibernate

 
Jamie Lee
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

Does anyone have any experience working with c3p0 & Hibernate? I don't even know where to start - there's lots of examples on how to configure c3p0 with Hibernate, but nothing on how to actually start using the connection pool...I'd like to test using threads, but I have no idea how to start on that either. Does anyone have any sample code/tutorial links/advice??

Thanks so much!!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jamie,
Have you seen what Hibernate has to say about this? It looks pretty detailed.
 
Jamie Lee
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply, but that's still only configuration information. I know how to configure c3p0, just not how to start using the pool...
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You start using the pool by asking your DataSource for a Connection. Simple as that. When it comes to Hibernate you don't even need to do that, just open a session and load an object. Behind the scenes Hibernate will be using the connection pool.
[ February 09, 2007: Message edited by: Paul Sturrock ]
 
Jamie Lee
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Paul!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic