geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Zink <jochenl...@web.de>
Subject Geronimo 2..01 + Hibernate + MDB
Date Thu, 11 Oct 2007 12:52:47 GMT
Hello,

I'm using Hibernate 3.2, Geronimo 2.0.1 and I have a MDB.

Hibernate uses a global Connection Pool, which is deployed in Geronimo. That works.

Inside the MDB there are some Saveactions to the database, which looks like this:

Session session = Sessionfactory.openSession();
Transaction tx = session.beginTransaction();
session.save(..);
tx.commit();
session.close();
etc.

My problem is, that no object is stored to the Database, after the commit();

I guess, this is only a Configuration Problem, from Hibernate And/or the MDBs Transaction
Type. 

If I call setRollbackOnly() on the MessageDrivenContext(), I want that only the Message is
redelivered to the MDB and not, that the hibernateTransactions are rollbacked. (Sorry for
my bad English).

The Transaction-Type of the MDB is set to Bean (is this right?)

And the Hibernateconfiguration looks like this:
hibernate.connection.datasource=java:comp/env/jdbc/pushAEConnectionPool
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
hibernate.hbm2ddl.auto=validate


I believe, that there must be some stuff like
hibernate.transaction.factory_class=org.hibernate.transaction.JTATransactionFactory
hibernate.current_session_context_class=jta
hibernate.transaction.manager_lookup_class=?

But, I also believe, that the simple stuff, without using JTATransactions should work.

The whole application runs perfectly, if I use a local DataSource and not a Hibernate ConnectionPool.

I found this example, but I was not able to find a solution for my problem inside.
http://cwiki.apache.org/GMOxDOC20/jboss-to-geronimo-hibernate-migration.html

Thanks a lot for your help.
Regards
Jochen




__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!		
Mehr Infos unter http://produkte.web.de/club/?mc=021131


Mime
View raw message