This content has been marked as final.
Show 1 reply
-
1. Re: EJB reference resolvers in AS7
grossetieg Mar 17, 2012 9:03 PM (in response to grossetieg)I found a way to programmatically resolve EJB at runtime by listing all the bindings:
InitialContext ic = new InitialContext(); final NamingEnumeration<Binding> bindingNamingEnumeration = ic.listBindings("java:module");
Then I search through the list to pick the first binding corresponding to my interface name.
Is there a better/faster/cleaner way to achieve this ? If there's an open task, I can work on a solution and send a pull request... ?
Thanks,
Guillaume.