The problem being I copied this exampple out of a book ( EJB (2.0)
The Jar deployed fine giving all the correct messages that it deployed correctly.
How ever when I execute the client is just complains that the bean Im trying to get the context for is not bound.
here is part of the client code
props will be readin from the command line
*/
Properties props =System.getProperties();
/* get JNDI initial context
*
* we choose the network loc of server
* done by passin on env vars
*
*/
Context ctx = new InitialContext(props);
/*
Get a reference to the home object
*/
System.out.println("about to execute the look for HelloHome");
Object obj = ctx.lookup("HelloHome");
I pass in the ENV vars on the command line when running this
This is the deployment descript
<ejb-jar>
<enterprise-beans>
<ejb-name>Hello</ejb-name>
examples.HelloHome
examples.Hello
<local-home>examples.HelloLocalHome</local-home>
examples.HelloLocal
<ejb-class>examples.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
</ejb-jar>
this is the actual bean requested by the client
public interface HelloHome extends javax.ejb.EJBHome{
/** This method creates and returns an EJBobject
**
*/
Hello create() throws java.rmi.RemoteException,
javax.ejb.CreateException;
}
PLEASE PLEASE CAN YOU TELL ME HOW IM BEING A TWOT AND POINT ON THE RIGHT ROAD
You should lookup the <ejb-name>
i.e. ctx.lookup("Hello");
Regards,
Adrian