Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 31230 invoked from network); 12 Oct 2007 14:13:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Oct 2007 14:13:53 -0000 Received: (qmail 36570 invoked by uid 500); 12 Oct 2007 14:12:27 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 36539 invoked by uid 500); 12 Oct 2007 14:12:26 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 36522 invoked by uid 99); 12 Oct 2007 14:12:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 07:12:26 -0700 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [217.72.192.243] (HELO fmmailgate05.web.de) (217.72.192.243) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 14:12:29 +0000 Received: from web.de by fmmailgate05.web.de (Postfix) with SMTP id 2A049302C7F0 for ; Fri, 12 Oct 2007 16:11:38 +0200 (CEST) Received: from [84.131.206.69] by freemailng2701.web.de with HTTP; Fri, 12 Oct 2007 16:11:37 +0200 Date: Fri, 12 Oct 2007 16:11:37 +0200 Message-Id: <302909468@web.de> MIME-Version: 1.0 From: Jochen Zink To: user@geronimo.apache.org Subject: Re: Geronimo 2..01 + Hibernate + MDB Organization: http://freemail.web.de/ X-Provags-Id: V01U2FsdGVkX1+n/e6sJbCNPTcQDLSkUyX5fYIRD43ZWuaHXoPpSqhicwPVf mVU2Ppor7kQXfhqfI2uXsNvCu/anF3PxxC4Iul+3IVRhDM+mNybt0YTK12oJ A== Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org My problem is solved. Thanks! It is not exactly what I want, but it is okay. > -----Urspr=FCngliche Nachricht----- > Von: user@geronimo.apache.org > Gesendet: 12.10.07 11:37:36 > An: user@geronimo.apache.org > Betreff: Re: Geronimo 2..01 + Hibernate + MDB >=20 > Thanks for your answer. >=20 > That is exactly what I want.=20 > But it does not work, as I expected ;). >=20 > 1) I changed the DataSource to "no-transaction" > 2) The MDB has Container Managed Transaction > 3) the Hibernate Configuration looks like: > hibernate.connection.datasource=3Djava:comp/env/jdbc/pushAEConnectionPool > hibernate.dialect=3Dorg.hibernate.dialect.Oracle9Dialect > hibernate.hbm2ddl.auto=3Dvalidate >=20 > The strange thing is, f I add new Data with Hibernate, it works. The dat= a is written to the Database after the hibernate commit();=20 > 1. Transaction tx =3D session.beginTransaction(); > 2. session.save(...); > 3. tx.commit(); -> written to the database >=20 > but, if I use the update Method, no change to the database happens. > 1. Transaction tx =3D session.beginTransaction(); > 2. session.update(...); > 3. tx.commit(); -> not data is written to the database >=20 > So, I believe it has something to do with Locks. But I don' know. I anyo= ne has an idea, it would be great :) >=20 > Thanks a lot! > Regards > Jochen >=20 >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: user@geronimo.apache.org > > Gesendet: 11.10.07 19:12:34 > > An: user@geronimo.apache.org > > Betreff: Re: Geronimo 2..01 + Hibernate + MDB >=20 >=20 > >=20 > > I'm not entirely sure I understand what you want.... let me try to =20 > > restate it: > >=20 > > -- calls to the mdb should be run in a JTA transaction, so if you =20 > > call setRollbackOnly the message will be redelivered > > -- whether the JTA transaction commits or rolls back, the hibernate =20 > > work should be done in a separate hibernate-controlled hibernate =20 > > transaction > >=20 > > You can get this effect by using container managed transaction for =20 > > the MDB and using a no-transaction datasource for hibernate. If you = =20 > > generated the plan for the datasource using the console it will have =20 > > a element; if you replace this with > transaction> and deploy the plan from the command line or "deploy =20 > > new" in the console you should get a suitable configuration. > >=20 > > thanks > > david jencks > >=20 > > On Oct 11, 2007, at 5:52 AM, Jochen Zink wrote: > >=20 > > > 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 =20 > > > Geronimo. That works. > > > > > > Inside the MDB there are some Saveactions to the database, which =20 > > > looks like this: > > > > > > Session session =3D Sessionfactory.openSession(); > > > Transaction tx =3D session.beginTransaction(); > > > session.save(..); > > > tx.commit(); > > > session.close(); > > > etc. > > > > > > My problem is, that no object is stored to the Database, after the =20 > > > commit(); > > > > > > I guess, this is only a Configuration Problem, from Hibernate And/=20 > > > or the MDBs Transaction Type. > > > > > > If I call setRollbackOnly() on the MessageDrivenContext(), I want =20 > > > that only the Message is redelivered to the MDB and not, that the =20 > > > hibernateTransactions are rollbacked. (Sorry for my bad English). > > > > > > The Transaction-Type of the MDB is set to Bean (is this right=3F) > > > > > > And the Hibernateconfiguration looks like this: > > > hibernate.connection.datasource=3Djava:comp/env/jdbc/=20 > > > pushAEConnectionPool > > > hibernate.dialect=3Dorg.hibernate.dialect.Oracle9Dialect > > > hibernate.hbm2ddl.auto=3Dvalidate > > > > > > > > > I believe, that there must be some stuff like > > > hibernate.transaction.factory=5Fclass=3Dorg.hibernate.transaction.JTATra= ns=20 > > > actionFactory > > > hibernate.current=5Fsession=5Fcontext=5Fclass=3Djta > > > hibernate.transaction.manager=5Flookup=5Fclass=3D=3F > > > > > > But, I also believe, that the simple stuff, without using =20 > > > JTATransactions should work. > > > > > > The whole application runs perfectly, if I use a local DataSource =20 > > > and not a Hibernate ConnectionPool. > > > > > > I found this example, but I was not able to find a solution for my =20 > > > problem inside. > > > http://cwiki.apache.org/GMOxDOC20/jboss-to-geronimo-hibernate-=20 > > > migration.html > > > > > > Thanks a lot for your help. > > > Regards > > > Jochen > > > > > > > > > > > > > > > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=20 > > > =5F=5F=5F=5F > > > Erweitern Sie FreeMail zu einem noch leistungsst=E4rkeren E-Mail-=20 > > > Postfach! =09 > > > Mehr Infos unter http://produkte.web.de/club/=3Fmc=3D021131 > > > > >=20 > >=20 >=20 >=20 > =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > Jetzt neu! Sch=FCtzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate > kostenlos testen. http://www.pc-sicherheit.web.de/startseite/=3Fmc=3D022220 >=20 >=20 =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Jetzt neu! Sch=FCtzen Sie Ihren PC mit McAfee und WEB.DE. 3 Monate kostenlos testen. http://www.pc-sicherheit.web.de/startseite/=3Fmc=3D022220