[seam-dev] Re: Blocked threads
Christian Bauer
cbauer at redhat.com
Thu Jun 5 06:16:17 EDT 2008
I was able to double my throughput and halve the average response time
in my load test by fixing the following JNDI UserTransaction lookups
(which are all blocking on the hashtable):
- Removing the ManagedEntityIdentityInterceptor from the default
interceptor stack.
- Removing the TransactionInterceptor which is used with
@Transactional by the EntityHome/Home/Query components (I don't use
it) - and I also question why it is used on EntityConverter/
EntityLoader. Especially for the converter/loaders this is never
necessary, they are always called inside a JSF request that is wrapped
by Seam in transactions and saying "Transaction required" again and
again is just costing a JNDI lookup.
- Removing the joinTransaction() that is triggered on every
EntityHome.getInstance(). EntityQuery and EntityIdentity do the same.
This also doesn't seem to be necessary, at least not for Seams
ManagedPersistenceContext which enlists the EM with the transaction on
@Unwrap (and it has a condition that avoids double-joins - hence only
one UT JNDI lookup per request).
All of this needs more testing, this is just some quick hack.
Basically, try to find the guys who call Transaction.instance() more
than once (or twice) during a request.
More information about the seam-dev
mailing list