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

Colm O hEigeartaigh commented on CXF-8156:
------------------------------------------

Can you put together a test-case to reproduce the problem?

> 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
(v8.3.4#803005)

Reply via email to