Ruby and EJBs

L

lepage

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.
 
R

rcoder

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
 
J

John N. Alegre

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
 
C

Charles O Nutter

------=_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 :) ).

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--
 
L

lepage

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
 
C

Charles O Nutter

------=_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.

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--
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top