I am working on an application that utilizes a Message Driven Bean for sending e-mails. One thing I wanted to do was move most of the application constants to a constants file to make maintaining the application easier.
I tried to move the propertyValues for things like the mappedName, acknowledgeMode, destinationType, etc to a constants file, and use a static import to reference them, but that seemed to cause an error when trying to compile the application:
JMS resource not created
When I went back and removed the constants and used hardcoded strings it worked. So, my question is, in dealing with EJB's(or maybe annotations in general), must these properties be hardcoded?