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 #780558] Wed, 18 January 2012 15:53 Go to next message
Robin CAMUS is currently offline Robin CAMUS
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 #780853 is a reply to message #780558] Thu, 19 January 2012 16:28 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
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 : Wiki : Book : Blog : Twitter
Re: Shared cache on multi base using same classes [message #782183 is a reply to message #780853] Mon, 23 January 2012 10:09 Go to previous message
Robin CAMUS is currently offline Robin CAMUS
Messages: 8
Registered: January 2012
Junior Member
Thx for the quick answer
Re: Shared cache on multi base using same classes [message #782187 is a reply to message #780853] Mon, 23 January 2012 10:09 Go to previous message
Robin CAMUS is currently offline Robin CAMUS
Messages: 8
Registered: January 2012
Junior Member
Thx for the quick answer
Previous Topic:Error generating static Data Objects from XSD
Next Topic:Documentation of nonstandard features
Goto Forum:
  


Current Time: Fri Oct 24 11:32:05 GMT 2014

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

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