RE: Hibernate persisted data never makes it to DB

2006-06-06 Thread Payne, Matthew
ons like other frameworks can. Hopefully the next version of tapestry will take away that limitation. -Original Message- From: Konstantin Iignatyev [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 1:46 AM To: Tapestry users Subject: Re: Hibernate persisted data never

Re: Hibernate persisted data never makes it to DB

2006-05-28 Thread Mark
Like I said before, I have not been using any transaction manager. I thought that it would not be necessary - or better that in case there is none, the behaviour would be to just commit a query as soon as it comes through. I added TransactionManager, Interceptor and AutoProxyCreator and everyth

RE: Hibernate persisted data never makes it to DB

2006-05-27 Thread James Carman
isted data never makes it to DB Mark, > I added "hibernate.connection.autocommit=true" to my > hibernate.properties and that fixed it... hm. I don't know if that's a good idea. I'm not comfortable with hibernate.properties in a Spring environment, anyway. Is it

Re: Hibernate persisted data never makes it to DB

2006-05-27 Thread Lutz Hühnken
Mark, I added "hibernate.connection.autocommit=true" to my hibernate.properties and that fixed it... hm. I don't know if that's a good idea. I'm not comfortable with hibernate.properties in a Spring environment, anyway. Is it clear to you in which order they are read? Will Spring configuratio

Re: Hibernate persisted data never makes it to DB

2006-05-26 Thread Sam Gendler
For the record, Spring's OpenSessionInView filter works just fine for us. As for your commit issues, I don't really know what is failing to work for you. We are using the hibernateTransactionManager, transactionInterceptor, and autoProxyCreator to have spring automatically start and commit trans

Re: Hibernate persisted data never makes it to DB

2006-05-26 Thread Mark
I will, thanks. MARK James Carman wrote: Why don’t you just give Tapernate a try? There are a few folks using it already and it is working for them just fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

RE: Hibernate persisted data never makes it to DB

2006-05-26 Thread James Carman
Why don’t you just give Tapernate a try? There are a few folks using it already and it is working for them just fine. _ From: Mark [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 1:35 AM To: Tapestry users Subject: Re: Hibernate persisted data never makes it to DB I added

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark
No, I know that... I'm just playing around with the simple baby steps for now and will add Transactions later on... But thank you for the warning. MARK Konstantin Iignatyev wrote: autocommit is not the best approach. I suggest you to have a glance at the article for inspiration http://www.o

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Konstantin Iignatyev
autocommit is not the best approach. I suggest you to have a glance at the article for inspiration http://www.onjava.com/pub/a/onjava/2005/05/18/swingxactions.html?page=1 Mark wrote: I added "hibernate.connection.autocommit=true" to my hibernate.properties and that fixed it... So I assume Spr

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark
I added "hibernate.connection.autocommit=true" to my hibernate.properties and that fixed it... So I assume Spring by default does no Session/TX handling, unless I use the HibernateTransactionManager or do programmatic transaction handling... One last question, to get back to Tapestry - is Spri

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark
Lutz Hühnken wrote: I asked for applicationContext.xml, and I get a mysql log... well, near enough :) Sorry, I thought what I had found in the mysql log (the "set autocommit=0, no "commit" call and explicit "Rollback" call issued by Hibernate at shutdown) changed things a lot, but maybe not. F

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Henri Dupre
On 5/25/06, Lutz Hühnken <[EMAIL PROTECTED]> wrote: Yes, the Spring HibernateTemplate will take care of that for you. The actual behaviour depends on your transaction management, but let's not get into that for now. So, the save you call will commit the changes to the database. Hibernate then d

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Lutz Hühnken
I asked for applicationContext.xml, and I get a mysql log... well, near enough :) From your last mail I understand you have the same problem if you use the mysql command line client. Makes me wonder why you thought the problem had to do with Hibernate in the first place (let alone Tapestry, for

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Mark
So... - have you checked the rest of your code? Are you sure this piece of code is actually called? Step through it or add debugging output. I don't know how else I would get the Hibernate log output: "Hibernate: insert into room (roomType, roomNumber, smoking, active) values (?, ?, ?, ?)"

Re: Hibernate persisted data never makes it to DB

2006-05-25 Thread Lutz Hühnken
Yes, the Spring HibernateTemplate will take care of that for you. The actual behaviour depends on your transaction management, but let's not get into that for now. So, the save you call will commit the changes to the database. Hibernate then disconnects the session, I believe, anyhow, there is no

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
Aeh... I was relying on Spring doing the right thing?! (10 extra points to Lutz ;-) ) I figured since everybody has problems with Spring closing sessions too early and thereby causing problems with lazy-load, it should not affect me in this case and actually work for me. But maybe not??? I hon

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Henri Dupre
On 5/24/06, Mark <[EMAIL PROTECTED]> wrote: Is there a way to set this in the hibernate.properties? Right now I do not use OpenSessionInViewFilter... Oops I should have read the whole thread before answering ;-) So how do you manage your sessions? Thanks, Henri.

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
Does anybody have a standard plain-vanilla hibernate.conf file for me so I can compare it to mine? Also, I am not using any hibernate.cfg.xml, but I assume I don't have to... MARK Lutz Hühnken wrote: Hm... given that you don't use OpenSessionInViewFilter, I think it is really pretty optimisti

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Lutz Hühnken
Hm... given that you don't use OpenSessionInViewFilter, I think it is really pretty optimistic to believe your current problem can be solved by subclassing it and/or changing its flushing behaviour. On 5/25/06, Mark <[EMAIL PROTECTED]> wrote: Is there a way to set this in the hibernate.propert

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Henri Dupre
On 5/24/06, Mark <[EMAIL PROTECTED]> wrote: I am not using any OpenSessionInView filters yet - intentionally, because I wanted to run into the lazy-load problems first in order to verify that what I would then do will actually fix the problem. I looked quite in details on the OpenSessionInVi

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
Is there a way to set this in the hibernate.properties? Right now I do not use OpenSessionInViewFilter... MARK Daniel Lydiard wrote: Are you using OpenSessionInViewFilter (spring/hibernate)? The default flushmode is set to NEVER, so you need to override org.springframework.orm.hibernate3.su

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Daniel Lydiard
Message - From: "Mark" <[EMAIL PROTECTED]> To: "Tapestry users" Sent: Wednesday, May 24, 2006 1:58 PM Subject: Re: Hibernate persisted data never makes it to DB By the way - I am right to assume that what I experience here is not normal Hibernate behaviour? MARK

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
By the way - I am right to assume that what I experience here is not normal Hibernate behaviour? MARK Lutz Hühnken wrote: my two cents, in three parts... - about the problem: well, usually, it kind of works. This may sound silly, but do you maybe have hbm2ddl.auto set to "create-drop" ? Or

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
Thanks for your email, Lutz. Please see below for comments.. my two cents, in three parts... - about the problem: well, usually, it kind of works. This may sound silly, but do you maybe have hbm2ddl.auto set to "create-drop" ? Don't know what that does but I'll try it later, once

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Lutz Hühnken
my two cents, in three parts... - about the problem: well, usually, it kind of works. This may sound silly, but do you maybe have hbm2ddl.auto set to "create-drop" ? Or when you check if something has been stored, are you sure you're checking the right database? I'm not making fun of you, I have

Re: Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
AM To: Tapestry users Subject: Hibernate persisted data never makes it to DB Hi everybody, I have a problem with my persistence and I am not sure if it has to do with the often-discussed Hibernate-Tapestry interaction, OpenSessionInView filters (and me not using any), just my cache settings o

RE: Hibernate persisted data never makes it to DB

2006-05-24 Thread Gentry, Michael \(Contractor\)
CTED] Sent: Wednesday, May 24, 2006 11:16 AM To: Tapestry users Subject: Hibernate persisted data never makes it to DB Hi everybody, I have a problem with my persistence and I am not sure if it has to do with the often-discussed Hibernate-Tapestry interaction, OpenSessionInView filters (and me

RE: Hibernate persisted data never makes it to DB

2006-05-24 Thread James Carman
1:16 AM To: Tapestry users Subject: Hibernate persisted data never makes it to DB Hi everybody, I have a problem with my persistence and I am not sure if it has to do with the often-discussed Hibernate-Tapestry interaction, OpenSessionInView filters (and me not using any), just my cache settings or

Hibernate persisted data never makes it to DB

2006-05-24 Thread Mark
Hi everybody, I have a problem with my persistence and I am not sure if it has to do with the often-discussed Hibernate-Tapestry interaction, OpenSessionInView filters (and me not using any), just my cache settings or something entirely different altogether. I am running Tapestry with Spring