On Nov 20, 2007 12:11 AM, Ezra Epstein [EMAIL PROTECTED] wrote:
I imagine that if you use Spring's declarative transactions on the service
layer so that the read()/get() method does not start a read/write transaction
but the save() method does then changing the object without calling save()
Hi Lasitha,
Here is how I handle this. Again, I'm not sure if it's best practice,
I'd be interested in comments:
1) In @PageAttached, I NULL out entity.
2) In OnActivate() (which is executed a few times), I set entity to a
new, empty Entity (useful if this page was called with no primary key,
On Nov 23, 2007 4:29 AM, Angelo Chen [EMAIL PROTECTED] wrote:
lasitha wrote:
Since the above events fire on both the original request and the one
from the redirect, you'll probably need a null check to differentiate:
can you explain more about about this null
check, any example why we
On Nov 22, 2007 1:20 PM, Massimo Lusetti [EMAIL PROTECTED] wrote:
On Nov 22, 2007 8:37 AM, lasitha [EMAIL PROTECTED] wrote:
A follow up for anyone keeping score: i've just verified that
hibernate does _not_ automatically flush a Session when it is closed.
If anyone is interested i can
On Nov 22, 2007 9:02 AM, lasitha [EMAIL PROTECTED] wrote:
Hmm, i must've missed where this was documented. The api certainly
doesn't mention anything about flushing on close, but i was
uncomfortable assuming this, particularly since earlier versions of
hibernate _did_ flush on close, if i
if there could be a similar soultion for T5?
Max
-Ursprüngliche Nachricht-
Von: lasitha [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 15:29
An: Tapestry users
Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
On 10/30/07, Angelo
: lasitha [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 15:29
An: Tapestry users
Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
is this really needed? I got confused, why the changes
On Nov 22, 2007 6:27 PM, Yunhua Sang [EMAIL PROTECTED] wrote:
...
Steps:
1. edit a people' firstname in Page1, It's possible I don't need to
show address here, so get Addresses() is NOT called,
2. I submit the form, modify firstname, save people.
3. I render people (already be detached) in
Hi Lasitha,
good practice to follow, thanks. can you explain more about about this null
check, any example why we have to check? thanks.
lasitha wrote:
On Nov 22, 2007 6:27 PM, Yunhua Sang [EMAIL PROTECTED] wrote:
Since the above events fire on both the original request and the one
from
: Tapestry-Hibernate, do we have to save()?
Hi Lasitha,
Your thoughts do require some thinking, I'm doing a site now that is not
so
critical in the consistency of the data, as it's merely a simple
membership
database, but if this is to replace a c/s biz application, this will be a
issue
Nachricht-
Von: lasitha [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 15:29
An: Tapestry users
Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
is this really needed? I got confused, why the changes
-Ursprüngliche Nachricht-
Von: lasitha [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. Oktober 2007 15:29
An: Tapestry users
Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
is this really needed? I got
On Wed, 21 Nov 2007 13:43:44 -0200, Yunhua Sang [EMAIL PROTECTED]
wrote:
Hi Renat,
Do you have some good ideas to prevent LazyInitializationException be
thrown out after form submitting? My current solution looks not smart:
explicitly call collection.size() in the first thread.
Take a look
Subject: RE: T5: Tapestry-Hibernate, do we have to save()?
Hi Jonathan,
I'm new to this web thing, I'm using now Tapestry with Hibernate and found
them so convenient together, I'd like to know what is the advantage of
using
Spring with Tapestry, particularly T5 considering T5 has its
On Nov 20, 2007 9:32 AM, lasitha [EMAIL PROTECTED] wrote:
... In previous versions of hibernate, just
closing a session automatically triggered a flush.
A follow up for anyone keeping score: i've just verified that
hibernate does _not_ automatically flush a Session when it is closed.
If anyone
On Nov 22, 2007 8:37 AM, lasitha [EMAIL PROTECTED] wrote:
A follow up for anyone keeping score: i've just verified that
hibernate does _not_ automatically flush a Session when it is closed.
If anyone is interested i can pass along my learning test.
That's clearly written in the API.
Cheers
PROTECTED]
Gesendet: Montag, 19. November 2007 20:01
An: Tapestry users
Betreff: Re: T5: Tapestry-Hibernate, do we have to save()?
On Mon, 19 Nov 2007 16:34:46 -0200, lasitha
[EMAIL PROTECTED]
wrote:
Let me describe the problem in a little more detail. Assuming a
typical OSIV setup
On Tue, 20 Nov 2007 02:02:18 -0200, lasitha [EMAIL PROTECTED]
wrote:
Yes. But my question pertains more to the span of the hibernate
_session_ than to that of the transaction.
A typical OSIV implementation keeps a single session open right until
the end of a request so the view layer can
On Tue, 20 Nov 2007 05:53:26 -0200, Maximilian Weißböck
[EMAIL PROTECTED] wrote:
As interesting the HiberTapestry approach sounds, it is nothing we can
use. We have a strict rule, the service layer is completly independent
from the view layer.
I think I have not chosen the right words in my
On Oct 31, 2007, Thiago H de Paula Figueiredo [EMAIL PROTECTED] wrote:
On Wed, 31 Oct 2007, Ognen Ivanovski [EMAIL PROTECTED] wrote:
tapestry-ioc allows you to write interceptors on service method calls.
I've already done that: http://tapestry-mine.sourceforge.net/hibertapestry/
The source
On Mon, 19 Nov 2007 07:17:32 -0200, lasitha [EMAIL PROTECTED]
wrote:
On Oct 31, 2007, Thiago H de Paula Figueiredo [EMAIL PROTECTED] wrote:
Thiago, any chance you'll be releasing the source soon?
Hi, Lasitha! (By the way, where are you from?)
I'm planning to release the sources until this
On Nov 19, 2007 5:42 PM, Thiago H de Paula Figueiredo
[EMAIL PROTECTED] wrote:
Hi, Lasitha! (By the way, where are you from?)
Oh, the beautiful town of kandy, sri lanka :)
I'm planning to release the sources until this weekend.
Great, thanks! Will be looking forward to it.
In the meantime,
On Mon, 19 Nov 2007 14:19:28 -0200, lasitha [EMAIL PROTECTED]
wrote:
On Nov 19, 2007 5:42 PM, Thiago H de Paula Figueiredo
[EMAIL PROTECTED] wrote:
Hi, Lasitha! (By the way, where are you from?)
Oh, the beautiful town of kandy, sri lanka :)
I'm from the not so beautiful city of Belo
On Nov 19, 2007 10:35 PM, Thiago H de Paula Figueiredo
[EMAIL PROTECTED] wrote:
I havent't noticed this problem before. Until now, HiberTapestry opens a
transaction when a service method annotated with @Transactional is invoked
and commits it when the method finishes without exceptions.
I imagine that if you use Spring's declarative transactions on the service
layer so that the read()/get() method does not start a read/write transaction
but the save() method does then changing the object without calling save()
should just work - you won't be in a read/write tx and so the
On Mon, 19 Nov 2007 16:34:46 -0200, lasitha [EMAIL PROTECTED]
wrote:
Let me describe the problem in a little more detail. Assuming a
typical OSIV setup, consider the following sequence of events:
1. A form is submitted.
2. The entity that backs the form is retrieved from the db in
On Mon, 19 Nov 2007 16:41:09 -0200, Ezra Epstein [EMAIL PROTECTED]
wrote:
I imagine that if you use Spring's declarative transactions on the
service layer so that the read()/get() method does not start a
read/write transaction but the save() method does then changing the
object without
On Nov 20, 2007 12:31 AM, Thiago H de Paula Figueiredo
[EMAIL PROTECTED] wrote:
On Mon, 19 Nov 2007 16:34:46 -0200, lasitha [EMAIL PROTECTED]
wrote:
HiberTapestry does not work like tapestry-hibernate*, just opening a
transaction when a transactional method is invoked. A method is
On Nov 20, 2007 12:11 AM, Ezra Epstein [EMAIL PROTECTED] wrote:
I imagine that if you use Spring's declarative transactions on the service
layer so that the read()/get() method does not start a read/write transaction
but the save() method does then changing the object without calling save()
lasitha wrote:
However, your post brings up an interesting question: will the
object's state be persisted even after validation fails? My first
Seems obvious that a transaction should be wrapped around the form
validation (or around the whole request) which would rollback in case of
On Wed, 31 Oct 2007 09:17:52 -0200, Ognen Ivanovski
[EMAIL PROTECTED] wrote:
The question is - how to do it? Better yet, how to do it without
boilerplate code all around?
tapestry-ioc allows you to write interceptors on service method calls.
I've already done that:
Hi,
I have a class like this:
Long id;
Photo photo;
@Inject
private Session _session;
public void setId(Long id) {
this.id = id;
}
public Class onActivate() {
photo = (Photo) _session.get(Photo.class, id);
return null;
}
public String getCaption() {
return
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
is this really needed? I got confused, why the changes are saved without
calling _session.save()?
Angelo, this is default hibernate behaviour. See:
http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-modifying
, do we have to save()?
On 10/30/07, Angelo Chen [EMAIL PROTECTED] wrote:
is this really needed? I got confused, why the changes are
saved without
calling _session.save()?
Angelo, this is default hibernate behaviour. See:
http://www.hibernate.org/hib_docs/v3/reference/en/html/objects
Hi Lasitha,
Your thoughts do require some thinking, I'm doing a site now that is not so
critical in the consistency of the data, as it's merely a simple membership
database, but if this is to replace a c/s biz application, this will be a
issue, is the current Tapestry - hibernate ready for
To: users@tapestry.apache.org
Subject: Re: T5: Tapestry-Hibernate, do we have to save()?
Hi Lasitha,
Your thoughts do require some thinking, I'm doing a site now that is not
so
critical in the consistency of the data, as it's merely a simple
membership
database
36 matches
Mail list logo