CIPL-Senthil
asked on
EJB-Jboss
Hi experts,
I am working on EJBs with JBOSS-4.0.5 as server.
I was getting Naming Exception at the following lines of code.
/*---------------*/
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("ejb/test/MyTes tSessionBe an");
testSessionBean = (MyTestSessionHome)Portabl eRemoteObj ect.narrow (objref, MyTestSessionHome.class);
/*---------------*/
Later I changed the code as following, but I am getting the Classcast Exception.
/*---------------*/
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("java:comp/env/ ejb/test/M yTestSessi onBean");
testSessionBean = (MyTestSessionHome)Portabl eRemoteObj ect.narrow (objref, MyTestSessionHome.class);
/*---------------*/
Could you please help me in this.
I am working on EJBs with JBOSS-4.0.5 as server.
I was getting Naming Exception at the following lines of code.
/*---------------*/
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("ejb/test/MyTes
testSessionBean = (MyTestSessionHome)Portabl
/*---------------*/
Later I changed the code as following, but I am getting the Classcast Exception.
/*---------------*/
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("java:comp/env/
testSessionBean = (MyTestSessionHome)Portabl
/*---------------*/
Could you please help me in this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.