Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-11546 Add support for SAP NetWeaver as JTA Platform
- Loading branch information
1 parent
6ec060b
commit 0e83628
Showing
6 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../java/org/hibernate/engine/transaction/jta/platform/internal/SapNetWeaverJtaPlatform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ); | ||
} | ||
} |