I am using hibernate 2.1.2, the problem was tested with both jboss 3.2.3 and jboss cvs (3.2.4RC1)
I am having the same problem, basically the data is not being persisted.
Here is my jboss-service.xml
Code:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=Hibernate">
<depends>jboss.jca:service=RARDeployer</depends>
<attribute name="MapResources">...</attribute>
<attribute name="JndiName">java:/HibernateFactory</attribute>
<attribute name="Datasource">java:/PostgresDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute>
<attribute name="UseOuterJoin">true</attribute>
<attribute name="ShowSql">true</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
</mbean>
<depends>jboss.jca:service=LocalTxCM,name=PostgresDS</depends>
<attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute>
</server>
Console Output
Code:
[STDOUT] Feb 22, 2004 7:20:22 PM com.fudosan.infrastructure.persistence.hibernate.HibernateAgentDAO create
INFO: Created agent: 2062
19:20:22,415 INFO [JtaTransactionManager] Initiating transaction commit
The file log
Code:
2004-02-22 18:58:32,274 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] Getting transaction for method 'create' in class [com.fudosan.infrastructure.persistence.AgentDAO]
2004-02-22 18:58:32,274 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Using transaction object [org.jboss.tm.usertx.client.ServerVMClientUserTransaction@2982bf]
2004-02-22 18:58:32,274 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Creating new transaction
2004-02-22 18:58:32,274 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Beginning JTA transaction [org.jboss.tm.usertx.client.ServerVMClientUserTransaction@2982bf]
2004-02-22 18:58:32,275 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Initializing transaction synchronization
2004-02-22 18:58:32,279 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Retrieved value [org.springframework.orm.hibernate.SessionHolder@3f4f44] for key [net.sf.hibernate.impl.SessionFactoryImpl@39029b] bound to thread [http8080-Processor25]
2004-02-22 18:58:32,279 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2004-02-22 18:58:32,283 DEBUG [net.sf.hibernate.SQL] select nextval ('hibernate_sequence')
2004-02-22 18:58:32,283 INFO [STDOUT] Hibernate: select nextval ('hibernate_sequence')
2004-02-22 18:58:32,285 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.id.SequenceGenerator] Sequence identifier generated: 206
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.id.SequenceHiLoGenerator] new hi value: 206
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.impl.SessionImpl] generated identifier: 2061
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.impl.SessionImpl] saving [com.fudosan.domain.realestate.Agent#2061]
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: com.fudosan.domain.realestate.Agent
2004-02-22 18:58:32,288 DEBUG [net.sf.hibernate.engine.Cascades] cascading to saveOrUpdate()
2004-02-22 18:58:32,289 DEBUG [net.sf.hibernate.impl.SessionImpl] saveOrUpdate() unsaved instance
2004-02-22 18:58:32,289 DEBUG [net.sf.hibernate.impl.BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
2004-02-22 18:58:32,289 DEBUG [net.sf.hibernate.SQL] select nextval ('hibernate_sequence')
2004-02-22 18:58:32,289 INFO [STDOUT] Hibernate: select nextval ('hibernate_sequence')
2004-02-22 18:58:32,293 DEBUG [net.sf.hibernate.impl.BatcherImpl] preparing statement
2004-02-22 18:58:32,305 DEBUG [net.sf.hibernate.id.SequenceGenerator] Sequence identifier generated: 207
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.impl.BatcherImpl] done closing: 0 open PreparedStatements, 0 open ResultSets
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.impl.BatcherImpl] closing statement
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.id.SequenceHiLoGenerator] new hi value: 207
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.impl.SessionImpl] generated identifier: 2071
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.impl.SessionImpl] saving [com.fudosan.domain.realestate.Office#2071]
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: com.fudosan.domain.realestate.Office
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: com.fudosan.domain.realestate.Office
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: com.fudosan.domain.realestate.Office
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] cascading to collection: com.fudosan.domain.realestate.Office.agents
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] cascading to collection: com.fudosan.domain.realestate.Office.properties
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: com.fudosan.domain.realestate.Office
2004-02-22 18:58:32,306 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: com.fudosan.domain.realestate.Agent
2004-02-22 18:58:32,307 DEBUG [net.sf.hibernate.engine.Cascades] processing cascades for: com.fudosan.domain.realestate.Agent
2004-02-22 18:58:32,307 DEBUG [net.sf.hibernate.engine.Cascades] cascading to collection: com.fudosan.domain.realestate.Agent.listings
2004-02-22 18:58:32,307 DEBUG [net.sf.hibernate.engine.Cascades] done processing cascades for: com.fudosan.domain.realestate.Agent
2004-02-22 18:58:32,332 INFO [STDOUT] Feb 22, 2004 6:58:32 PM com.fudosan.infrastructure.persistence.hibernate.HibernateAgentDAO create
INFO: Created agent: 2061
2004-02-22 18:58:32,333 DEBUG [org.springframework.transaction.interceptor.TransactionInterceptor] Invoking commit for transaction on method 'create' in class [com.fudosan.infrastructure.persistence.AgentDAO]
2004-02-22 18:58:32,333 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Triggering beforeCommit synchronization
2004-02-22 18:58:32,333 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Triggering beforeCompletion synchronization
2004-02-22 18:58:32,333 INFO [org.springframework.transaction.jta.JtaTransactionManager] Initiating transaction commit
2004-02-22 18:58:32,333 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Committing JTA transaction [org.jboss.tm.usertx.client.ServerVMClientUserTransaction@2982bf]
2004-02-22 18:58:32,333 DEBUG [net.sf.hibernate.engine.CacheSynchronization] transaction before completion callback
2004-02-22 18:58:32,365 DEBUG [net.sf.hibernate.engine.CacheSynchronization] transaction after completion callback, status: 3
2004-02-22 18:58:32,365 DEBUG [net.sf.hibernate.impl.SessionImpl] transaction completion
2004-02-22 18:58:32,365 DEBUG [org.springframework.transaction.jta.JtaTransactionManager] Triggering afterCompletion synchronization
2004-02-22 18:58:32,366 DEBUG [org.springframework.transaction.support.TransactionSynchronizationManager] Clearing transaction synchronization