I'm not sure what you are asking, so if the following doesn't answer your
question, please rephrase it.
I typically have a class named Constant, and in the class I place a lot of
static final fields. Then in my EJB code, I have statements like:
MyEjb ejb = (MyEjb)context.lookup(Constant.FOO);
Yes this is exactly how I want too use it.
Thanks.
Now, another question:
Because I will need this "constant" outsite the EJB and because the bean
definition is not availlable outside, How can I define this constant?
I use XDoclet to generate my classes and interfaces. Is there a way to tell it
You used the term "constant". Do you mean something like this:
public static final String FOO = "something";
public static final int BAR = 123;
If so, feel free to use these in EJBs, as static finals (constants) of the
basic data types and strings are perfectly acceptable.
View the original po