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 ?
Thanks,
Guillaume.