geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pietia <pietia....@gmail.com>
Subject Another way for non-jta-data-source with derby ? (openjpa)
Date Sun, 04 May 2008 12:48:28 GMT

hello,
I dont know - if it's important but i found that in openjpa docs:


When using a managed DataSource, you should also configure a second
unmanaged DataSource that OpenJPA can use to perform tasks that are
independent of the global transaction. The most common of these tasks is
updating the sequence table OpenJPA uses to generate unique primary key
values for your datastore identity objects. Configure the second DataSource
using the non-jta-data-source  persistence.xml element, or OpenJPA's various
"2" connection properties, such as openjpa.ConnectionFactory2Name  or
openjpa.Connection2DriverName. These properties are outlined in Chapter 2, 
Configuration .

<!-- managed DataSource -->
<jta-data-source>java:/OracleXASource</jta-data-source>
<properties>
    <!-- use OpenJPA's built-in DataSource for unmanaged connections -->
    <property name="openjpa.Connection2UserName" value="scott"/>
    <property name="openjpa.Connection2Password" value="tiger"/>
    <property name="openjpa.Connection2URL"
value="jdbc:oracle:thin:@CROM:1521:OpenJPADB"/>
    <property name="openjpa.Connection2DriverName"
value="oracle.jdbc.driver.OracleDriver"/>
</properties>

I have tested it with Geronimo 2.1.1 and basic appliation -  and i think it
should works instead of 
defining new dbpool (non-jta) in web console.

Pietia

-- 
View this message in context: http://www.nabble.com/Another-way-for-non-jta-data-source-with-derby---%28openjpa%29-tp17045622s134p17045622.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message