if (log.isDebugEnabled())
log.debug("Remove: Rows affected = " + rowsAffected);
}
public void invokeRemoveRelated(Object relatedId) throws RemoveException, RemoteException {
CmpEntityBeanComponent component = relatedManager.getComponent();
/*
try
{
EntityCache instanceCache = (EntityCache) container.getInstanceCache();
SecurityActions actions = SecurityActions.UTIL.getSecurityActions();
org.jboss.invocation.Invocation invocation = new org.jboss.invocation.Invocation();
invocation.setId(instanceCache.createCacheKey(relatedId));
invocation.setArguments(new Object[]{});
invocation.setTransaction(container.getTransactionManager().getTransaction());
invocation.setPrincipal(actions.getPrincipal());
invocation.setCredential(actions.getCredential());
invocation.setType(invocationType);
invocation.setMethod(removeMethod);
container.invoke(invocation);
}
catch(EJBException e)
{
throw e;
}
catch(Exception e)
{
throw new EJBException("Error in remove instance", e);
}
*/
/**
* Have to remove through EJB[Local}Object interface since the proxy contains the 'removed' flag
* to be set on removal.
*/
if(component.getLocalClass() != null) {
final EJBLocalObject ejbObject = component.getEjbLocalObject(relatedId);
ejbObject.remove();
} else {
final EJBObject ejbObject = component.getEJBObject(relatedId);
ejbObject.remove();
}
}