-->
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: hibernate + transaction + 3-tier
PostPosted: Mon Mar 20, 2006 7:57 am 
Regular
Regular

Joined: Tue Dec 14, 2004 5:21 am
Posts: 104
Location: india
Hibernate version:
3.1.1
Name and version of the database you are using:
PostgresSQl 7.4

hi all,
i have gone through open session in view pattern and session & transaction articles many times . but it couldnt help me out coz of the 3 -tier archetecture
i am having , it didnt give a proper explanation on how can i manage a transaction in my business/data tier using automatic session context management , ie, factory.getCurrentSession().

my questions and concerns are :
1) where will i begin a transaction ? the article was more focused on servlet filters which i cant use here .
2) If an interceptor is a possible solution, how can i do that ?
3) i want to use the generic DAO , described in the hibernate web site , and even Caveatemptor application for Hibernate in Action SE isn't multi tired .
i'm pretty tired searching for a proper solution .
4) even the reference documentation guides me to Hibernate in Action and hibernate.org wiki which i ended up going back and forth between docs and wiki . (pretty good example for hipertexts :) )
5) i am not that much concerned about the lazy initialization problem , which i manages using DTO

i hope i will get a satisfying answer
thanks in advance .... :)

_________________
sHeRiN
thanks for your ratings ...... :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 8:23 am 
Beginner
Beginner

Joined: Tue Apr 05, 2005 12:09 pm
Posts: 48
Location: Slovakia (SK), Košice (KE)
i would consider using spring framework. here is one article that have helped me a lot: http://www.javaworld.com/javaworld/jw-07-2004/jw-0719-jsf_p.html[/url]

_________________
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 8:26 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
I don't know which articles did you read, but the thing is pretty simple.

In what envoronment will your app run?
(a) App server or (b) servlet container?

(a) using EJBs will do what you want
(b) manage it your self - I suggest using AOP to wrap up your DAOs

Rgds, Ales


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.