<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBoss 5.1.0 GA web-service client problem when stress testing
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/grosueugen">Eugen Grosu</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/564760#564760">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We are using JBoss 5.1.0 GA, jdk 1.5_22, Solaris 10.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>We have implemented a wsdl-to-java EJB3.0 web-service endpoint and have generated the client artifacts using wsconsume. These artifacts are included in a client project - a war that includes a Servlet that calls the endpoint using the generated WS client.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The web-service project is deployed as an ejb jar, which is included into an .ear.</p><p>The war project (the ws client) is deployed in the same JBoss configuration as the .ear.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>For testing, we implemented an HttpClient that calls the Servlet, which calls the EJB3.0 endpoint.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Everything is working well, until performing testing with 100 threads, each sending a request 50 times.</p><p>We first created a new WS Client instance for every request, but then we decided to create a pool of these instances to gain performance.</p><p>We can not reuse the same instance because the WS Client is not thread-safe.</p><p><span>For the pool, we used </span><a class="jive-link-external-small" href="http://commons.apache.org/pool/" target="_blank">http://commons.apache.org/pool/</a><span>.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here is the code that creates a new instance:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-family: Arial; ">public Object makeObject() {<br/>&#160;&#160;&#160;&#160;&#160; OurEnpointWSService service = new </span><span style="font-family: Arial; ">OurEnpointWSService</span><span style="font-family: Arial; ">();<br/>&#160;&#160;&#160;&#160;&#160; BindingProvider bp = (BindingProvider) service;<br/>&#160;&#160;&#160;&#160;&#160; bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);<br/>&#160;&#160;&#160;&#160; </span><span style="font-family: Arial; ">OurEnpoint </span><span style="font-family: Arial; ">port = service.getOurEndpointWSPort();&#160; <br/>&#160;&#160;&#160;&#160;&#160; return port;<br/> }</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>At some point, after running the tests 3-4 times, we receive a lot of errors:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2010-09-29 14:44:04,980 ERROR [org.jboss.ws.core.CommonClient] (http-0.0.0.0-8080-305) Exception caught while (preparing for) performing the invocation: <br/><span>javax.xml.ws.soap.SOAPFaultException: Unqualified {</span><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a><span>}Client fault</span><br/>&#160;&#160;&#160; at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)<br/>&#160;&#160;&#160; at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)<br/>&#160;&#160;&#160; at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:579)<br/>&#160;&#160;&#160; at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:381)<br/>&#160;&#160;&#160; at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)<br/>&#160;&#160;&#160; at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)<br/>&#160;&#160;&#160; at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)<br/>&#160;&#160;&#160; at $Proxy569.execute(Unknown Source)<br/>&#160;&#160;&#160; at com.orvaal.ucipPlugin.web.IgwServlet.service(IgwServlet.java:127)<br/>&#160;&#160;&#160; at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br/>&#160;&#160;&#160; at com.orvaal.ucipPlugin.web.filter.IgwFilter.doFilter(IgwFilter.java:54)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br/>&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br/>&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)<br/>&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)<br/>&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br/>&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)<br/>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)<br/>&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)<br/>&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)<br/>&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:595)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I searched for a couple of days on the net, but no luck.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If someone can help me, I would be very greatful.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in advance.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Eugen.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/564760#564760">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>