• Post Reply Bookmark Topic Watch Topic
  • New Topic

access Remote EJB from stand Alone Client  RSS feed

 
legan ferg
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to access remote EJB deployed on glass fish server from J2SE stand alone client .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have two steps (assuming its EJB3 you are asking about):
  • Create an InitialContext
  • Look up your EJB in JNDI

  • and that's it.
     
    legan ferg
    Greenhorn
    Posts: 10
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Yes i know that , and i mean EJB 3 , but i couldn't access it .
    when i do JNDI lookup like this.
    MyBean bean = (MyBean ) ic.lookup("MyBean ");
    the IDE an error cannot find sympol MyBean . what should i do ??? it's deployed on glass fish server.
     
    Paul Sturrock
    Bartender
    Posts: 10336
    Eclipse IDE Hibernate Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    the IDE an error cannot find sympol MyBean . what should i do ??? it's deployed on glass fish server.

    It sounds like you may be talking about a compilation error, is this correct? If so, is MyBean in your classpath?
     
    legan ferg
    Greenhorn
    Posts: 10
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    it's a combilation error , but what should i do to add it to class path .

    Should i get the jar of the ejb module i've created and add it . and if yes , i already did it .

    but what should i set in the parameter of the lookup method .
     
    Paul Sturrock
    Bartender
    Posts: 10336
    Eclipse IDE Hibernate Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    This should help.

     
    Don't get me started about those stupid light bulbs.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!