Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

EJB: Is it possible to run a client without using 'runclient', using Sun's RI?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Sun's J2ee reference implementation server.
I have built a j2ee application consisting of some session EJBs and a 'stand alone' client that connects to them and provides a GUI.
I use 'deploytool' to create the EJB and client JAR files, their deployment descriptors and to deploy the EJBs to the J2EE server.
I use 'runclient' to run the client.
Everything works fine when testing the application (client and EJBs) all on one local machine.
BUT: I wish to convert my 'stand alone' client to an applet (that will obviously br run from within a browser over the internet), which i have attempted without complete success - I am unable to connect to the EJBs. I am attempting to find the ENC of the j2ee server by using the following JNDI InitialContext properties:
java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtx java.naming.provider.url=iiop://[hostIdentifier]:1050
(where [hostIdentifier] = IP or DNS name of the machine that the j2ee server is running on)
I am able to create an InitialContext (using the above properties), but am unable to find the ENC when using: initialContext.lookup("java:comp/env") I am assume this is because the JNDI names of the EJBs (and thus the ENC) have not been bound to the J2ee server's naming service, as they would have if 'runclient' had been used.
Is it possible to access an EJB without using runclient? and more specifically, from an applet?
 
reply
    Bookmark Topic Watch Topic
  • New Topic