When you say JavaBean, I presume you mean an Enterprise JavaBean.... am I
missing something or doesn't that mean that you'll need an EJB container
as well as your servlet container?

If not, then what do you mean by JavaBean?

Catherine

> Another more elegent solution is to implement a counter JavaBean and load it
> into memory when the web server is started. Your servlet will simply access this
> bean instance to read/update the counter. This way you don't even need to worry
> about anything that you are not sure about servlet. There are many ways to
> ensure that the JavaBean instance is unique during the life span of the web
> server, and obviously you still need to implement the bean as a persistent
> object.
>
>
>
> Cheers,
>
>
> Charles
>
>
>
>
>
>
>
> Bo Xu <[EMAIL PROTECTED]> on 11/03/2000 05:59:53 PM
>
> To:        [EMAIL PROTECTED]
> cc:         (bcc: Charles Chen/YellowPages)
> From:      Bo Xu <[EMAIL PROTECTED]>, 3 November 2000, 5:59 p.m.
>
> Re: Single Thread Model..  [Scanned by Yellow Pages PostMaster]
>
>
> Nic Ferrier wrote:
>
> > Why are these problems?
>
> ...
>
> //*********************************************
> Charles Chen wrote:
>
> > Contact:   Tel: 2726  -  New Media Systems, 1st Floor South, Queens Walk
> >
> > Hope I have copied your typing style right ;-)
>
> ...
>
> ok :-)   I will try my best to improve my English and I will stop to use [...]
> immediately to let my email easily to be read :-)    sorry for [...]  :-)
>
> But I still have a question :
>
> If I have a int static class field  whose default value is 0 in  my
> Servlet class, and , I suppose I want to use it as a counter of
> all the client accessings to this Servlet class,  so between
> the first accessing  to I close the Servlet engine, can I always
> get the accessing times by this int static class field? is it very
> safe?
>
> I think there are other ways to solve it : for example, often saving
> this field into
> a persistent media.  But if I don't do it, can I be sure that I can
> trust this counter?    This is my question about Servlet_thread-safety :-)
>
> If you don't think it is a problem(because we can solve it with
> other ways), then I agree with you.     But I want to know if
> we can solve it only by Servlet:-)   so I think it is a problem,
> and I need to ask this question to try to know the answer :-)
>
> If you can solve  my problem  only by  Servlet ,  I will
> go to buy some very good CDs and send to you if
> you like,  and thanks very much  :-)
>
> BTW, this problem is not in my work , I am a JMF developer ,
> but I am very interested in it :-)   If it is in my work, I will try
> to solve it by myself with other way :-)
>
> Thanks in advance!
>
> Bo
> Nov.03, 2000
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to