problem in running ejb client!

i am newbie to the j2ee and wirte a simple ejb jar file to depoly on jboss with no error message. beside, with a client hope to access test if my ejb jar could work correct, but i do not know how to run the client by typing java HelloClient (the client i worte)

in commond line or spesify the classpath and jndi.properties, it all doesn't work! and message poped out on conlose look like NoClassDefFoundError or something else. where did i do it wrong?

thanks in advice,

-

package examples;

import javax.ejb.EJBObject;

public interface Hello extends EJBObject {

public String hello() throws java.rmi.RemoteException;

}

--

package examples;

import javax.ejb.SessionBean;

import javax.ejb.SessionContext;

import javax.ejb.SessionContext;

public class HelloBean implements SessionBean {

private SessionContext ctx;

public HelloBean() {

}

public void ejbCreate(){

System.out.println("ejbCreate() ...!");

}

public void ejbActivate() throws javax.ejb.EJBException, java.rmi.RemoteException {

System.out.println("ejbAcivate() ...!");

throw new java.lang.UnsupportedOperationException("Method ejbActivate() not yet implemented.");

}

public void ejbPassivate() throws javax.ejb.EJBException, java.rmi.RemoteException {

System.out.println("ejbPassivate() ...!");

throw new java.lang.UnsupportedOperationException("Method ejbPassivate() not yet implemented.");

}

public void ejbRemove() throws javax.ejb.EJBException, java.rmi.RemoteException {

System.out.println("ejbRemove() ...!");

throw new java.lang.UnsupportedOperationException("Method ejbRemove() not yet implemented.");

}

public void setSessionContext(SessionContext ctx) throws javax.ejb.EJBException, java.rmi.RemoteException {

this.ctx = ctx;

throw new java.lang.UnsupportedOperationException("Method setSessionContext() not yet implemented.");

}

public String hello(){

System.out.println("hello()...!");

return "Hello, World!";

}

}

-

package examples;

import javax.ejb.EJBHome;

public interface HelloHome extends EJBHome {

Hello create() throws java.rmi.RemoteException,javax.ejb.CreateException;

}

--

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar>

<description>JBoss Interest Sample Application</description>

<display-name>Interest EJB</display-name>

<enterprise-beans>

<session>

<ejb-name>Hello</ejb-name>

<home>examples.HelloHome</home>

<remote>examples.Hello</remote>

<ejb-class>examples.HelloBean</ejb-class>

<session-type>Stateless</session-type>

<transaction-type>Bean</transaction-type>

</session>

</enterprise-beans>

</ejb-jar>

[3042 byte] By [shogun1234] at [2007-9-26 9:02:01]
# 1
You have to specify the JAR file for your EJB classes in the classpath when you start you client. egjava -classpath myclasspath HelloClientwhere,myclasspath = the path to the EJB JAR file and other class files used by your client
AshwinP at 2007-7-1 20:05:02 > top of Java-index,Other Topics,Patterns & OO Design...