Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Multiple persistence unit support using JPA2

    Hi,
    Is it possible to use com.isomorphic.jpa.JPA2DataSource to support pointing to multiple PU's. SC server.properties seems only support one PU.

    Thanks.

    #2
    Hi,

    This feature was added recently and it is available only in SGWT 3.0 (nightly builds).

    Now you can create several named JPA configurations in server.properties file. For example:
    Code:
    jpa.configName.emfProvider: com.isomorphic.jpa.EMFProviderLMT
    jpa.configName.persistenceUnitName: ANOTHER_PERSISTENCE_UNIT_NAME
    To use another JPA configuration you have to set "jpaConfig" property
    in data source definition:
    Code:
    <DataSource
         ID="countryDS"
         serverConstructor="com.isomorphic.jpa.JPA2DataSource"
         beanClassName="com.smartgwt.sample.showcase.server.jpa.Country"
    [B]     jpaConfig="configName"[/B]
     >
    Regards,
    Alius

    Comment


      #3
      Hi Alias,
      Thanks. We have been waiting for this feature for some time now. I'll give it a try. Isn't SC great!

      Regards,
      -Mdu

      Comment

      Working...
      X