Bugs item #910913, was opened at 2004-03-06 14:36
Message generated for change (Comment added) made by loubyansky
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=910913&group_id=22866
>Category: JBossCMP
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: Konstantin Sobolev (eprst)
>Assigned to: Alexey Loubyansky (loubyansky)
Summary: (3.2.3) bug when ejbStore calls finder
Initial Comment:
Hi all,
There is a bug (probably) in new JBoss, briefly it
doesn't expect that
ejbStore will call finder method and doesn't protect
list of entities
changed in transaction from reentrant calls
(see GlobalTXEntityMap.synchronizeEntities).
Real example:
ActionBean, BMP entity bean, ejbStore() method:
Code:
ActionDataHolderBrokerLocal holderBroker =
getActionDataHolderBrokerLocalHome().create();
holderBroker.updateActionData(new Long(pk.getId()),
data);//line 233
ActionDataHolderBrokerBean:
Code:
public void updateActionData(Long actionPK, ActionData
actionData) throws ActionDataHolderException {
findActionDataHolder(actionPK).setActionData(actionData);//72
}
...........
private ActionDataHolderLocalBI
findActionDataHolder(Long actionPK) throws
ActionDataHolderException {
ActionDataHolderLocalBI holder;
try {
holder = findUpdateDataHolder(actionPK); //line 91
if (holder == null)
holder = findRulesEmailDataHolder(actionPK);
if (holder == null)
holder =
findGenericActionlDataHolder(actionPK);
if (holder == null)
throw new ActionDataHolderException("Can't
find ActionData holder by actionPK=" + actionPK);
} catch (FinderException e) {
String msg = "Error finding ActionData holder:
" + e;
log.error(msg, e);
throw new ActionDataHolderException(msg);
}
return holder;
}
...........
private ActionDataHolderLocalBI
findUpdateDataHolder(Long actionPK) throws
FinderException {
try {
return
getUpdateDataHolderLocalHome().findByPrimaryKey(actionPK);
//line 108
} catch (ObjectNotFoundException e) {
return null;
}
}
now stacktrace that clearly shows looping error
Code:
at $Proxy976.updateActionData(Unknown Source)
at
com.supportwizard.actions2.ejb.ActionBean.ejbStore(ActionBean.java:233)
at
com.supportwizard.actions2.ejb.ActionBMP.ejbStore(ActionBMP.java:60)
at
sun.reflect.GeneratedMethodAccessor119.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManager.java:454)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:387)
at
org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:714)
at
org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:149)
at
org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:119)
at
org.jboss.ejb.EntityContainer.findLocal(EntityContainer.java:607)
at
sun.reflect.GeneratedMethodAccessor285.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1043)
at
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
at
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:89)
at
org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
at
org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:297)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at
org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:483)
at
org.jboss.ejb.Container.invoke(Container.java:720)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293)
at
org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
at $Proxy928.findByPrimaryKey(Unknown Source)
at
com.supportwizard.actions2.persistence.ejb.ActionDataHolderBrokerBean.findUpdateDataHolder(ActionDataHolderBrokerBean.java:108)
at
com.supportwizard.actions2.persistence.ejb.ActionDataHolderBrokerBean.findActionDataHolder(ActionDataHolderBrokerBean.java:91)
at
com.supportwizard.actions2.persistence.ejb.ActionDataHolderBrokerBean.updateActionData(ActionDataHolderBrokerBean.java:72)
at
sun.reflect.GeneratedMethodAccessor313.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at
org.jboss.ejb.Container.invoke(Container.java:700)
at
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
at
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
at $Proxy976.updateActionData(Unknown Source)
at
com.supportwizard.actions2.ejb.ActionBean.ejbStore(ActionBean.java:233)
at
com.supportwizard.actions2.ejb.ActionBMP.ejbStore(ActionBMP.java:60)
and so on.
Proposed patch for GlobalTXEntityMap.java, from 3.2.3:
Code:
105a106
> entitiesFifoMap.set(tx,null);
116a118
> entitiesSetMap.set(tx,null);
thanks
----------------------------------------------------------------------
>Comment By: Alexey Loubyansky (loubyansky)
Date: 2004-03-07 17:04
Message:
Logged In: YES
user_id=543482
This was fixed in 3.2.4RC1
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=910913&group_id=22866
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development