Ruby and EJavaBeans with RJB

Discussion in 'Ruby' started by Andre Ferreira, May 9, 2007.

  1. Hi,

    i'm analyzing the possibility of calling a EJB from ruby code,
    in order to fetch sets of information from remote server.

    Does anyone have done this before?
    I' m having trouble in translating the following piece fof code.

    Context ctx = new InitialContext(env);
    Object narrowFromObj = ctx.lookup();
    userSessionHome = (UserSessionHome) PortableRemoteObject.narrow(
    narrowFromObj, ejbRemoteHomeClass);

    to

    narrowfromobj = init_context.lookup(remoteHomeJndiName)
    portable_remote = Rjb::import('javax.rmi.PortableRemoteObject')
    portable_remote.narrow narrowfromobj, ejbRemoteHomeClass

    and i get the following error:

    " method missing : Fail: unknown name 'narrow' (RuntimeError) "

    I would be glad to resolve this issue, i´m trying to integrate a RoR app
    with in j2ee environment.

    Thanks!

    André

    --
    Posted via http://www.ruby-forum.com/.
    Andre Ferreira, May 9, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adam Keys

    rjb and Java 1.5

    Adam Keys, Mar 10, 2006, in forum: Ruby
    Replies:
    0
    Views:
    87
    Adam Keys
    Mar 10, 2006
  2. raf
    Replies:
    0
    Views:
    112
  3. Shashank Agarwal
    Replies:
    2
    Views:
    140
    Tiago Macedo
    Jun 30, 2008
  4. Wolfram Schobert

    RJB and Null: Fail: unknown method name

    Wolfram Schobert, Aug 10, 2009, in forum: Ruby
    Replies:
    0
    Views:
    120
    Wolfram Schobert
    Aug 10, 2009
  5. Anukul Singhal
    Replies:
    0
    Views:
    149
    Anukul Singhal
    Mar 9, 2010
Loading...

Share This Page