1 Reply Latest reply on Mar 17, 2012 9:03 PM by Guillaume Grossetie

    EJB reference resolvers in AS7

    Guillaume Grossetie Newbie



      I would like to know if there's any plan to port the EJB reference resolvers mechanism in AS7 : https://github.com/jbossejb3/jboss-ejb3-ejbref-resolver/blob/master/ejb31-impl/src/main/java/org/jboss/ejb3/ejbref/resolver/ejb31/impl/EJB31MetaDataBasedEjbReferenceResolver.java


      My need is to resolve the JNDI name with only the interface name.




        • 1. Re: EJB reference resolvers in AS7
          Guillaume Grossetie Newbie

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