Dear ranchers,
I am new to EJB.I need some help in designing the code.
1. I have some variables which should be used across the business methods.
So can i declare them as static and initialize them in a static block (like we use in normal
java program).
But one of the posts here mentioned that , Its not suggestible to use static (R/W) variables .Only read only static variables should be declared as "static final".
Then in that case if i declare my variables as normal class variables how can i initialize them. (ejbCreate() ..?)
And i am not sure how to use ejbCreate() method in
EJB 3.0.Could you please mention the syntax.
2. As per my logic the At the time of initialization it self I have to call a database function to fetch one initial value and store in of the variables.
Could you mention me where to call this class (which calls the data base function and fetch the new value) in EJB after initialization.
All the logic i have implemented in JAVA.
Please give me some inputs
Thanks in advance.
Regards,
chandra