[jboss-dev-forums] [JBoss AS 7 Development] - Re: EJB reference resolvers in AS7

Guillaume Grossetie do-not-reply at jboss.com
Sat Mar 17 20:52:01 EDT 2012


Guillaume Grossetie [https://community.jboss.org/people/grossetieg] created the discussion

"Re: EJB reference resolvers in AS7"

To view the discussion, visit: https://community.jboss.org/message/724512#724512

--------------------------------------------------------------
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.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/724512#724512]

Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120317/b6939a17/attachment.html 


More information about the jboss-dev-forums mailing list