-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate with Ajax based framework
PostPosted: Fri Jan 15, 2010 6:36 am 
Beginner
Beginner

Joined: Wed Jan 07, 2009 7:07 pm
Posts: 26
I am using Echo 2 (an ajax based framework) with hibernate and I am facing a lot of issues. Let me explain it in few points :

    1. My application has lots of insert / update , sometime bulk data.

    2. I am using session per application pattern as I want to use Lazy loading. We have multiple tabs opens and user can
    switch in between. Also we have huge collections relationship so we want to use lazy loading.

    3. Session per application pattern eats up lot of memory as the first level cache keeps on growing.

    4. As we are dealing with huge collections , so we are using HQL updates for those bulk update, hibernate doesn't
    recognize this and hence I have to evict all objects from L1 cache after saving.

    5.Keeping session open for too long is not a good idea. We have load balancing with application deployed on three
    separate jvm. L1 cache doesn't updated if the same object is modified from other jvm. (I guess we can only sync L2 cache).

Please suggest me the best way to use hibernate with desktop like web application (GWT, echo 2 etc).


Top
 Profile  
 
 Post subject: Re: Hibernate with Ajax based framework
PostPosted: Mon Nov 08, 2010 6:06 am 
Beginner
Beginner

Joined: Wed Jan 07, 2009 7:07 pm
Posts: 26
I was trying to find the solution form quite some time. After Flex has come up people are facing more such issues.

There are few new framework work coming to help in this regard. Those are all built up upon hibernate. One such freamework is dpHibernate.

But the best way to avoid these problems is by using DTO's. Initially I was hesitant to use DTO as it was a lot of code maintainance. But its worth the effort.

Thanks
-Vishal


Top
 Profile  
 
 Post subject: Re: Hibernate with Ajax based framework
PostPosted: Wed Nov 10, 2010 12:37 pm 
Senior
Senior

Joined: Fri Oct 08, 2010 8:44 am
Posts: 130
To my mind using or not using separate data transfer objects does not have any connection to your problems at all :)


Top
 Profile  
 
 Post subject: Re: Hibernate with Ajax based framework
PostPosted: Thu Dec 02, 2010 8:12 am 
Beginner
Beginner

Joined: Wed Jan 07, 2009 7:07 pm
Posts: 26
r wrote:
To my mind using or not using separate data transfer objects does not have any connection to your problems at all :)


Hi,
Can you explain why ?
I have used it and allow me to use session per conversation patter quite easily.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.