users@glassfish.java.net

Re: java.lang.ClassNotFoundException while ejb3 lookup

From: <glassfish_at_javadesktop.org>
Date: Tue, 03 Jun 2008 00:08:57 PDT

Thanks ksak for ur reply. I tried to use an annotation and have the bean reference injected.

So i modified the code as follows:

package ejb3;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import ejb3.Ejb3ServerRemote;
@Stateless(name="Ejb3Client", mappedName="Ejb3Client")
public class Ejb3Client implements Ejb3ClientRemote {
        private @EJB Ejb3ServerRemote remoteRef;
        public void callRemoteMethod(String msg) {
                System.out.println("Inside callRemoteMethod...");
                remoteRef.callMe(msg);
        }
}

But getting exception while trying to load.

Also can you tell me where should i keep the package of remote interface in the project of caller Application.

Thanks in Advance,

Mathew Pappady

Message was edited by: mathewpappady
[Message sent by forum member 'mathewpappady' (mathewpappady)]

http://forums.java.net/jive/thread.jspa?messageID=278001