Hi Scott, Thanks for the help. So does this mean you would advocate the use of transaction="required" everywhere as long as there are no transacted resources?
My application is a web application and my worry is this: Imagine if you are displaying a large amount of data that can possibly change to users, for example let's say auctions on ebay. If the underlying session façade method which calls something like "getAuctionsForCategory()" has transaction="required", then does this not effectively serialize your web application? Ie, every web page request will have to get a lock on the database. Am I wrong here? Thanks for the help, Brian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott M Stark Sent: 10 November 2003 17:15 To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Clueless on transactions A JTA transaction has little overhead if there is no transacted resource. A session invoker another ejb through a facade method that is marked as transactional is a trival overhead. Transactions control the scope of caching of data from the cmp2 layer and so are required if any caching optimizations are going to work as expected. -- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx Brian McSweeney wrote: > Hi all, > > > > I’m a bit clueless on transactions but here is my problem. > > I’ve got SessionFacades talking to CMP ejbs. > > > > I remember somewhere someone saying that for cmp entity ejbs all the > > transactions should be marked as required. Is this true? > > > > So in my cmp beans I use the > > following xdoclet tag: > > > > > > * @ejb.transaction > > * type="Required" > > > > > > Then in my session façade I didn’t have type=”Required” but I got some > > mad errors saying a cmr collection can only be used inside the transaction > > it was created in. So I changed all my session facades to be transaction > > type required too. However, I’m worried that this would seriously negate > > my app performance. I’m using Jboss3.2.2 and have thought of using > <read-only> > > on all my getters, but perhaps this isn’t a good idea either! > > > > All my calls are on local ejbs. Should I re-assess each method on the > session > > façade to see if it should be a different transaction type? > > > > Will this make significant performance improvements? > > > > Thanks, > > Brian > ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user