Suppose I wanted to make a portable extension that observed all EJB deployments in an ear file, where those EJB deployments might come from several ejb jars inside it. Where would I place this portable extension to see all EJB deployments for that .ear file?
Right now, I have it packaged in a library jar, available in the ear's lib directory. The jar file in question has a META-INF/services entry, of course, and an empty META-INF/beans.xml file in it. However, on Glassfish 3.1 b09, my extension--which gets a BeanManager and otherwise behaves normally--does not see any EJBs in the BeanManager's getBeans(Object.class) output. It sees a lot of other Weld internal stuff, but, again, no EJBs.
Is this something that is possible, or...?
Thanks,
Laird
An approach is to make sure your library jar can see each of the EJB jars - i.e. use the Manifest.
Or better, ask on the GlassFish forums - they will be able to recommend the right approach ;-)