Author: epbernard
Date: 2007-01-16 12:33:08 -0500 (Tue, 16 Jan 2007)
New Revision: 11048
Modified:
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/Ejb3Configuration.java
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
Log:
Allow customizable transactionType
Modified:
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/Ejb3Configuration.java
===================================================================
---
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/Ejb3Configuration.java 2007-01-16
15:26:09 UTC (rev 11047)
+++
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/Ejb3Configuration.java 2007-01-16
17:33:08 UTC (rev 11048)
@@ -212,8 +212,8 @@
List<PersistenceMetadata> metadataFiles = PersistenceXmlLoader.deploy(
url,
integration,
- cfg.getEntityResolver()
- );
+ cfg.getEntityResolver(),
+ PersistenceUnitTransactionType.RESOURCE_LOCAL );
for ( PersistenceMetadata metadata : metadataFiles ) {
log.trace( metadata.toString() );
Modified:
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java
===================================================================
---
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java 2007-01-16
15:26:09 UTC (rev 11047)
+++
branches/Branch_3_2/HibernateExt/ejb/src/java/org/hibernate/ejb/packaging/PersistenceXmlLoader.java 2007-01-16
17:33:08 UTC (rev 11048)
@@ -74,8 +74,8 @@
return doc;
}
- public static List<PersistenceMetadata> deploy(URL url, Map overrides,
EntityResolver resolver) throws Exception {
-
+ public static List<PersistenceMetadata> deploy(URL url, Map overrides,
EntityResolver resolver,
+ PersistenceUnitTransactionType defaultTransactionType) throws Exception {
Document doc = loadURL( url, resolver );
Element top = doc.getDocumentElement();
NodeList children = top.getChildNodes();
@@ -125,7 +125,7 @@
transactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL;
}
else {
- transactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL;
+ transactionType = defaultTransactionType;
}
}
metadata.setTransactionType( transactionType );
@@ -135,7 +135,6 @@
}
}
}
-
return units;
}
Show replies by date