Henri Gomez wrote:
Working in the financial area, I manage number which should be exact, so I used BigDecimal instead of double or Double.
Could it be extended to :
else if (obj instanceof Double || obj instanceof Float || obj instanceof BigDecimal)
{
startElement("double");
write(obj.toString());
endElement("double");
}
See the commit message to this list for the changes I made to support this in a more generic manner. To support your scenario, you will need to extend DefaultTypeFactory and override isXmlRpcDouble() and provide your own implementation. Then, call XmlWriter.setTypeDecoder() to use your type decoder instead of the default.
You will also need to use the TypeFactory support in addition to this to ensure that <double> is decoded as BigDecimals when responses come back.
Great.
Also, I notice the worker are created but never released, it is normal ?
The workers are pooled. If there are a lot of workers it means that a lot of requests are being processed.
Yes, I understand that, under heavy load the number workers of is increased but they are never removed when the load fall.
For example in jakarta-tomcat-connectors, used by Tomcats, there is a Thread pool which increase to follow load but they are recycled and removed when the load decrease.
The idea will be to have :
min workers, max workers, idle workers.
You could have up to max workers, never less than min workers and ensure that there is no more than X idle workers.
Just my .1 EUR ;)