-
1. Re: jboss-ejb-client.xml vs. dynamic ejb receiver registration
jaikiran Jul 13, 2012 7:30 AM (in response to apakhunov)Alexander Pakhunov wrote:
Is it possible to add remoting-ejb-receiver at runtime (e.g. using jboss-ejb-client api http://docs.jboss.org/ejbclient/1.0.5.Final/, using code similar to one in DescriptorBasedEJBClientContextService)?
Yes it is possible. Once you create the remoting connection (with the appropriate remoting APIs) within your application, you can register it as a receiver within the EJB client context as follows:
// this will return the EJB client context that's applicable for your application final EJBClientContext ejbClientContext = EJBClientContext.requireCurrent(); // let's assume you have create a connection dynamically. Let's now add it to the EJB client context so that it gets registered as a receiver ejbClientContext.registerConnection(connectionThatYouCreated);
That's one way of doing it.
-
2. Re: jboss-ejb-client.xml vs. dynamic ejb receiver registration
apakhunov Jul 14, 2012 3:09 AM (in response to jaikiran)Thank you for your answer. It helped a lot, I made it work. I grabbed a piece of code from ConfigBasedEJBClientContextSelector.setupEJBReceivers to initialize connection and registered this connection in
EJBClientContext.requireCurrent()
as you suggested. -
3. Re: jboss-ejb-client.xml vs. dynamic ejb receiver registration
rakshukla Mar 26, 2015 6:45 AM (in response to jaikiran)Could you please provide me pointers on how to create remoting connections from inside my application ? Which are these remoting APIs that I can use to add remote-outboud-connections programmatically ?
Thanks in advance.