-->
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: DB Connection and Transaction Approach
PostPosted: Tue Oct 14, 2003 11:08 pm 
Beginner
Beginner

Joined: Sun Oct 05, 2003 9:02 pm
Posts: 27
Location: New York, NY
Hi All-

Couple of quick questions:

1) If using Hibernate primarily form stateless session beans (and MDB's), is it preferable to use the app server's DB connection pool, or does it make any difference?

2) Is it preferable to explicitly manage Hibernate transactions, or let the container manage them?


Some points i'm particularly interested in on these questions is which approach has proven out more, which performs better, and which is less complicated to implement.

Thanks,
Brandon


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 14, 2003 11:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
1) It would recommend using the application server's datasource. Simple to get access to it and it is likely to be closer to a production quaility implementation.
2) CMT is easy to setup and use. My view is that there only a few reasons why you would consider using EJB container. CMT is one of those reasons. It does make the code more compact as well.

Performance is subjective and I have not performed any tests at all. Having said that, if you do some caching the JNDI lookup costs are minimal and you would expect the container implementor to have spent some time optimising the transaction management layer. Obviously, its best to perform your own tests as each environment and application has different demands.


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.