Static block issue. 2004-09-29 - By Manish Malhotra
Back Hi All,
If Im creating an object from a Session Bean. Singleton pattern is used to create this Object. There is one static block in this class.
Now my question is if n no. of beans create the object of this class in the same JVM. Then its static block would be called only once. Is this correct? Please let me know from your all good side.
And Im using this class to start one TimerTask thread to refresh my cache after fixed amount of delay. Please comment on this design also. Actually Bean is the entry point of my application so I cant start this. I can call another helper class to start the thread but its more or less same.
So, plz give me your comments / help as its highly required.
Many Thanks. regards, Manish
Manish Malhotra Patni Computer Systems Ltd Vashi Infotech Park, Tower-1 (See http://wer-1.ora-code.com), Unit No.:141/151, 11P Above Vashi Railway Station, Vashi Navi Mumbai-400705 (See http://bai-400705.ora-code.com), India Tel: +91 22 55910849 Extn: 235 Fax:+91 22 55910855
=========================================================================== To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|