in ejb-jar.xml: <env-entry> (environment entry) look for ejb-jar.xml examples or documentation from the net.
This is inefficient, because you have to look them up from JNDI. Besides, these are internal application constants, not deployment-specific parameters, for which the env-entry mechanism is designed.
I use to put them in an interface that I implement in the class that needs the constants...
It's just the way I do this, I don't arg it is "THE WAY"!
You can also put them in a public class with a private constructor to avoid any instanciation and use static final variables.
I suggest you to download the petstore example for j2ee from java.sun.com if you hadn't done it.
They placed JNDI and other (database related) constants into a util package at the same level to the ejb package.
For example if you have
com.company.product.comp.ejb package, your constants can be put into the
com.company.product.comp.util package where you place files like JNDINames.java or DatabaseNames.java