The recommended way is to use the "env-entry" part of the ejb-jar.xml file. (Check DTD for where to put it).
For example with the following: (taken from 1.1 EJB spec)
You can look up the value with:
Context initCtx = new InitialContext();
Context myEnv = (Context)initCtx.lookup("java:comp/env");
// Get some more environment entries. These environment
// entries are stored in subcontexts.
String val1 = (String)myEnv.lookup(“foo/name1”);
This is the "standard" way to do things.
However, sometimes I have went with property files that contains the values instead. Mostly because we felt if would be simpler for users to change values using them.