-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate and session beans: do they complement each other ?
PostPosted: Fri Mar 04, 2005 8:27 pm 
Regular
Regular

Joined: Fri Mar 04, 2005 1:33 pm
Posts: 65
Location: U.K.
Hi

My current project architecture has Struts in Presentation layer, Stateless session beans in business layer and Hibernate/DAO in data layer. The database is Oracle 9i. I am experiencing performance issues for search pages which return large object trees. I bet it is happending due to large data being serialized/unserialized from
1. Database server to application server's data layer
2. from Data/Business layer to presentation layer

I have couple of options:

1. Use projection queries so that the amount of data being fetched and hence transferred among layers is minimal.
2. Instead of using stateless session beans use plain Java objects so one round of serialization/unserialization is saved (ofcourse with huge price of making application non-distributed).
3. Use pagination so limited data objects are fetched per transaction.

I am ok with option 1 and 3, but is there anyone from Hibernate Team and users think option #2 is good ?

This also brings interesting question about any project using Hibernate. Is Hibernate designed to complement session beans ? It is a replacement for entity beans, I agree.

Thanks in advance.
Ron


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 9:35 pm 
Newbie

Joined: Fri Feb 04, 2005 11:39 pm
Posts: 13
You can avoid serialization and still use session beans if your architecture is such that the web layer and application layer will run on the same tier/jvm.

In that case, you can use local interface even for the session bean, which will obiviate the need of serialization (provided your application server has implemented local interfaces properly :)

This way you can continue using all the transaction management facilitites the ejb container provides and yet not incur the serialization overhead.

Hope this helps
Anil


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