[jboss-cvs] JBossAS SVN: r108375 - branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 29 05:07:53 EDT 2010
Author: stliu
Date: 2010-09-29 05:07:53 -0400 (Wed, 29 Sep 2010)
New Revision: 108375
Modified:
branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMBean.java
Log:
JBPAPP-5156 Flag AUTO_CLOSE_SESSION is hard-coded in HAR (sar) deployer
Modified: branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2010-09-29 09:07:02 UTC (rev 108374)
+++ branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/Hibernate.java 2010-09-29 09:07:53 UTC (rev 108375)
@@ -97,6 +97,8 @@
private Boolean structuredCacheEntriesEnabled;
private Boolean statGenerationEnabled;
private Boolean reflectionOptimizationEnabled;
+ private Boolean flushBeforeCompletionEnabled;
+ private Boolean autoCloseSessionEnabled;
// Configuration attributes used by the MBean
private String sessionFactoryName;
@@ -466,9 +468,11 @@
setUnlessNull(settings, Environment.USE_STREAMS_FOR_BINARY, streamsForBinaryEnabled);
setUnlessNull(settings, Environment.USE_REFLECTION_OPTIMIZER, reflectionOptimizationEnabled);
setUnlessNull(settings, Environment.GENERATE_STATISTICS, statGenerationEnabled);
+ setUnlessNull(settings, Environment.FLUSH_BEFORE_COMPLETION, flushBeforeCompletionEnabled);
+ setUnlessNull(settings, Environment.AUTO_CLOSE_SESSION, autoCloseSessionEnabled);
setUnlessNull(settings, Environment.TRANSACTION_MANAGER_STRATEGY, JBossTransactionManagerLookup.class.getName());
- setUnlessNull(settings, Environment.TRANSACTION_STRATEGY, JTATransactionFactory.class.getName());
+ setUnlessNull(settings, Environment.TRANSACTION_STRATEGY, JTATransactionFactory.class.getName());
if (deployedTreeCacheObjectName != null)
{
@@ -479,9 +483,6 @@
}
}
- settings.setProperty(Environment.FLUSH_BEFORE_COMPLETION, "true");
- settings.setProperty(Environment.AUTO_CLOSE_SESSION, "true");
-
// This is really H3-version-specific:
// in 3.0.3 and later, this should be the ConnectionReleaseMode enum;
// in 3.0.2, this is a true/false setting;
@@ -1005,4 +1006,24 @@
{
this.scanForMappingsEnabled = scanForMappingsEnabled;
}
+
+ public Boolean getAutoCloseSessionEnabled()
+ {
+ return autoCloseSessionEnabled;
+ }
+
+ public void setAutoCloseSessionEnabled(Boolean autoCloseSessionEnabled)
+ {
+ this.autoCloseSessionEnabled = autoCloseSessionEnabled;
+ }
+
+ public Boolean getFlushBeforeCompletionEnabled()
+ {
+ return flushBeforeCompletionEnabled;
+ }
+
+ public void setFlushBeforeCompletionEnabled(Boolean flushBeforeCompletionEnabled) {
+ this.flushBeforeCompletionEnabled = flushBeforeCompletionEnabled;
+ }
}
+
Modified: branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMBean.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMBean.java 2010-09-29 09:07:02 UTC (rev 108374)
+++ branches/JBPAPP_4_2_0_GA_CP/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMBean.java 2010-09-29 09:07:53 UTC (rev 108375)
@@ -543,8 +543,41 @@
* @param listenerInjector
*/
public void setListenerInjector(String listenerInjector);
+
+
+ /**
+ * Should Hibernate3 flush session automatically during the before completion phase of the transaction?
+ *
+ * @param flushBeforeCompletionEnabled
+ */
+ public Boolean getFlushBeforeCompletionEnabled();
+
+
+ /**
+ * Should Hibernate3 flush session automatically during the before completion phase of the transaction?
+ *
+ * @param flushBeforeCompletionEnabled
+ */
+ public void setFlushBeforeCompletionEnabled(Boolean flushBeforeCompletionEnabled);
+
/**
+ * Should Hibernate3 close session automatically during the after completion phase of the transaction?
+ *
+ * @param autoCloseSessionEnabled
+ */
+ public Boolean getAutoCloseSessionEnabled();
+
+
+ /**
+ * Should Hibernate3 close session automatically during the after completion phase of the transaction?
+ *
+ * @param autoCloseSessionEnabled
+ */
+ public void setAutoCloseSessionEnabled(Boolean autoCloseSessionEnabled);
+
+
+ /**
* Is this MBean dirty? Meaning, have any changes been made to it that have not yet been propogated to the managed
* {@link org.hibernate.SessionFactory}?
* <p/>
@@ -605,3 +638,4 @@
}
+
More information about the jboss-cvs-commits
mailing list