openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <kwsut...@gmail.com>
Subject Re: correct way to load persistent metadata at startup
Date Wed, 03 Jun 2009 04:33:43 GMT
Hi Simon,

On Tue, Jun 2, 2009 at 3:33 PM, Simon Droscher <
simon.droscher@elasticpath.com> wrote:

>
> Kevin Sutter wrote:
> >
> > This topic has come up recently due to some potential
> > locking issues (serialized access) when reading the metadata repository
> in
> > a
> > multi-threaded environment.
> >
>
> Do you have any details (JIRA issue?) about the locking issues? We are
> seeing a lot of locked threads on MetaDataRepository.getMetaData under load
> with data caching enabled (OpenJPA 1.2.1)


No JIRA Issue yet.  We're not experiencing deadlocks, we're just
experiencing some serialized access under certain multi-threaded access.  I
haven't pushed on it yet since we just haven't nailed down the exact
scenario yet.  Just not enough time...


> Is there anything we can do about this? It is reducing our ability to scale
> performance.


Sorry, I don't know of any work arounds for your situation. And, looking at
your call stack, it looks to be a slightly different problem.  I also notice
that you are using the WebLogic environment.  What version of OpenJPA are
you using?  You mention 1.2.1 above, but I thought WebLogic used the 1.1.x
branch of OpenJPA.

Thanks,
Kevin

Here's some of the stack trace:
>
>
> [TDNum36] "[ACTIVE] ExecuteThread: '56' for queue: 'weblogic.kernel.Default
> (self-tuning)'" daemon prio=1 tid=0x36a22b20 nid=0x7c1c runnable
> [0x25cea000..0x25cecda0]
> [TDNum36]     at java.lang.Class.isAssignableFrom(Native Method)
> [TDNum36]     at
>
> org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:285)
> [TDNum36]     - locked <0x72d44cb8> (a
> org.apache.openjpa.jdbc.meta.MappingRepository)
> [TDNum36]     at
>
> org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:994)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.BrokerImpl.newStateManagerImpl(BrokerImpl.java:1179)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:964)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:913)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationFields(AbstractPCData.java:225)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedFields(AbstractPCData.java:192)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:78)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:347)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationField(AbstractPCData.java:216)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedField(AbstractPCData.java:150)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:127)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.loadAll(DataCacheStoreManager.java:484)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.loadAll(DelegatingStoreManager.java:121)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:984)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:913)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationFields(AbstractPCData.java:225)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedFields(AbstractPCData.java:192)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:78)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:347)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:918)
> [TDNum36]     at
> org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:967)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:948)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:927)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:364)
> [TDNum36]     at
>
> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:340)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationField(AbstractPCData.java:216)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedField(AbstractPCData.java:150)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:127)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:347)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationField(AbstractPCData.java:216)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedField(AbstractPCData.java:150)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:127)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.loadAll(DataCacheStoreManager.java:484)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.loadAll(DelegatingStoreManager.java:121)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:984)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.findAll(BrokerImpl.java:913)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toRelationFields(AbstractPCData.java:225)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.AbstractPCData.toNestedFields(AbstractPCData.java:192)
> [TDNum36]     at
> org.apache.openjpa.kernel.AbstractPCData.toField(AbstractPCData.java:78)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.loadField(PCDataImpl.java:197)
> [TDNum36]     at
> org.apache.openjpa.kernel.PCDataImpl.load(PCDataImpl.java:147)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.DataCacheStoreManager.initialize(DataCacheStoreManager.java:347)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
> [TDNum36]     at
>
> org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
> [TDNum36]     at
> org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.QueryCacheStoreQuery.fromObjectId(QueryCacheStoreQuery.java:203)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.QueryCacheStoreQuery.access$200(QueryCacheStoreQuery.java:58)
> [TDNum36]     at
>
> org.apache.openjpa.datacache.QueryCacheStoreQuery$CachedList.get(QueryCacheStoreQuery.java:461)
> [TDNum36]     at
>
> org.apache.openjpa.lib.rop.ListResultObjectProvider.getResultObject(ListResultObjectProvider.java:55)
> [TDNum36]     at
> org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
> [TDNum36]     at
> org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
> [TDNum36]     at
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
> [TDNum36]     at
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
> [TDNum36]     at
> org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
> [TDNum36]     at
> org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:533)
> [TDNum36]     at
> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:252)
> [TDNum36]     at
> org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:294)
>
> --
> View this message in context:
> http://n2.nabble.com/correct-way-to-load-persistent-metadata-at-startup-tp2865060p3014458.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message