Simon Mc Glynn wrote:
I don't think that's deprecated. Personally I didn't use that approach because I had lots of difficulties using EJBClientContext.setSelector(this.selector) because I was trying to invoke EJB's in one container instance from inside another instance. Firstly the setSelector has permissions locked from the security manager and secondly the JTS couldn't commit the transaction. The transaction manager commit runs in another thread with another classloader and I had no control over the client context it tries to use.
Right you would have to use reflection to access our selector:
https://github.com/jbossas/jboss-as/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/remote/TCCLEJBClientContextSelectorService.java
And then do some kind of alter connect change and restore. Unfortunately due to a bug, you would have to control the transaction manually.
If you are using JTS though, and you want to participate in container transactions on the client side (the one making the remote call) you could look at using IIOP, it allows you to dynamically register a connection.
I have bookmarked your usecase with the work we are doing in EJBCLIENT-34. I hope to make sure it is covered without any hacking.