Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Shared cache on multi base using same classes
Shared cache on multi base using same classes [message #780995] Wed, 18 January 2012 15:53 Go to next message
Robin CAMUS is currently offline Robin CAMUSFriend
Messages: 8
Registered: January 2012
Junior Member
Hello,
I'm using eclipselink to access multiple bases using the same tables and i want to know if i can simply use a persistence.xml like this :


<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" ... (cannot use links :X)>


<persistence-unit name="DATA_M" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/DATA_M</jta-data-source>
<class>onp.modele.adli.ListeDiffusion</class>
<class>onp.modele.commun.Agent</class>
<class>onp.modele.commun.JourFerie</class>
<class>onp.modele.adse.SecteurRegle</class>
...
<properties>
<property name="eclipselink.weaving.internal" value="false"/>
</properties>
</persistence-unit>

<persistence-unit name="DATA_X" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/DATA_M</jta-data-source>
<class>onp.modele.adli.ListeDiffusion</class>
<class>onp.modele.commun.Agent</class>
<class>onp.modele.commun.JourFerie</class>
<class>onp.modele.adse.SecteurRegle</class>
...
<properties>
<property name="eclipselink.weaving.internal" value="false"/>
</properties>
</persistence-unit>
... (for 20 different persistence units)


Do eclipselink use different cache for each datasource?
Or will i ll be experiencing some cache issue (2 onp.modele.commun.Agent can have the same id key but different values if they re not in the same base).
Or do i need to specify additionals properties so i can use it like this.

Thx in advance.

Other stuff :
Using
weblogic 10.3.4
eclipselink 2.1.2
Re: Shared cache on multi base using same classes [message #781004 is a reply to message #780995] Thu, 19 January 2012 16:28 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Each persistence unit will have its own shared cache.

Nothing will be shared between these different persistence units.


--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Re: Shared cache on multi base using same classes [message #781021 is a reply to message #780995] Thu, 19 January 2012 16:28 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Each persistence unit will have its own shared cache.

Nothing will be shared between these different persistence units.


--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Re: Shared cache on multi base using same classes [message #781038 is a reply to message #780995] Thu, 19 January 2012 16:28 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Each persistence unit will have its own shared cache.

Nothing will be shared between these different persistence units.


--
James : http://wiki.eclipse.org/EclipseLink : http://en.wikibooks.org/wiki/Java_Persistence : http://java-persistence-performance.blogspot.com/


James : Wiki : Book : Blog : Twitter
Previous Topic:Transaction logging
Next Topic:set schema name for stored procedures using JPA
Goto Forum:
  


Current Time: Sun Dec 08 10:33:12 GMT 2024

Powered by FUDForum. Page generated in 0.05135 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top