-->
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.  [ 1 post ] 
Author Message
 Post subject: General question about IOC and Session.flush()
PostPosted: Tue Mar 22, 2011 11:31 am 
Newbie

Joined: Tue Mar 22, 2011 10:57 am
Posts: 1
I'm new to Hibernate and trying to understand how, at a high level, Hibernate works in a large IOC container environment. Here is the general scenario:
  • A controller object invokes a domain object method, passing the parameters required to perform an update in a DTO
  • The IOC container starts a transaction (presumably, and a Hibernate session)
  • The domain object method requests the container to instantiate the top-level business object(s)
  • The domain object method invokes setters and business methods that perform the update within the business objects
  • The domain object method commits the transaction
Assume the business objects are properly annotated and the IOC container and Hibernate are fully configured. Here are my questions:
  • If the IOC container "load(entity, id)" method is invoked, will it cooperate with Hibernate to instantiate the entity without some form of DAO helper class?
  • Will Hibernate instrument entity classes to load contained entities when the parent getters are invoked?
  • Will Hibernate keep track of the entities loaded during the session and persist the dirty entities when the session is flushed?
Thanks in advance for your thoughts...


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

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.