Ruby and EJBs

Discussion in 'Ruby' started by lepage@gmail.com, Mar 10, 2006.

  1. Guest

    Hello All,

    I know this topic has been somewhat addressed in the past but I would
    really appreciate further help.

    I want to call a function that is available as an EJB. Both ruby and
    the EJB are run on my localhost. The EJB takes two parameters, a
    hashmap and an XML string. I'm familiar with Ruby on Rails and have
    been learning it but this is my first attempt to integrate it with an
    enterprise system. I purchased "Enterprise integration with Ruby" by
    Maik Schmidt but have been unable to draw a clear explaination of how
    this can be done.

    If anyone can help me out in any way, I will be sure to fully document
    my progress and create a tutorial when I am finished and successful. I
    will also thank you :)

    Thanks in advance,

    T.
    , Mar 10, 2006
    #1
    1. Advertising

  2. rcoder Guest

    In order to directly invoke EJB methods from Ruby, you'll need to use
    RMI-over-IIOP, which allows CORBA clients to invoke methods on Java RMI
    servers, including EJBs. However, there doesn't seem to have been much
    activity on the Ruby/CORBA front in the last couple of years, as web
    services have stolen most of CORBA's thunder outside of legacy
    enterprise applications.

    It would probably be more reasonable to write a web services adapter
    that re-exported the EJB methods you wanted to make available to your
    Ruby code via SOAP or XML-RPC. You may want to start with the Sun
    documentation on JAX-RPC, the standard web services implementation for
    Java.

    -Lennon
    rcoder, Mar 10, 2006
    #2
    1. Advertising

  3. What Lennon said.

    Faced with the exact situation six months ago we found the fastest thing was
    to rewrite the EJB with a SOAP wrapper (it was not that hard) and then use
    Ruby to talk SOAP.

    john

    wrote:

    > Hello All,
    >
    > I know this topic has been somewhat addressed in the past but I would
    > really appreciate further help.
    >
    > I want to call a function that is available as an EJB. Both ruby and
    > the EJB are run on my localhost. The EJB takes two parameters, a
    > hashmap and an XML string. I'm familiar with Ruby on Rails and have
    > been learning it but this is my first attempt to integrate it with an
    > enterprise system. I purchased "Enterprise integration with Ruby" by
    > Maik Schmidt but have been unable to draw a clear explaination of how
    > this can be done.
    >
    > If anyone can help me out in any way, I will be sure to fully document
    > my progress and create a tutorial when I am finished and successful. I
    > will also thank you :)
    >
    > Thanks in advance,
    >
    > T.
    John N. Alegre, Mar 11, 2006
    #3
  4. ------=_Part_1054_27542196.1142456772372
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    One plan we have for JRuby is to provide a way to access EJBs using a
    DRb-type layer. Currently no work is being done on that, but if you were to
    put JRuby on the server and handle piping EJB requests over DRb, it would b=
    e
    pretty slick (and we'd certainly like to see a proof-of-concept :) ).

    On 3/10/06, <> wrote:
    >
    > Hello All,
    >
    > I know this topic has been somewhat addressed in the past but I would
    > really appreciate further help.
    >
    > I want to call a function that is available as an EJB. Both ruby and
    > the EJB are run on my localhost. The EJB takes two parameters, a
    > hashmap and an XML string. I'm familiar with Ruby on Rails and have
    > been learning it but this is my first attempt to integrate it with an
    > enterprise system. I purchased "Enterprise integration with Ruby" by
    > Maik Schmidt but have been unable to draw a clear explaination of how
    > this can be done.
    >
    > If anyone can help me out in any way, I will be sure to fully document
    > my progress and create a tutorial when I am finished and successful. I
    > will also thank you :)
    >
    > Thanks in advance,
    >
    > T.
    >
    >
    >



    --
    Charles Oliver Nutter @ headius.blogspot.com
    JRuby Developer @ jruby.sourceforge.net
    Application Architect @ www.ventera.com

    ------=_Part_1054_27542196.1142456772372--
    Charles O Nutter, Mar 15, 2006
    #4
  5. Guest

    Hey,

    Charles>>
    I like the sound of the challenge. Where can I read up about this DRb
    layer you speak of?

    Basically, I need a shove because I'm stuck on the theoretical aspect
    of this. I've never done enterprise integration with Ruby. My current
    job mainly consists of writing technical training materials, so
    anything I am able to develop will definately be written out and I'll
    be sure to make anything I learn public.

    rcoder & John>>
    I'm a little unsure which direction to take. I have the EJB running and
    I now have some classes that *should* communicate with the EJB (is this
    what you mean by rewrite the EJB with a SOAP wrapper?). Should I be
    making Ruby try to communicate with these classes now? How does SOAP
    fit into this picture?

    Thanks guys!
    tony
    , Mar 15, 2006
    #5
  6. ------=_Part_1258_32125868.1142576720779
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    Well, drb is "distributed ruby", a remoting mechanism provided with standar=
    d
    Ruby. It would be a good analog to how EJBs are used, and providing a drb
    proxy to EJBs using JRuby would be fun and useful. I'm certainly no drb
    expert though, nor do I have time right now to work on such a wondrous
    beast.

    On 3/15/06, <> wrote:
    >
    > Hey,
    >
    > Charles>>
    > I like the sound of the challenge. Where can I read up about this DRb
    > layer you speak of?
    >
    > Basically, I need a shove because I'm stuck on the theoretical aspect
    > of this. I've never done enterprise integration with Ruby. My current
    > job mainly consists of writing technical training materials, so
    > anything I am able to develop will definately be written out and I'll
    > be sure to make anything I learn public.
    >
    > rcoder & John>>
    > I'm a little unsure which direction to take. I have the EJB running and
    > I now have some classes that *should* communicate with the EJB (is this
    > what you mean by rewrite the EJB with a SOAP wrapper?). Should I be
    > making Ruby try to communicate with these classes now? How does SOAP
    > fit into this picture?
    >
    > Thanks guys!
    > tony
    >
    >
    >



    --
    Charles Oliver Nutter @ headius.blogspot.com
    JRuby Developer @ jruby.sourceforge.net
    Application Architect @ www.ventera.com

    ------=_Part_1258_32125868.1142576720779--
    Charles O Nutter, Mar 17, 2006
    #6
    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. Taki

    applet, ejbs and MVC

    Taki, Dec 13, 2003, in forum: Java
    Replies:
    4
    Views:
    779
  2. John
    Replies:
    3
    Views:
    307
  3. Alex Molochnikov
    Replies:
    2
    Views:
    342
    Alex Molochnikov
    Apr 21, 2005
  4. the Rat
    Replies:
    2
    Views:
    370
    Jon Martin Solaas
    Mar 11, 2006
  5. Andreas Bauer
    Replies:
    0
    Views:
    325
    Andreas Bauer
    Apr 26, 2006
Loading...

Share This Page