-
1. Re: Remote EJB Invocation from Switchyard
ozkin Nov 26, 2014 7:57 AM (in response to egor.erofeev)Have you tried using a combination of
@Produces
and@EJB
annotations to define a remote service first and then inject it into SwitchYard service using@Inject?
Here are few links, may be it helps:
Injecting with @EJB or @Inject?
http://docs.jboss.org/weld/reference/1.0.0/en-US/html/resources.html#d0e4373
http://docs.jboss.org/weld/reference/1.0.0/en-US/html/resources.html#d0e4410
P.S. Sorry, I haven't tried it myself.
-
2. Re: Remote EJB Invocation from Switchyard
erhard Nov 29, 2014 6:59 PM (in response to egor.erofeev)The tricky part is to get the classes from the JBoss-5 client-libraries and from EAP6/Switchyard separated. I tried this in jboss-examples/remote-eap5-tests at master · ErhardSiegl/jboss-examples · GitHub with a JBoss-Module, which I call from a servlet (WAR). I had the problem, that JNDI and EJB-libraries always used the WAR-classloader instead of the module-classloader. Appearently since they use the context-classloader. When I changed the context-classloder before and after each call to JBoss5, it worked. See the README for the setup.
Maybe you can encapsulate the EJB-calls in separate components an call them via SCA-bindings.