-->
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: Value Object vs Object Model
PostPosted: Thu Apr 07, 2005 3:45 pm 
Newbie

Joined: Sat Apr 02, 2005 10:32 am
Posts: 14
Hi,
I am designing persistent layer for one of Poc, and I have the following architecture in place.
JSP is used as rendering/presentation (Here I will have Value Object), and control goes to servlet where I am Invoking EJB method calls. so the entire Value object will be passed to ejb layer. Now during the insertions into the database using hibernate, can I use the same value object to insert into the database or do I need to create separate POJO (infact they are value objects only) and have a wrapper for value object to convert it to POJO. So that I will be differentiating value objects and object (data) model. Suggest me some principles here..
Thanks in advance.
Regards
Nagesh G

Read the rules before posting!

http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject: Architecture advice
PostPosted: Thu Apr 07, 2005 5:22 pm 
Beginner
Beginner

Joined: Thu Mar 24, 2005 5:21 pm
Posts: 21
If you are colocating your web and ejb tiers in the same JVM (which is a *good* idea, in general), you don't need no stinkin' "value" objects.
Use the OSIV (Open Session In View) pattern with a servlet filter and let your JSPs use the Hibernate POJOs while rendering the view.
More on this can be found on the hibernate website, i.e. here (search is your friend); better still, buy the Hibernate In Action book for excellent advice on architecture among other things...
HTH
Satish


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.