Forum: Ruby Ruby and EJBs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fc7c80c5cfa60f2003237fafb3c613d8?d=identicon&s=25 unknown (Guest)
on 2006-03-10 23:09
(Received via mailing list)
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.
788622ab7e1f792ca653eeacbe5c1db3?d=identicon&s=25 rcoder (Guest)
on 2006-03-11 00:44
(Received via mailing list)
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
B2561fdd05855be51aca982c54eb9f81?d=identicon&s=25 John N. Alegre (Guest)
on 2006-03-11 19:55
(Received via mailing list)
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
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles O Nutter (Guest)
on 2006-03-15 22:07
(Received via mailing list)
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 be
pretty slick (and we'd certainly like to see a proof-of-concept :) ).
Fc7c80c5cfa60f2003237fafb3c613d8?d=identicon&s=25 unknown (Guest)
on 2006-03-15 22:56
(Received via mailing list)
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
F1d37642fdaa1662ff46e4c65731e9ab?d=identicon&s=25 Charles O Nutter (Guest)
on 2006-03-17 07:28
(Received via mailing list)
Well, drb is "distributed ruby", a remoting mechanism provided with
standard
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.
This topic is locked and can not be replied to.