[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Need nested, not distributed transactions
chip_schoch
do-not-reply at jboss.com
Sun May 6 08:35:49 EDT 2007
JBossAS 4.2.0 CR2
I am deploying hibernate as a .sar for use by several webapps and MBean services. I need to be able to nest db transactions. Does anyone know how I should configure the jboss-service.xml so that I get a ThreadLocalSessionContext instead of a JTASessionContext? My current jboss-xml:
<server>
|
| <mbean code="org.hibernate.jmx.HibernateService"
| name="jboss.jca:service=DocHubHibernateSessionFactory,name=DocHubHibernateSessionFactory">
|
| <!-- Required services -->
| <depends>jboss.jca:service=RARDeployer</depends>
| <depends>jboss.jca:service=LocalTxCM,name=DocHubDS</depends>
|
| <!-- Bind the Hibernate service to JNDI -->
| <attribute name="JndiName">java:/eLynx/DocHubHibernateSessionFactory</attribute>
|
| <!-- Datasource settings -->
| <attribute name="Datasource">java:DocHubDS</attribute>
| <attribute name="Dialect">org.hibernate.dialect.SQLServerDialect</attribute>
|
| <!-- Transaction integration -->
| <attribute name="TransactionStrategy">org.hibernate.transaction.JDBCTransactionFactory</attribute>
| <attribute name="TransactionManagerLookupStrategy">org.hibernate.transaction.JBossTransactionManagerLookup</attribute>
| <attribute name="FlushBeforeCompletionEnabled">true</attribute>
| <attribute name="AutoCloseSessionEnabled">true</attribute>
|
| <!-- Fetching options -->
| <attribute name="MaximumFetchDepth">5</attribute>
|
| <!-- Second-level caching -->
| <attribute name="SecondLevelCacheEnabled">true</attribute>
| <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
| <attribute name="QueryCacheEnabled">true</attribute>
|
| <!-- Logging -->
| <attribute name="ShowSqlEnabled">true</attribute>
|
| <!-- Mapping files -->
| <attribute name="MapResources">
|
| ...
|
| </attribute>
|
|
| </mbean>
|
| </server>
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043519#4043519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043519
More information about the jboss-user
mailing list