openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Created: (OPENJPA-1643) Use container-managed data sources as Slice
Date Wed, 28 Apr 2010 21:57:48 GMT
Use container-managed data sources as Slice

                 Key: OPENJPA-1643
             Project: OpenJPA
          Issue Type: Improvement
          Components: slice
            Reporter: Pinaki Poddar
            Assignee: Pinaki Poddar
             Fix For: 2.1.0

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">
                <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" /> 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message