Discussion:
RMI From TomEE to Jboss
Joshua Sharf
2018-07-10 21:29:12 UTC
Permalink
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to do.
We want to make the call from TomEE to the remote EJB,

We're running TomEE Plume 7.0.4, and EAP7.

Thanks for any help you can give us,
Joshua Sharf



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Jonathan S. Fisher
2018-07-10 23:23:10 UTC
Permalink
It's likely possible, but whether or not it's a "good idea" is the better
question :) It might be best to see about getting a consultant from
Tomitribe out there to help you.

The process would be something like, use the JBoss InitialContextFactory
and point it at the remote server. Then, you should be able to use that to
perform a lookup. I don't think there will be a way to use @EJB injection,
unless you did some magic with CDI and the @Produces annotation.

A better way would be to wrap your legacy EJBs with RESTful services so
that way you're platform independent.
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to do.
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
--
Jonathan | ***@gmail.com
Pessimists, see a jar as half empty. Optimists, in contrast, see it as half
full.
Engineers, of course, understand the glass is twice as big as it needs to
be.
Gurkan Erdogdu
2018-07-11 00:15:54 UTC
Permalink
Hi Joshua
AFAIK, it is not possible to propagate RMI call from TomEE to JBoss because
TomEE uses its own remote protocol (for example, you can not propagate
distributed transactions). But, you may use JBoss client JARS in TomEE to
call your EJBs in JBoss.
Regards.
Gurkan
Post by Jonathan S. Fisher
It's likely possible, but whether or not it's a "good idea" is the better
question :) It might be best to see about getting a consultant from
Tomitribe out there to help you.
The process would be something like, use the JBoss InitialContextFactory
and point it at the remote server. Then, you should be able to use that to
A better way would be to wrap your legacy EJBs with RESTful services so
that way you're platform independent.
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to do.
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
--
Pessimists, see a jar as half empty. Optimists, in contrast, see it as half
full.
Engineers, of course, understand the glass is twice as big as it needs to
be.
Romain Manni-Bucau
2018-07-11 05:02:34 UTC
Permalink
Hi

If you have the client API it will work as in any app (spring apps always
do that and it will be exactly the same in tomee).

You can even do fun stuff like proxying the jboss calls with an endpoint
redirecring the streams or redirecting an ejbd (tomee) rmi call to jboss
either using a plain client or extenal jndi provider to inject the remote
context config. Not sure it is good compared to having a plain client but
very doable.

Romain
Post by Gurkan Erdogdu
Hi Joshua
AFAIK, it is not possible to propagate RMI call from TomEE to JBoss because
TomEE uses its own remote protocol (for example, you can not propagate
distributed transactions). But, you may use JBoss client JARS in TomEE to
call your EJBs in JBoss.
Regards.
Gurkan
Post by Jonathan S. Fisher
It's likely possible, but whether or not it's a "good idea" is the better
question :) It might be best to see about getting a consultant from
Tomitribe out there to help you.
The process would be something like, use the JBoss InitialContextFactory
and point it at the remote server. Then, you should be able to use that
to
injection,
Post by Jonathan S. Fisher
A better way would be to wrap your legacy EJBs with RESTful services so
that way you're platform independent.
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to
do.
Post by Jonathan S. Fisher
Post by Joshua Sharf
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
--
Pessimists, see a jar as half empty. Optimists, in contrast, see it as
half
Post by Jonathan S. Fisher
full.
Engineers, of course, understand the glass is twice as big as it needs to
be.
Howard W. Smith, Jr.
2018-07-11 11:52:52 UTC
Permalink
Post by Jonathan S. Fisher
A better way would be to wrap your legacy EJBs with RESTful services
so that way you're platform independent.
+1 I like this approach... even though I am running 2 separate TomEE's on
same machine, they communicate via RESTful services and have been working
really well; I'm sure the code I wrote helps as well.

Jonathan Gallimore
2018-07-11 09:24:33 UTC
Permalink
You can certainly make remote calls to JBoss in the same way you would do
with a regular client. You'd need to include the JBoss client jars, and use
the appropriate URL and context factory in your InitialContext. This should
be a reasonable approach.

JBoss itself has the concept of an ExternalContext which effectively maps
an external JNDI into a local one. TomEE doesn't have its own equivalent
that I know of, but it might be possible to come up with something similar.
If I get a chance later this week I'll see if I can hack something up.

Jon
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to do.
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Romain Manni-Bucau
2018-07-11 09:31:10 UTC
Permalink
The "Referencing a bean in another server" part of
http://tomee.apache.org/ejb-refs.html should already enable several cases.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le mer. 11 juil. 2018 à 11:24, Jonathan Gallimore <
Post by Jonathan Gallimore
You can certainly make remote calls to JBoss in the same way you would do
with a regular client. You'd need to include the JBoss client jars, and use
the appropriate URL and context factory in your InitialContext. This should
be a reasonable approach.
JBoss itself has the concept of an ExternalContext which effectively maps
an external JNDI into a local one. TomEE doesn't have its own equivalent
that I know of, but it might be possible to come up with something similar.
If I get a chance later this week I'll see if I can hack something up.
Jon
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to do.
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Jonathan Gallimore
2018-07-11 09:40:16 UTC
Permalink
Ah - wonder why I haven't seen that before. Thanks for the note. I'll see
if I can throw an example here.
Post by Romain Manni-Bucau
The "Referencing a bean in another server" part of
http://tomee.apache.org/ejb-refs.html should already enable several cases.
Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> | Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/
rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-
ee-8-high-performance>
Le mer. 11 juil. 2018 à 11:24, Jonathan Gallimore <
Post by Jonathan Gallimore
You can certainly make remote calls to JBoss in the same way you would do
with a regular client. You'd need to include the JBoss client jars, and
use
Post by Jonathan Gallimore
the appropriate URL and context factory in your InitialContext. This
should
Post by Jonathan Gallimore
be a reasonable approach.
JBoss itself has the concept of an ExternalContext which effectively maps
an external JNDI into a local one. TomEE doesn't have its own equivalent
that I know of, but it might be possible to come up with something
similar.
Post by Jonathan Gallimore
If I get a chance later this week I'll see if I can hack something up.
Jon
Post by Joshua Sharf
Is there a way to make an RMI call *from* a TomEE server *to* a JBoss EJB? I
know we can set up TomEE to host EJBs, but that's not what we want to
do.
Post by Jonathan Gallimore
Post by Joshua Sharf
We want to make the call from TomEE to the remote EJB,
We're running TomEE Plume 7.0.4, and EAP7.
Thanks for any help you can give us,
Joshua Sharf
--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-
f979441.html
Loading...