From: <glassfish_at_javadesktop.org>
Date: Thu, 27 Dec 2007 06:49:19 PST
I don't think it's available for ejbs to find out their own names, but there're a couple of possible solutions to work it around:
- Use getClass().getAnnotation(MessageDriven.class)).name
- Parse ejb-jar.xml file with jaxb or similar - the file is accessible from the classloader the bean is in - getClass().getResourceAsStream("META-INF/ejb-jar.xml")