0 Replies Latest reply on Feb 7, 2013 11:14 AM by wildes oliveira

    programatic lookup ejb session beans

    wildes oliveira Newbie

      INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)

      INFO: WELD-000900 1.1.8 (Final)

       

      Is there one way to dynamically select a collections of ejbs ?

      Have two stateteless session beans deployed on EAR and this logic follow does not works, the iterator is always empty.

       

       

          @Produces

          public <T> ServiceManager<T> createInstance(InjectionPoint ip, @Any Instance<EjbInterface<?>> instances) {

              Iterator<EjbInterface<?>> ejbs = instances.select(ip.getAnnotated().getAnnotation(EjbAnnotated.class).value()).iterator();

              /*

               * return delegate bean

               */

          }

       

       

      Thanks.

       

      Att, Wildes.