Thanks to all users. The simular name of context with different types in docu was my problem.
Best regards.
Thomas
--Original Message Text---
From: [EMAIL PROTECTED]
Date: Thu, 17 May 2001 16:58:13 +0200
The ctx variable in the documentation example is of javax.naming.Context type, while your ctx is of javax.ejb.SessionContext....
in the book you should have something like:
javax.naming.Context ctx = new javax.naming.InitialContext(...);
-----Original Message-----
From: Thomas Gr nert [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 17. Mai 2001 16:30
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Intrabean Call ?
Hi,
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
- RE: [JBoss-user] Intrabean Call ? RRokytskyy
- RE: [JBoss-user] Intrabean Call ? Thomas Grnert
- RE: [JBoss-user] Intrabean Call ? Dain Sundstrom