Hi all,
I have many JavaBeans utilities classes with static methods which I use for a stand-alone web-application application.
Now I'd like to deploy the application in a cluster. What will be the impact ?
Can I reuse my utility classes with static methods ?
Thanks a lot
Francesco
-
Can I call static methods in a cluster ? (3 messages)
- Posted by: fmarchioni fmarchioni
- Posted on: January 29 2004 10:42 EST
Threaded Messages (3)
- Can I call static methods in a cluster ? by Andre Fernandes on January 29 2004 13:10 EST
- >Can I call static methods in a cluster ? by fmarchioni fmarchioni on January 30 2004 05:45 EST
- Can we have services and dao method as static in cluster by Narayana V.V. on March 08 2007 09:09 EST
- >Can I call static methods in a cluster ? by fmarchioni fmarchioni on January 30 2004 05:45 EST
-
Can I call static methods in a cluster ?[ Go to top ]
- Posted by: Andre Fernandes
- Posted on: January 29 2004 13:10 EST
- in response to fmarchioni fmarchioni
No problem at all if you keep an eye for wich classloader is loading these classes. If you have static instances (like singletons) you can have nasty surprises.
If your "util.jar" is in the server classpath, there will be only one class loading (i.e. a singleton would be shared by ALL applications in this server) in this JVM.
If your "util.jar" is replicated in each WEB-INF/lib, these classes will be loaded by each application classloader (i.e. there would be one singleton instance for each application - this is the way Struts MUST be loaded, for example). -
>Can I call static methods in a cluster ?[ Go to top ]
- Posted by: fmarchioni fmarchioni
- Posted on: January 30 2004 05:45 EST
- in response to Andre Fernandes
Hi,
thanks for your answer.
Actually I'm not accustomed with the practice of adding libs in the classpath (in the development phase at least) yet, I'm interested to give it a try.
I have a further question about utils instantiated with listeners (like Servlet context) but I I'd like to open a new thread for it.
Tks again
Francesco -
Can we have services and dao method as static in cluster[ Go to top ]
- Posted by: Narayana V.V.
- Posted on: March 08 2007 09:09 EST
- in response to fmarchioni fmarchioni
We are developing an application for the client .The environment is on weblogic and with hardware cluster Our application follows simple MVC-2 framework with struts implementation .We have simple service layer and DAO layer associated with it .The service layer and DAO layer consist of the all static method .The implementation works for single server do u foresee any issues in the cluster especially at service and DAO layer. Should we think on redesigning the services and DAO layer? Please suggest us best practices Narayana Sr Technical Consultant