[jira] [Commented] (CXF-8156) Incorrect service name displayed in logs during Runtime Exception

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (CXF-8156) Incorrect service name displayed in logs during Runtime Exception

ASF GitHub Bot (Jira)

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

Swathantra Kumar N commented on CXF-8156:

# Create 2 or 3 services annotated with @path annotation.
 # Make sure to write one of the service such that it throws run time exception in some cases
 # LOAD Test the service mentioned in step 2 using SOAP UI tool.
*Note:* We may need to run this load test multiple times in order to see the issue.

Issue: Instead of getting the service mentioned in the step 2 within logs, we get the other unrelated services within the failure logs.

> Incorrect service name displayed in logs during Runtime Exception
> -----------------------------------------------------------------
>                 Key: CXF-8156
>                 URL: https://issues.apache.org/jira/browse/CXF-8156
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Swathantra Kumar N
>            Priority: Major
> This is with reference to the ticket CXF-2538, wherein the service name was appended to the exception stack trace logs. For this getName() of the JAXRSServiceImpl was used to get the name of the service.
> In getName() method, when the serviceName and address properties are null, then we pick up first record in the classResourceInfos list. In scenarios where there are multiple endpoints and I am not setting the serviceName property while constructing JAXRSServiceImpl which happens in initializeServiceModel() of JAXRSServiceFactoryBean. Because, there isn't a specific service that I can initialize during the service factory creation(I have multiple rest services). In these scenarios, when I request a service and the service throws Runtime exception, In the logs I see an incorrect Service Name being displayed due to the fact that we are hardcoding to pick the first item in the classResourceInfos.
> Is there a specific purpose of hardcoding to pick the first item in the list ? I feel there should be a logic to determine the particular Service name which I requested, may be CXF-5360 where there is a discussion of selecting an appropriate service name using ResourceComparator when there are multiple rest services could be used to decide on the serviceName ?

This message was sent by Atlassian Jira