axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thamarai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5777) AxisConfiguration is NULL
Date Wed, 08 Jun 2016 05:06:20 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320008#comment-15320008
] 

Thamarai commented on AXIS2-5777:
---------------------------------

Hi,

Please let us know if any update/suggestion on this.


> AxisConfiguration is NULL
> -------------------------
>
>                 Key: AXIS2-5777
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5777
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.7.2
>            Reporter: Rajesh
>         Attachments: AxisClient.zip
>
>
> Hi,
> Am using the axis2 1.7.2
> I have deployed the axis2.war in the tomcat and started the service. The StockQuoteService
can be listened via the below url
> http://localhost:8080/axis2/services/StockQuoteService
> I have created a client to request that service (Attached the complete project zip).

> To trigger multiple requests, I have invoked the client call method in the For loop from
main method
> To avoid creating the multiple connections, am caching the http client and reusing it.
> When I run the program with this setup, around 46 requests are executed successfully
and returning the response. After that NPE in thrown.
> After investigating about it, found that the JVM is expelling the ServiceClient object
> ==========================================================
> ServiceClient.java
> ==========================================================
>     protected void finalize() throws Throwable {
>         try {
>             cleanup();
>         } finally {
>             super.finalize();
>         }
>     }
>     public void cleanup() throws AxisFault {
>         // if a configuration context was created for this client there'll also
>         //  be a service group, so discard that
>         if (!createConfigCtx) {
>             String serviceGroupName = axisService.getAxisServiceGroup().getServiceGroupName();
>             AxisConfiguration axisConfiguration = configContext.getAxisConfiguration();
>             AxisServiceGroup asg = axisConfiguration.getServiceGroup(serviceGroupName);
>             if ((asg != null) && removeAxisService) {
>                 axisConfiguration.removeServiceGroup(serviceGroupName);
>             }
>         } else {
>             configContext.terminate();
>         }
>     }
> ==========================================================
>     When the finalize method is called, it is invoking the cleaup method which again
calls the terminate method of ConfigurationContext. Because of this 
>     AxisConfiguration in the ConfigurationContext is becoming NULL.
>     Once this cleanup is done, the subsequent requests are not able to process due to
empty AxisConfiguration returned from ConfigurationContext.
> This whole issue is due to reusing the HttpClient. When the HttpClient is not reused,
this error is not thrown.
> But as per our project requirement, we will be getting multiple requests from the end
user and we need to reuse the HttpClient.
> Kindly advice at the earliest, as we are facing this issue in the production



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message