Thanks Sahoo for your quick answer.
I have only one SendMailRemote class in my packages. I investigated further and think that it has to do with the packaging of my project.
The packaging schema is this:
[pre]
EAR contains:
ejb module: SendMailBean.class
web module: references SendMailBean locally
jar-file with SendMailRemote.class
[/pre]
The jar file contains just the Remote interface class. This helps me to reference the bean using the remote interface from other ejb, web and ear modules. The jar file (which i call RIF-jar which stands for [b]R[/b]emote [b]I[/b]nter[b]F[/b]ace) is then packaged in the referencing module so the class loader can successfully load and instantiate the remote interface class. This construction works for some ejb modules in use.
When I move the SendMailRemote class to the EJB-jar everything works fine and I can see the JNDI entries. When the SendMailRemote class resides in the RIF-jar it does not show up and the generated ejb-jar.xml is wrong.
I also took the corresponding <session> part from the generated ejb-jar.xml file, corrected it and put it into the ejb-jar.xml of my EJB module. After that everything is fine.
But I think it's an error in glassfish's generator that generates the deployment descriptor from the annotations.
Alexander.
[Message sent by forum member 'sahlix' (sahlix)]
http://forums.java.net/jive/thread.jspa?messageID=223016