[opencms-dev] Add custom jpa pool
Georgi Naplatanov
gosho at oles.biz
Fri Jul 26 12:30:55 CEST 2013
Hi Lisa,
actually OpenCms' JPA layer uses 2 pools:
- pool for database connections
- pool for EntityManager instances
There is an example how db connection pool can be configured with Apache
DBCP - http://openjpa.apache.org/faq.html#pooling.
If you want to use a pool for EntityManager instance, you have to do
that yourself, it's not difficult for implementing.
On 07/26/2013 12:41 PM, lruggeri at maticad.it wrote:
> Hi,
>
> i’d like to use jpa to access some tables in an external database
> already accesible from openmcs.
>
> How i can configure my jpa unit in order to use connection pooling
> provided by opencms?
>
> And how to get the EntityManager? It seems to me that
> CmsSqlManager.createEntityManager does not support pooling.
>
> Database configuration is now in opencms.properties file
>
Yes, all db configuration parameters are in opencms.properties because
of easily configuration, but in your case - additional persistence
unit, it is easier to configure that unit in persistence.xml file.
HTH
Best regards
Georgi
> Thanks
>
> Bye, Lisa
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
More information about the opencms-dev
mailing list