users@glassfish.java.net

problem with annotation after adding ejb-jar.xml

From: <glassfish_at_javadesktop.org>
Date: Wed, 30 Apr 2008 08:26:45 PDT

I am developing my first application on glassfish.

Its ear, there are some session beans. One of them is webservice.

I've been using only annotations.
I wanted to have possibility to define some properties that can be change without recompiling application. I've first thought that can be put in some properties file, but I realized that <env-entry> in ejb-jar.xml is a good place to put such kind of properties.

But after adding simple ejb-jar.xml with one session bean mentioned and <env-entry> for it annotations were no longer interpreted.
All annotations are now ignored. @EJB for example, there is no injection. References are null.

When I delete ejb-jar.xml everything is fine.

I've read in many places (books, forum) that deployment descriptors can override annotations, but not turn off other setting.

Am I doing something wrong?
Is there any configuration in glassfish to turn on both annotations and deployment descriptors?
[Message sent by forum member 'przemekp' (przemekp)]

http://forums.java.net/jive/thread.jspa?messageID=272242