geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Problem while calling EJB3
Date Wed, 06 Jun 2007 04:37:53 GMT
Hi ,
    I have written a Stateless session bean using EJB3 specification and 
deployed the same in the Geronimo Application Server (Version  2.0 M-3).
The code for remote business interface is as follows
import javax.ejb.Remote;


public interface IHelloWorld {
    public void printHello();

The Bean class is as follows

import javax.ejb.Stateless;
@Stateless(name = "IHelloWorld")
public class HelloWorldBean implements IHelloWorld {

    public void printHello()
        System.out.println("Hello World");

Now wen I am writing a standalone application (not in same JVM). I am 
getting name not found exception. The client code is as follows.

public class TestTheEjb3 {

    static   IHelloWorld helloworldfascade;
    public static void main(String args[])

          InitialContext ic;
               //Setting the JNDI properties
               Properties props = new Properties();
               //For geronimo
               props.put(" credentials", "manager");
               props.put("java.naming.provider.url", "");
               ic=new InitialContext(props);
               System.out.println("------------->Search Fascade Lookup");

           catch(Exception ex)


Please let me know how to call the same from a standalone application like 
this running on different JVM.

Thanks & Regards,
Saibal Kumar Ghosh | Consultant | Mail : | 
Office : 91.33.2341.3234 | Fax : +91.33.2357.3395 | Cell : 91.9433536366 | | 

The information transmitted is intended only for the person or entity to 
which it is addressed and may contain confidential and/or privileged 
material.  Any review, retransmission, dissemination or other use of, or 
taking of any action in reliance upon, this information by persons or 
entities other than the intended recipient is prohibited.   If you 
received this in error, please contact the sender and delete the material 
from any computer.
View raw message