struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject RE: The class variable reference null problem
Date Fri, 01 Jun 2007 10:41:13 GMT
--- Kapil Sharma <kapil.sharma@iap-online.com> wrote:
> public class ClsAction extends Action {
>   public static GraphicsServer myServer = null;
>   Actionforward execute(){
>     if(myServer == null)
>       myServer  =
>         ClsInitializeServer.getInitializeInstance();
>    }
> }

Just make sure this is what you really want to do...

There is (normally) only one instance an an Action in
an S1 applicaton, this means there is only one
instance  of the GraphicsServer, being shared by
everybody.

That *may* be exactly what you want, but check.

d.



 
____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message