Your code fragment would run something like this to get a reference to the bean:
Properties jndiProps = new Properties();
// Replace this with the URL to the JBoss JNDI if on a remote machine
// Get a naming context
InitialContext jndiContext = new InitialContext(jndiProps);
// Get a reference to the Bean by it's declared JNDI ref
Object ref = jndiContext.lookup("Entries");
// Get a reference from this to the Bean's Home interface
BeanHome home = (BeanHome)PortableRemoteObject.narrow(ref, BeanHome.class);
// Create a Bean object from the Home interface
Bean beanObject = home.create();
System.out.println("Unable to create Bean home");
BeanHome should be substituted with your Bean's Home class.
Bean is the interface class to your bean. To remotely use methods of your bean, the client only needs to know the interface and the home and does not nead the class with the actual bean code. Usually when building your EJBs for deployment, you pack what I call a client jar which holds these two classes, while the EJB jar has these and the implemented bean code class (as well as any other support classes). Hope that gives you a start.
Thanks for your help with this, it worked fine.