Details
-
Bug
-
Resolution: Done
-
Major
-
JBossAS-3.2.6 Final
-
None
-
None
Description
SourceForge Submitter: sflexus .
W2k or Linux, JDK 1.4.1_02, JBoss 3.2.1.
Assuming the following method is a business method of a
CMP Bean called Product:
abstract public class ProductBean extends MMSBean
implements EntityBean {
[...]
public MMSObject getMMSObject()
[...]
}
getMmsimage() is a CMR 1-to-1 field of ProductBean.
MMSImage Bean implementation:
class abstract public class MMSImageBean extends
MMSObjectBean implements EntityBean {
[...]
}
public abstract class MMSObjectBean extends MMSBean
{
[...]
public void setEntityContext(EntityContext
entityContext) {
super.setEntityContext(entityContext);
try
catch (NamingException ex)
{ throw new EJBException(ex); } }
[...]
}
A NameNotFoundException is thrown inside
MMSObjectBean.setEntityContext() (see stack trace is
attached). After carefull investigation it appeared that
inside MMSImageBean.setEntityContext() (which is
actually MMSObjectBean.setEntityContext()) the JNDI
ENC context of Product bean is active despite of the
current bean is MMSImageBean! After adding to Product
bean an ejb reference to ContentOwner bean exception
disappeared. Of course, ejb reference to ContentOwner
bean does exist for MMSImage bean.
If MMSObjectBean.setEntityContext() is invoked as a
result of a different invocation chain, for example as a
result of finding MMSImage by primary key, the JNDI
context is set up properly.