openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <>
Subject [jira] Commented: (OPENJPA-115) Bottleneck(s) with using OpenJPA in a Container-managed environment
Date Tue, 30 Jan 2007 13:54:33 GMT


Kevin Sutter commented on OPENJPA-115:

Thanks, Patrick and Craig.  I did some looking in lib and found that we also have a ConcurrentReferenceHashSet.
 So, I have modified _brokers accordingly and am waiting for our test results.  I have also
removed the explicit lock/unlock invocations.  As Patrick pointed out, the findBroker() is
never called since findExisting is always false for OpenJPA, thus the other synch block shouldn't
come into play.  Hopefully, with the weak references in ConcurrentReferenceHashSet _brokers,
this should help with the blocking and broker cleanup.  Our original experimentation showed
that even with the weak references in ReferenceHashSet, we still bogged down during the cleanup
of the _brokers collection.  But, maybe there's a problem with SunOne where they are not properly
closing the EntityManagers.  I'll post back when we get the test results.

> Bottleneck(s) with using OpenJPA in a Container-managed environment
> -------------------------------------------------------------------
>                 Key: OPENJPA-115
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Kevin Sutter
>         Assigned To: Kevin Sutter
>            Priority: Critical
> Running some benchmarks against OpenJPA using the Sun Java System (SunOne) application
server.  Under load, we're not able to push the cpu to 100%.  The culprit seems to be the
lock and synchronization processing within AbstractBrokerFactory.newBroker(..).  According
to sections 5.9.1 and 5.9.2 in the JPA specification, it looks like OpenJPA is attempting
to do too much management of the created EntityManagers.  Within a Container-managed environment,
the Container takes care of the lifecycle of the EntityManagers.  So, there does not seem
to be a need to do the findBroker(..) invocation, nor is there a need to keep track of the
created EntityManagers (_brokers) so that they can be closed when the Factory is closed.
> Once we have verified these changes, there may be others that are needed.  But, we have
to get by this bottleneck first before going to the next layer...
> Kevin

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message