The
ctx for the lookup method refers to a JNDI InitialContext, not the
SessionContext.
Mat.
-----Original Message-----Hi,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thomas Grnert
Sent: 17 May 2001 15:30
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Intrabean Call ?
documentation says:
public class ABean implements EntityBean {
...
public void BusinessMethod(...) {
...
BHome home = (BHome)ctx.lookup("java:comp/env/ejb/myBean");
B bean = home.create(pk);
...
}
}
My inside a SessionBean code looks like:
private SessionContext ctx;
public void setSessionContext(SessionContext sc)
{
this.ctx = sc;
}
public DocumentFragment getMassnahmeByID(long ID) throws RemoteException
{
MassnahmeHome m_home = (MassnahmeHome)ctx.lookup("java:comp/env/entity/katalog/Massnahme");
SessionContext.getEJBObject().
....
Compiler says:
cannot resolv symbol: mothod lookup
I am sure that I do something really wrong. Please help me !
Thomas
