How to look up a bean on Remote Machine


EJB programming & troubleshooting: How to look up a bean on Remote Machine

  1. How to look up a bean on Remote Machine (2 messages)

    I have created a simple bean and its client is running fine if I run it on the server itself. But now when I try to run my client from some remote machine it give me an error that import package not found because that package is there on server. I don't no how to call the bean which is running on the server from the client on the remote machine.

    Thanks & Regards,
    Vishal (Vishal at ThatOne dot com)
  2. How to look up a bean on Remote Machine[ Go to top ]


    It is very simple:

    You must have an enterprise Bean Client Jar file and set it in your class path of client.

    To generate this EJB client jar file you can use the Deploy tool of some appserver or you can refer to that appServer doc for the resolution (how to make Client jar file)

    Hope this will help.
  3. Hi,
    i have the same problem but i'm not be able to solve it.
    Could you help me?

    Would i have to generate the EJB client jar file with the Deploy tool on the server or on the client(on the remote machine) ?

    Would i have to start the "j2ee server" on the server?

    Would i have to set the jar file in my class path of client in this way:
    set CPATH=.;%J2EE_HOME%\lib\j2ee.jar;ConverterAppClient.jar
    and to execute the class client (on the remote machine) in this way:
    C:\jdk1.2.2\bin\java -classpath "%CPATH%" ConverterClient ?

    At the moment when I run the client code which invoke EJB error occured:

    Caught an unexpected exception!
    javax.naming.CommunicationException: Can't find SerialContextProvider

    at com.sun.enterprise.naming.SerialContext.getProvider(

    at com.sun.enterprise.naming.SerialContext.<init>(

    at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(

    at javax.naming.spi.NamingManager.getInitialContext(

    at javax.naming.InitialContext.getDefaultInitCtx(

    at javax.naming.InitialContext.init(

    at javax.naming.InitialContext.<init>(

    at ConverterClient.main(

    thanks in advance

    Simone Boccaccio