[jboss-user] [JBossWS] - Are ports reusable/concurrent?
jorgemoralespou_2
do-not-reply at jboss.com
Wed Oct 1 10:53:39 EDT 2008
Hi, I'm developing an application with JBossWS, and using it as server and as client, invoking some other webservices in other servers.
Doing tunning of my app, I have found that too much time is spent every time I invoke getPort on a service, as it seems that everytime is generating the port on the fly.
2008-10-01 15:46:18,103:org.jboss.ws.core.jaxws.spi.ServiceDelegateImplCannot get port meta data for: {http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms|
2008-10-01 15:46:18,103:org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilderSTART: rebuildMetaData|
2008-10-01 15:46:18,103:org.jboss.ws.metadata.umdm.EndpointMetaDatasetParameterStyle: null|
2008-10-01 15:46:18,103:org.jboss.ws.metadata.umdm.EndpointMetaDataCreate new config [name=Standard Client,file=META-INF/standard-jaxws-client-config.xml]|
2008-10-01 15:46:18,103:org.jboss.ws.metadata.config.JBossWSConfigFactorygetConfig: [name=Standard Client,url=META-INF/standard-jaxws-client-config.xml]|
2008-10-01 15:46:18,103:org.jboss.ws.metadata.config.JBossWSConfigFactoryparse: file:/C:/jboss-4.2.3/core/server/som/deploy/jbossws.sar/META-INF/standard-jaxws-client-config.xml|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointConfigMetaDataConfigure EndpointMetaData|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointConfigMetaDataAdded 0 PRE handlers|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointConfigMetaDataAdded 0 ENDPOINT handlers|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointConfigMetaDataAdded 0 POST handlers|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointMetaDatasetParameterStyle: WRAPPED|
2008-10-01 15:46:18,181:org.jboss.ws.metadata.umdm.EndpointMetaDataUsing default style: document|
2008-10-01 15:46:18,213:org.jboss.ws.metadata.umdm.EndpointMetaDatasetParameterStyle: WRAPPED|
2008-10-01 15:46:18,228:org.jboss.ws.metadata.umdm.EndpointMetaDatasetParameterStyle: WRAPPED|
2008-10-01 15:46:18,228:org.jboss.ws.metadata.umdm.EndpointMetaDatasetParameterStyle: WRAPPED|
2008-10-01 15:46:18,244:org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilderJAXBContext [types=[class com.hp.som.ws.parlayx21.sms.send.SendSms_Type, class com.hp.som.ws.parlayx21.sms.send.SendSmsResponse, class com.hp.som.ws.parlayx21.common.PolicyExceptionInfo, class com.hp.som.ws.parlayx21.common.ServiceExceptionInfo, class com.hp.som.ws.parlayx21.sms.send.SendSmsRingtone, class com.hp.som.ws.parlayx21.sms.send.SendSmsRingtoneResponse, class com.hp.som.ws.parlayx21.common.PolicyExceptionInfo, class com.hp.som.ws.parlayx21.common.ServiceExceptionInfo, class com.hp.som.ws.parlayx21.sms.send.SendSmsLogo, class com.hp.som.ws.parlayx21.sms.send.SendSmsLogoResponse, class com.hp.som.ws.parlayx21.common.PolicyExceptionInfo, class com.hp.som.ws.parlayx21.common.ServiceExceptionInfo, class com.hp.som.ws.parlayx21.sms.send.GetSmsDeliveryStatus, class com.hp.som.ws.parlayx21.sms.send.GetSmsDeliveryStatusResponse, class com.hp.som.ws.parlayx21.common.PolicyExceptionInfo, class com.hp.som.ws.parlayx21.common.ServiceExceptionInfo],tns=http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface]|
2008-10-01 15:46:18,478:org.jboss.ws.metadata.umdm.OperationMetaDataFound best matching java method: public abstract java.lang.String com.hp.som.ws.parlayx21.sms.send.SendSms.sendSms(java.util.List,java.lang.String,com.hp.som.ws.parlayx21.common.ChargingInformation,java.lang.String,com.hp.som.ws.parlayx21.common.SimpleReference) throws com.hp.som.ws.parlayx21.common.PolicyException,com.hp.som.ws.parlayx21.common.ServiceException|
2008-10-01 15:46:18,478:org.jboss.ws.metadata.umdm.OperationMetaDataFound best matching java method: public abstract java.lang.String com.hp.som.ws.parlayx21.sms.send.SendSms.sendSmsRingtone(java.util.List,java.lang.String,com.hp.som.ws.parlayx21.common.ChargingInformation,java.lang.String,com.hp.som.ws.parlayx21.sms.common.SmsFormat,com.hp.som.ws.parlayx21.common.SimpleReference) throws com.hp.som.ws.parlayx21.common.PolicyException,com.hp.som.ws.parlayx21.common.ServiceException|
2008-10-01 15:46:18,509:org.jboss.ws.metadata.umdm.OperationMetaDataFound best matching java method: public abstract java.lang.String com.hp.som.ws.parlayx21.sms.send.SendSms.sendSmsLogo(java.util.List,java.lang.String,com.hp.som.ws.parlayx21.common.ChargingInformation,byte[],com.hp.som.ws.parlayx21.sms.common.SmsFormat,com.hp.som.ws.parlayx21.common.SimpleReference) throws com.hp.som.ws.parlayx21.common.PolicyException,com.hp.som.ws.parlayx21.common.ServiceException|
2008-10-01 15:46:18,509:org.jboss.ws.metadata.umdm.OperationMetaDataFound best matching java method: public abstract java.util.List com.hp.som.ws.parlayx21.sms.send.SendSms.getSmsDeliveryStatus(java.lang.String) throws com.hp.som.ws.parlayx21.common.PolicyException,com.hp.som.ws.parlayx21.common.ServiceException|
2008-10-01 15:46:18,509:org.jboss.ws.metadata.umdm.EndpointMetaDataUsing default encoding style: literal|
2008-10-01 15:46:18,572:org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilderEND: rebuildMetaData
ServiceMetaData:
qname={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms
refName=null
wsdName=null
wsdlFile=null
wsdlLocation=null
jaxrpcMapping=null
publishLocation=null
securityConfig=null
properties=null
TypesMetaData:
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSms,javaType=com.hp.som.ws.parlayx21.sms.send.SendSms_Type]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSmsResponse,javaType=com.hp.som.ws.parlayx21.sms.send.SendSmsResponse]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}PolicyException,javaType=com.hp.som.ws.parlayx21.common.PolicyExceptionInfo]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}ServiceException,javaType=com.hp.som.ws.parlayx21.common.ServiceExceptionInfo]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSmsRingtone,javaType=com.hp.som.ws.parlayx21.sms.send.SendSmsRingtone]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSmsRingtoneResponse,javaType=com.hp.som.ws.parlayx21.sms.send.SendSmsRingtoneResponse]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSmsLogo,javaType=com.hp.som.ws.parlayx21.sms.send.SendSmsLogo]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}sendSmsLogoResponse,javaType=com.hp.som.ws.parlayx21.sms.send.SendSmsLogoResponse]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}getSmsDeliveryStatus,javaType=com.hp.som.ws.parlayx21.sms.send.GetSmsDeliveryStatus]
[complexType={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/interface}getSmsDeliveryStatusResponse,javaType=com.hp.som.ws.parlayx21.sms.send.GetSmsDeliveryStatusResponse]
|
2008-10-01 15:46:18,572:org.jboss.ws.metadata.umdm.EndpointMetaDataConfigure SOAPBinding|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplinitHandlerChain: PRE|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplinitHandlerChain: ENDPOINT|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplinitHandlerChain: POST|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplgetHandlerChain: [type=PRE,info=[service={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,port={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplgetHandlerChain: [type=POST,info=[service={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,port={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.handler.HandlerResolverImplgetHandlerChain: [type=ENDPOINT,info=[service={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,port={http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms,binding=http://schemas.xmlsoap.org/wsdl/soap/http]]|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.binding.BindingImplsetHandlerChain: []|
2008-10-01 15:46:18,572:org.jboss.ws.core.jaxws.spi.ServiceDelegateImplNo port configuration for: {http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service}SendSms|
I don`t know if this is the correct usage pattern, or I should reuse the obtained Port.
I have browse the tests and examples, but I haven`t been able to get a conclusion.
Also, requests made to obtained port, must be done with different endpoint,timeout in some requests from other, so I don`t know If I should pool obtained port for every endpoint, and use pooled instances. Also, If I have 2 concurrent requests to send to same pooled port, is it going to have any problem, or it is thread safe?
Now I'm doing a static service, and using as this:
| private String send(...params...){
| SendSmsService service = new SendSmsService(null, qname);
| SendSms stub = service.getSendSms();
| stub.getRequestContext().put(StubExt.PROPERTY_CLIENT_TIMEOUT,1000);
| stub.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ...);
| response = stub.sendSms(...params....);
| return response;
| }
| ...
| And, the getSendSms in the port is:
| public class SendSmsService extends Service{
| ....
| public SendSms getSendSms() {
| return (SendSms)super.getPort(new QName("http://www.csapi.org/wsdl/parlayx/sms/send/v2_2/service", "SendSms"), SendSms.class);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179831#4179831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179831
More information about the jboss-user
mailing list