[jboss-cvs] JBossAS SVN: r59350 - trunk/ejb3/src/main/org/jboss/ejb3/entity
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 4 09:04:20 EST 2007
Author: wolfc
Date: 2007-01-04 09:04:16 -0500 (Thu, 04 Jan 2007)
New Revision: 59350
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
Log:
Fixed transaction type setting
Modified: trunk/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java 2007-01-04 14:03:03 UTC (rev 59349)
+++ trunk/ejb3/src/main/org/jboss/ejb3/entity/PersistenceUnitDeployment.java 2007-01-04 14:04:16 UTC (rev 59350)
@@ -138,6 +138,8 @@
public ManagedEntityManagerFactory getManagedFactory()
{
+ if(managedFactory == null)
+ log.warn("managed factory is null, persistence unit " + kernelName + " has not yet been started");
return managedFactory;
}
@@ -172,6 +174,8 @@
public void start()
throws Exception
{
+ log.info("Starting persistence unit " + kernelName);
+
Properties props = new Properties();
props.putAll(di.getDefaultPersistenceProperties());
props.put(HibernatePersistence.JACC_CONTEXT_ID, getJaccContextId());
@@ -189,9 +193,10 @@
pi.setMappingFileNames(xml.getMappingFiles());
pi.setExcludeUnlistedClasses(xml.getExcludeUnlistedClasses());
pi.setPersistenceUnitRootUrl(di.getUrl());
- PersistenceUnitTransactionType transactionType = PersistenceUnitTransactionType.JTA;
- if ("RESOURCE_LOCAL".equals(xml.getTransactionType()))
- transactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL;
+// PersistenceUnitTransactionType transactionType = PersistenceUnitTransactionType.JTA;
+// if ("RESOURCE_LOCAL".equals(xml.getTransactionType()))
+// transactionType = PersistenceUnitTransactionType.RESOURCE_LOCAL;
+ PersistenceUnitTransactionType transactionType = xml.getTransactionType();
pi.setTransactionType(transactionType);
for (String jar : xml.getJarFiles())
@@ -254,6 +259,8 @@
public void stop() throws Exception
{
+ log.info("Stopping persistence unit " + kernelName);
+
String entityManagerJndiName = (String) xml.getProps().get("jboss.entity.manager.jndi.name");
if (entityManagerJndiName != null)
{
More information about the jboss-cvs-commits
mailing list