Hi,

I did some optimizations for the Axis2 POJO web services as an intern
project in last two months. It was a research type project and its idea was
to handle POJO web services without  using Java Reflection to improve the
response time.
The method I followed to accomplish it was, when a POJO service is
deployed, Axis2 generates a code which contains the logic to invoke that
service. To generate this code Java reflection is used. In the run time
service is invoked through the generated code for that service.
The generated code is like the code is like the code generated by wsdl2java
tool using ADB. So the idea was to achieve the performance of ADB services
for POJO services by this. In wsdl2java tool code is generated as .java
files. But in this case those had to be generated as .class files because
those have to be invoked at runtime. To do this I used a Java bytecode
library called JavaAssist.
Currently this new michanisam support most of the Java types like,
primitives, Strings, arrays, lists, maps, enums, Java beans and data
handlers. But its not mature enough like the existing mechanism and
therefor i integrated it with the existing mechanism instead of replacing
it. To use this new method a parameter can be added to the service
descriptor like below.
<parameter name=optimizedPOJO> true </parameter>. If this is included
service invocation will done using the new mechanism and other wise
usual procedure will be followed.
Following is a rough performance comparison for the new mechanism and the
existing mechanism for a simple POJO service.

n (c=20) Current (req/second)        Method          New Method (req/second)
100                                             602.9            1492.69
1000                                           2345.09         3619.91
10000                                         5636.28         7969.06
50000                                         5842.15         7828.96

I like to contribute this code to the axis2 project and I think it is
suitable to start a new branch for this and merge it to the trunk when it
is mature enough. Also I like discuss about this new mechanism in detail in
this thread if any clarification needed .

Thank you,
Prabhath

Reply via email to