|
|
Re: Integrate BoneCP and EclipseLink with LOCAL_RESOURCE transaction-type [message #1719090 is a reply to message #1719039] |
Tue, 05 January 2016 07:26 |
Mohamed Anis Mekki Messages: 3 Registered: December 2015 |
Junior Member |
|
|
Thank you Chris for your reply. Allow me to take my question further:
I used to deploy Java EE applications to a light container (Apache Tomcat), I am now trying full Java EE compliant servers and I started looking at Apache Tomee (Plume version which supports among others EclipseLink).
I learned that with Apache Tomee data sources can be declared globally to the container (in tomee.xml configuration file), then possibly used by many applications (in stead of each time configuring "by hand" the data source per each application).
I also succeeded into using BoneCP as connection pool provider by configuring inherently the data source in tomee.xml, see the use of org.apache.openejb.bonecp.BoneCPDataSourceCreator in tomee.xml below:
<Resource id="jdbc/bonecp_resource_issat" type="DataSource">
DataSourceCreator org.apache.openejb.bonecp.BoneCPDataSourceCreator
JtaManaged true
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/issat
UserName java
Password JaVa
PartitionCount 2
MinConnectionsPerPartition 5
MaxConnectionsPerPartition 10
ValidationQuery SELECT 1
</Resource>
If I understood correctly your suggestion: I can get rid of JTA by configuring my application's persistence.xml file as explained by the link your provided, while still using a data source globally defined in Apache Tomee and consequently while still having BoneCP in charge of the data pool.
Is my understanding correct ?
What if I want to use EclipseLink and BoneCP into an application to be deployed under a light container like Apache Tomcat, so using only the application's persistence.xml file to define my data source (and not using a "global" JNDI resource).
Is there a way to tell EclipseLink to use BoneCP as a connection pool provider ?
I'm pretty sure this is possible through Hibernate (I already did it with c3p0 connection pool provider), but could this be done without Hibernate and only with EclipseLink ?
[Updated on: Tue, 05 January 2016 08:06] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03322 seconds