File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ Create a [filename]+META-INF/persistence.xml+ file.
148
148
<?xml version="1.0"?>
149
149
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
150
150
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
151
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun. com/xml/ns/persistence/persistence_2_0.xsd"
151
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
152
152
version="2.0">
153
153
154
154
<persistence-unit name="ogm-jpa-tutorial" transaction-type="JTA">
@@ -215,7 +215,9 @@ tm.commit();
215
215
216
216
emf.close();
217
217
218
- public static TransactionManager getTransactionManager() throws Exception
218
+ private static final String JBOSS_TM_CLASS_NAME = "com.arjuna.ats.jta.TransactionManager";
219
+
220
+ public static TransactionManager getTransactionManager() throws Exception {
219
221
Class<?> tmClass = Main.class.getClassLoader().loadClass(JBOSS_TM_CLASS_NAME);
220
222
return (TransactionManager) tmClass.getMethod("transactionManager").invoke(null);
221
223
}
You can’t perform that action at this time.
0 commit comments