Bugs item #756466, was opened at 2003-06-18 12:08
Message generated for change (Settings changed) made by loubyansky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=756466&group_id=22866

Category: JBossServer
Group: v3.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Alexei Yudichev (sflexus)
Assigned to: Alexey Loubyansky (loubyansky)
Summary: JNDI context is wrong inside setEntityContext()

Initial Comment:
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() {
    return getMmsimage();
  }
[...]
}

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 {
      contentOwnerHome = (ContentOwnerHome) new 
InitialContext().lookup("java:
comp/env/ejb/mms/ContentOwnerLocal");
    } 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.



----------------------------------------------------------------------

Comment By: Alexei Yudichev (sflexus)
Date: 2003-10-18 17:04

Message:
Logged In: YES 
user_id=345880

This bug seem to be fixed in JBoss 3.2.2RC3. Thanks.

----------------------------------------------------------------------

Comment By: Alexey Loubyansky (loubyansky)
Date: 2003-06-21 16:57

Message:
Logged In: YES 
user_id=543482

Could you, please, try again with Branch_3_2 from CVS? (you 
can update only JDBCCMRFieldBridge to test)

Thank you,
alex

----------------------------------------------------------------------

Comment By: Alexei Yudichev (sflexus)
Date: 2003-06-20 11:08

Message:
Logged In: YES 
user_id=345880

No it is not. Just downloaded and installed 3.2.2RC1 and still 
experience the same problem. Stack trace is attached.

----------------------------------------------------------------------

Comment By: Adrian Brock (ejort)
Date: 2003-06-18 13:50

Message:
Logged In: YES 
user_id=9459

This was fixed in the 3.2.2RC1 release

Regards,
Adrian

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=756466&group_id=22866


-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to