Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Static block issue.

Static block issue.

2004-09-29       - By Manish Malhotra

 Back
Reply:     1     2     3     4     5     6     7     8     9     10  

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".

©2008 junlu.com - Jax Systems, LLC, U.S.A.