[jboss-user] [Beginners Corner] - Re: EJB entity with static final field

2006-11-29 Thread PeterJ
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);

[jboss-user] [Beginners Corner] - Re: EJB entity with static final field

2006-11-29 Thread buggsbunny101
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

[jboss-user] [Beginners Corner] - Re: EJB entity with static final field

2006-11-28 Thread PeterJ
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