Hey, guys, if someone could land me a hand...:
I have a Web Application that uses a Proxy/Service Locator to find out this SLSB, hiding all the looking-up paraphernalia from the client
Servlet. The data is accessed by this servlet via a static method. Something like this:
Servlet:
doPost(...) {
...
String data = XYZProxy.getData();
...
}
XYZProxy (Service Locator):
public static String getData() {
XYZ_SB remote;
XYZ_SBHome home;
... lookup stuff ...
return XYZ_SB.getData();
}
My question is: does the static access to the Service Locating method affect the overall performance of my Enterprise Application? Having in mind that the multiple Servlet threads will be accessing concurrently this method, even in a situation that we don't have any persistent state, could this make the JVM unnecessarily busy by hanndling the access to this method? Would it be better if I let this method an instance one and instantiate the XYZProxy class, so each
thread would have control over its own instance? Or am I saying any newbie bull%#@?
Thanks a lot in advance,
Alessandro Martins