Hello,
I wrote my own handler (extends BasicHandler) that is used to log web
service requests and responses to a database.

I modelled it after the  org.apache.axis.handlers.LogHandler class, which
comes with axis (source here:
http://kickjava.com/src/org/apache/axis/handlers/LogHandler.java.htm ).

Because that class uses instance variables (e.g. startTime to be able to
write elapsed time to log), I assumed that a new instance of each handler
is created for each web service call, so the Handler itself did not need to
be threadsafe. But I am seeing some strange behaviour that could be caused
by concurrent access to the same Handler instance (e.g. requests and
responses not matching up, etc.)

Can someone tell me if my Handler implementation needs to be made
threadsafe (if so we should probably file a bug against LogHandler)?  Note
I would probably correct my code by carefully utilizing ThreadLocal
variables.

Thanks
michael lucas  |  Java/WebSphere/Portal Specialist

"Say not in grief that she is no more, but say in thankfulness that she
was. A death is not the extinguishing of a light, but the putting out of
the lamp because the dawn has come." - Rabindranath Tagore

Reply via email to