[ 
https://issues.apache.org/jira/browse/TUSCANY-3712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922003#action_12922003
 ] 

Brent Daniel commented on TUSCANY-3712:
---------------------------------------

My take on this is that it's probably not being handled correctly. Two 
endpoints are being exposed because there are two services created. Instead, 
there should probably be an exception thrown by the runtime because the 
component service Service1WS should not exist in the component type. 

Section 8.2.1 of the JCI spec states that a class annotated with @WebService 
should be treated as if it had an @Service annotation. If an implementation 
class has an @Service annotation, we would not add services to the component 
type for its remotable interfaces. In this case, despite the presence of a 
@WebService annotation, we are adding a service to the component type for each 
interface annotated with @WebService (or @Remotable.)  

The simple fix here would be to change the code in the implementation-java 
ServiceProcessor class to check for @WebService on the implementation class in 
addition to @Service and not create a component type service if it's present. 
However, this would cause the current test case to break, so we should probably 
follow up with OASIS and get clarification on this. 

Note that if the implementation class and service interface were using matching 
name attributes on their @WebService annotations, the runtime would correctly 
expose one service (resulting in a single endpoint.) 




> JCA_11003 Endpoints being created for each @WebService annotation
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-3712
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3712
>             Project: Tuscany
>          Issue Type: Bug
>          Components: OASIS Compliance - OASIS
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Brent Daniel
>
> This otest defines a component implementation with @WebService annotation in 
> both the service interface and the service implementation class. It looks 
> like an endpoint is exposed bot both....
> INFO: Added Servlet mapping: 
> http://9.20.188.155:8080/TEST_JCA_11003Component1/Service1WS
> 11-Oct-2010 08:59:10 
> org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
> INFO: Add endpoint - (@28442439)Endpoint:  URI = 
> TEST_JCA_11003Component1#service-binding(Service1WS/Service1WS)
> 11-Oct-2010 08:59:10 org.apache.tuscany.sca.http.jetty.JettyServer 
> addServletMapping
> INFO: Added Servlet mapping: 
> http://9.20.188.155:8080/TEST_JCA_11003Component1/service1ImplWS
> 11-Oct-2010 08:59:10 
> org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
> INFO: Add endpoint - (@4365289)Endpoint:  URI = 
> TEST_JCA_11003Component1#service-binding(service1ImplWS/service1ImplWS)
> Is this correct?

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

Reply via email to