axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Rhenius (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4792) hidden dead code in org.apache.axis2.context.ConfigurationContext
Date Wed, 04 Aug 2010 12:13:17 GMT
hidden dead code in org.apache.axis2.context.ConfigurationContext
-----------------------------------------------------------------

                 Key: AXIS2-4792
                 URL: https://issues.apache.org/jira/browse/AXIS2-4792
             Project: Axis2
          Issue Type: Improvement
          Components: kernel
    Affects Versions: 1.5.1
            Reporter: Karl Rhenius
            Priority: Trivial


In org.apache.axis2.context.ConfigurationContext are the following lines:

else if (Constants.SCOPE_SOAP_SESSION.equals(scope)) {
                //cleaning the session
                cleanupServiceGroupContexts();
                String serviceGroupContextId = messageContext.getServiceGroupContextId();
                if (serviceGroupContextId != null) {
                    serviceGroupContext =
                            getServiceGroupContextFromSoapSessionTable(serviceGroupContextId,
                                                                       messageContext);
                    if (serviceGroupContext == null) {

                        // TODO: Adding this code so that requests to services deployed in
soapsession scope will work
                        // TODO: However, soapsession functionality is still broken
                        serviceGroupContext =
                                new ServiceGroupContext(this,
                                                        axisService.getAxisServiceGroup());
                        serviceGroupContext.setId(serviceGroupContextId);
                        addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
//                        throw new AxisFault("Unable to find corresponding context" +
//                                            " for the serviceGroupId: " + serviceGroupContextId);
                    }
                }


The code tries to get a ServiceGroupContext through getServiceGroupContextFromSoapSessionTable().
This method throws an AxisFault, if it can't find an context, so if (serviceGroupContext ==
null) can never be true.

On a side note: the dead code would behave completely different than Axis does at the moment,
because it would create a new ServiceGroupContext with the given id instead of throwing a
fault and rejecting a request with a non-existing serviceGroupId.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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