Hi all,
I am sending you this mail to suggest a new type of scope to the axis
webservice.
I am developing a webservice and I discovered that I need a new type of
scope to grow the performance of my webservice.
Probably, you have thought on this, and you have a good reason to not
implement it.
However, I will describe my webservice.
My webservice provides a service, that makes available a method which
receives two identifiers (two integers) and a string that contains a
xml. This method makes the following tasks;
- Parse the xml (using xerces);
- Validate the xml against a xml schema;
- Evaluate some xpath expressions (using xalan);
- Invoke an oracle store procedure, which inserts the xml in an
Oracle queue, if the xml is in accordance with the XML schema.
As you can see, the method provided is very simple.
So, my service has a Request scope, which creates a new instance of the
class, each time is made a new Request.
As you now, instantiating new classes is a heavy operation, because it
is necessary to allocate memory, and reusing old instances is a good
practice.
So, what I suggest is to develop a "Classes pool" scope, that creates a
number of instances at startup, and reuse them each time a new request
comes.
This new type of scope must be configured, with some parameters, e.g:
- Minimum number of instances;
- Minimum idle instances;
- Maximum number of instances;
- and others ....
To make this reutilization possible, all the deployed classes must have
a reset method which cleans the object, making the object ready for
reutilization.
Regards,
Rui Torres