These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Efficient alternative to IsDirty() ?
PostPosted: Thu Feb 14, 2008 1:38 pm 
Beginner
Beginner

Joined: Thu May 31, 2007 1:19 pm
Posts: 23
Hi,

I need to enable an "Apply" button when changes have occurred in the current Session (which will commit the transaction).

There are many parts of my form that can change the session in many different ways, I would quite like to have a Timer on the firm that checks every few seconds a flag and enables the button appropriately.

The problem is that IsDirty() takes between 3-4 seconds to perform when my session has a many objects.

Does anyhow have any ideas for checking dirty status with minimal overhead?


Thanks,
Mark.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 15, 2008 2:16 pm 
Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY
Do you need to have so many objects in your Session? Dirty checks over large Sessions are known to be slow, thus the recommendation that Sessions be use for smaller units of work.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 15, 2008 2:22 pm 
Beginner
Beginner

Joined: Thu May 31, 2007 1:19 pm
Posts: 23
Hi

Well, I'm using a session to contain a large list of objects bound to a grid.

So, yes, for at the moment I really do need to have lots of objects.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.