Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1643

Use container-managed data sources as Slice

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • slice
    • None

    Description

      Slice currently only allows URL based configuration. In managed environment, Slice should allow configuration via a JNDI-named data source. For example, the following configuration
      should be possible. The basic conditions are
      a) Specify the master slice as <jta-data-source>
      b) Specify each slice datasource (including the master) with openjpa.ConnectionFactoryName
      c) Specify usual 'managed' modes if the slices participate in a JTA transaction

      The example below shows three slices named 'slice1', 'slice2' and 'slice3' connected to three configured data sources.

      <persistence-unit name="Slice" transaction-type="JTA">

      <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
      <jta-data-source>jdbc/slice-ds1</jta-data-source>

      <properties>
      <property name="openjpa.BrokerFactory" value="slice"/>
      <property name="openjpa.slice.Names" value="slice1,slice2,slice3"/>
      <property name="openjpa.slice.Master" value="slice1"/>
      <property name="openjpa.slice.slice1.ConnectionFactoryName" value="jdbc/slice-ds1"/>
      <property name="openjpa.slice.slice2.ConnectionFactoryName" value="jdbc/slice-ds2"/>
      <property name="openjpa.slice.slice3.ConnectionFactoryName" value="jdbc/slice-ds3"/>
      <property name="openjpa.TransactionMode" value="managed" />
      <property name="openjpa.ConnectionFactoryMode" value="managed" />
      </properties>
      </persistence-unit>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ppoddar@apache.org Pinaki Poddar
            ppoddar@apache.org Pinaki Poddar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment