You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/10/20 12:40:50 UTC
DO NOT REPLY [Bug 23932] New: -
Custom-made Handlers changes from request to response flow when thread priority is lowered
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23932>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23932
Custom-made Handlers changes from request to response flow when thread priority is lowered
Summary: Custom-made Handlers changes from request to response
flow when thread priority is lowered
Product: Axis
Version: 1.0
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Basic Architecture
AssignedTo: axis-dev@ws.apache.org
ReportedBy: espen.dietrichs@storebrand.no
I have configured axis, via the wsdd-file, to include a custom-made loghandler.
This loghandler is configured to be part of the request-stream.
1. I coded the handler and run it within axis. So far, so good. No problem.
2. Thereafter, I adjusted the handler facilitating that it would start as a
separate thread. The thread was set to default priority. Still it functioned
very well.
3. In a production environment I would normally like to start this logthread as
a low-priority thread. Therefore I set the thread to low priority. But by doing
this, adjusting the priority from default to low, the response was logged
instead of the request!!!
WSDD-file:
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:ns1="DummyWebService">
<service name="DummyWebService" provider="java:RPC">
<requestFlow>
<handler name="LogH" type="java:eqd.start.webservice.LogH">
</handler>
</requestFlow>
<parameter name="className" value="eqd.start.webservice.DummyWebService" />
<parameter name="allowedMethods" value="execute" />
<beanMapping qname="ns1:DummyDO" xmlns:ns1="urn:DummyWebService"
languageSpecificType="java:eqd.start.webservice.DummyDO"/>
</service>
</deployment>
Custom-made handler:
public class LogH extends BasicHandler {
public void invoke(MessageContext messageContext) throws AxisFault {
try {
if (messageContext != null) {
LogThread logThread = new LogThread
(messageContext);
Thread thread = new Thread(logThread);
thread.setPriority(Thread.MIN_PRIORITY);
thread.start();
}
}
catch (Exception e) {
throw AxisFault.makeFault(e);
}
}
}