jbossws on jboss 4.0.4CR2 performance issue
amshapira May 10, 2006 5:16 AMHi,
I had a test of comparing webservice performance with jbossws on jbos 4.0.4 and jboss.net over jboss 3.2.5
I found out that jbossws was working much slower (!!!).
here is the bean:
package com.ams.webservicesejb.obj; import java.rmi.RemoteException; import java.util.Date; import javax.ejb.EJBException; import javax.ejb.SessionBean; import javax.ejb.SessionContext; public class AmsItemManagerBean implements SessionBean{ public AmsItem[] getAmsItemArray(boolean bool1, String str1, String str2, boolean bool2, boolean bool3) throws RemoteException { AmsItem[] amsItems = new AmsItem[1000]; short shrt = 1; long lng = 2; String str = "ejbTest"; long begin = 0; long end = 0; long begin2 = 0; long end2 = 0; AmsItem[] utia; begin2 = System.currentTimeMillis(); int rounds = 1000; for (int i=0; i<rounds; i++) { AmsItem amsItem = new AmsItem(str,lng,shrt,shrt,str,str,1,new Date(),shrt,new Date(),shrt,new String[5]); amsItems = amsItem; } end2 = System.currentTimeMillis(); System.out.println("returning amsItem[] with length:" + amsItems.length + " in "+ (end2-begin2) + " ms"); return amsItems; } public void setSessionContext(SessionContext ctx) throws EJBException, RemoteException { } public void ejbRemove() throws EJBException, RemoteException { System.out.println("AmsItemManagerBean removed"); } public void ejbActivate() throws EJBException, RemoteException { System.out.println("AmsItemManagerBean activate"); } public void ejbPassivate() throws EJBException, RemoteException { System.out.println("AmsItemManagerBean passivate"); } public void ejbCreate() throws EJBException, RemoteException { System.out.println("AmsItemManagerBean create"); }; }
Here is the wsdl for jbossws that created by wscompile:
<?xml version="1.0" encoding="UTF-8"?> <definitions name="AmsItemEjbService" targetNamespace="http://obj.ams.webservicesejb.com/" xmlns:tns="http://obj.ams.webservicesejb.com/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://obj.ams.webservicesejb.com/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <schema targetNamespace="http://obj.ams.webservicesejb.com/types" xmlns:tns="http://obj.ams.webservicesejb.com/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema"> <complexType name="getAmsItemArray"> <sequence> <element name="boolean_1" type="boolean"/> <element name="String_2" type="string" nillable="true"/> <element name="String_3" type="string" nillable="true"/> <element name="boolean_4" type="boolean"/> <element name="boolean_5" type="boolean"/></sequence></complexType> <complexType name="getAmsItemArrayResponse"> <sequence> <element name="result" type="tns:AmsItem" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType> <complexType name="AmsItem"> <sequence> <element name="ams1" type="string" nillable="true"/> <element name="ams10" type="dateTime" nillable="true"/> <element name="ams11" type="short"/> <element name="ams12" type="string" nillable="true" minOccurs="0" maxOccurs="unbounded"/> <element name="ams2" type="long"/> <element name="ams3" type="short"/> <element name="ams4" type="short"/> <element name="ams5" type="string" nillable="true"/> <element name="ams6" type="string" nillable="true"/> <element name="ams7" type="int"/> <element name="ams8" type="dateTime" nillable="true"/> <element name="ams9" type="short"/></sequence></complexType> <element name="getAmsItemArray" type="tns:getAmsItemArray"/> <element name="getAmsItemArrayResponse" type="tns:getAmsItemArrayResponse"/></schema></types> <message name="AmsItemManager_getAmsItemArray"> <part name="parameters" element="ns2:getAmsItemArray"/></message> <message name="AmsItemManager_getAmsItemArrayResponse"> <part name="result" element="ns2:getAmsItemArrayResponse"/></message> <portType name="AmsItemManager"> <operation name="getAmsItemArray"> <input message="tns:AmsItemManager_getAmsItemArray"/> <output message="tns:AmsItemManager_getAmsItemArrayResponse"/></operation></portType> <binding name="AmsItemManagerBinding" type="tns:AmsItemManager"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="getAmsItemArray"> <soap:operation soapAction=""/> <input> <soap:body use="literal"/></input> <output> <soap:body use="literal"/></output></operation></binding> <service name="AmsItemEjbService"> <port name="AmsItemManagerPort" binding="tns:AmsItemManagerBinding"> <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>