-->
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.  [ 3 posts ] 
Author Message
 Post subject: Set a custom DataSource for the JPA EntityManagerFactory
PostPosted: Fri Oct 06, 2017 12:25 pm 
Newbie

Joined: Fri Oct 06, 2017 12:21 pm
Posts: 2
I have a project in which a datasource programmatically created in a standard JVM, must be used for the connection pool and I cannot create and keep and entitymangerFactory so I'd like to set the entitymanagerFactory's connection pool. But I do not know how to stop the EMF from creating its own pool and make it use the datasource provided pool.


Top
 Profile  
 
 Post subject: Re: Set the Connection pool of an EntityManager
PostPosted: Fri Oct 06, 2017 1:42 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Easy peasy!

Fork my High-Performance Java Persistence GitHub repository and check out this test case.

You can configure the DataSource as you want and just pass it via the hibernate.connection.datasource configuration property.


Top
 Profile  
 
 Post subject: Re: Set a custom DataSource for the JPA EntityManagerFactory
PostPosted: Fri Oct 06, 2017 2:01 pm 
Newbie

Joined: Fri Oct 06, 2017 12:21 pm
Posts: 2
should this work I heart you


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