> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Aleksandr
> Shneyderman
> Sent: Friday, March 14, 2003 9:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-user] Re: Hibernate or ejb
> 
> 
> I do not mean to anger the public here by being off-topic,
> just could not keep my mouth shut.
> 
> > The first thing we came across is the problem of lazy 
> instantiation. Let's
> > say you have
> > object A that has a relation to obect B. But you only want to 
> load A and B
> > later when
> > it is used. Hibernate cannot handle this (this is an open bug but maybe
> > fixed in the new
> > 2.0 beta). We have found a way around this but it is not very nice.
> 
> Hmm, it works for me. But then again I work with 2.0. It actually
> pretty neat how hibernate does things in respect of lazy collections.
> You only initialize them when you need them, and I think Gavin is in
> process of adding a method call called isInitialized () for a lazy
> collection. You can do even more you can disconnect your session and
> initialize lazy collection when you need it. Then of course you need
> to reconnect with the same Session. The problem with collections is
> that it is fairly  difficult to configure them and there just a gazillion
> options and way to do it. You just need to experiment.
> 
> > Another thing is definitely the caching in hibernate. You never 
> know when
> > hibernate
> > actually saves the data to your DB.
> 
> I think you are worng here too. First of all if you use a persistence
> tool then you should not worry about when it saves the stuff to the DB.
> Second of all if you do not want Hibernate to save your stuff call on
> session session.setFlushMode (FlushMode.NEVER) will let you control
> when you want to do the actual flushing. Then of course you need to
> call session.flush () yourself. I usually do not trust my saves to
> anyone :-) so the manual flush works for me.
> 

Sounds like Hibernate needs some integration with J2EE transactions.

Bill



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to