HHH-11546 Add support for SAP NetWeaver as JTA Platform
This commit is contained in:
parent
6ec060b1d2
commit
0e83628c92
|
@ -81,6 +81,7 @@ Hibernate provides many implementations of the `JtaPlatform` contract, all with
|
|||
`OC4J`:: `JtaPlatform` for Oracle's OC4J container.
|
||||
`Orion`:: `JtaPlatform` for the Orion Application Server.
|
||||
`Resin`:: `JtaPlatform` for the Resin Application Server.
|
||||
`SapNetWeaver`:: `JtaPlatform` for the SAP NetWeaver Application Server.
|
||||
`SunOne`:: `JtaPlatform` for the SunOne Application Server.
|
||||
`Weblogic`:: `JtaPlatform` for the Weblogic Application Server.
|
||||
`WebSphere`:: `JtaPlatform` for older versions of the WebSphere Application Server.
|
||||
|
|
|
@ -505,6 +505,13 @@
|
|||
Can also be referenced using the <property>Resin</property> configuration short name
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<classname>org.hibernate.engine.transaction.jta.platform.internal.SapNetWeaverJtaPlatform</classname> -
|
||||
Integration with transaction manager as deployed in a SAP NetWeaver application server.
|
||||
Can also be referenced using the <property>SapNetWeaver</property> configuration short name
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<classname>org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform</classname> -
|
||||
|
|
|
@ -505,6 +505,11 @@
|
|||
<literal>Resin</literal> - JtaPlatform for the Resin Application Server.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>SapNetWeaver</literal> - JtaPlatform for the SAP NetWeaver Application Server.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>SunOne</literal> - JtaPlatform for the SunOne Application Server.
|
||||
|
|
|
@ -177,6 +177,11 @@
|
|||
<literal>Resin</literal> - JtaPlatform for the Resin Application Server.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>SapNetWeaver</literal> - JtaPlatform for the SAP NetWeaver Application Server.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>SunOne</literal> - JtaPlatform for the SunOne Application Server.
|
||||
|
|
|
@ -77,6 +77,7 @@ import org.hibernate.engine.transaction.jta.platform.internal.JRun4JtaPlatform;
|
|||
import org.hibernate.engine.transaction.jta.platform.internal.OC4JJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.OrionJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.ResinJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.SapNetWeaverJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.SunOneJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform;
|
||||
import org.hibernate.engine.transaction.jta.platform.internal.WebSphereJtaPlatform;
|
||||
|
@ -314,6 +315,13 @@ public class StrategySelectorBuilder {
|
|||
"org.hibernate.service.jta.platform.internal.ResinJtaPlatform"
|
||||
);
|
||||
|
||||
addJtaPlatforms(
|
||||
strategySelector,
|
||||
SapNetWeaverJtaPlatform.class,
|
||||
"SapNetWeaver",
|
||||
"org.hibernate.service.jta.platform.internal.SapNetWeaverJtaPlatform"
|
||||
);
|
||||
|
||||
addJtaPlatforms(
|
||||
strategySelector,
|
||||
SunOneJtaPlatform.class,
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
|
||||
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
|
||||
*/
|
||||
package org.hibernate.engine.transaction.jta.platform.internal;
|
||||
|
||||
import javax.transaction.TransactionManager;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
/**
|
||||
* {@link org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform} implementation for SAP NetWeaver
|
||||
*
|
||||
* @author Lukas Pradel
|
||||
*/
|
||||
public class SapNetWeaverJtaPlatform extends AbstractJtaPlatform {
|
||||
public static final String TM_NAME = "TransactionManager";
|
||||
public static final String UT_NAME = "UserTransaction";
|
||||
|
||||
@Override
|
||||
protected TransactionManager locateTransactionManager() {
|
||||
return (TransactionManager) jndiService().locate( TM_NAME );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected UserTransaction locateUserTransaction() {
|
||||
return (UserTransaction) jndiService().locate( UT_NAME );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue