Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Beans > Re: reusable Se...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 1326 of 1397
Post > Topic >>

Re: reusable SessionBean

by Sascha Effert <fermat@[EMAIL PROTECTED] > Oct 15, 2007 at 11:03 AM

EricF wrote:
 
> In the past, I had a static member of a SLSB and initialized it if null.
> This may not be the best way now.
> 
> Someling like:
> 
> public class MyBean implements SessionBean {
>         private static Hashtable data;
> 
>         private void init ejbCreate()  {
>                 if (data == null)
>                         initdata();
>         }
>         ....
> }
> 
> What you mightwant to look at is storing your data using JNDI and
populate
> it at the server startup. You shoul be able to inject it into your bean
if
> using EJB3.
> 
> Eric

Hi,

its so easy... I thought it is not possible to use static fields in EJBs.
I
will try it.

thanks a lot

Sascha Effert
 




 3 Posts in Topic:
reusable SessionBean
Sascha Effert <fermat@  2007-10-12 11:08:48 
Re: reusable SessionBean
efriedNoSpam@[EMAIL PROTE  2007-10-13 04:29:03 
Re: reusable SessionBean
Sascha Effert <fermat@  2007-10-15 11:03:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 3:57:13 CDT 2008.