[WEBSOCKET_SPEC-51] Unify annotation and programmatic API programming models Created: 26/Oct/12  Updated: 17/Nov/12  Resolved: 17/Nov/12

Status: Resolved
Project: websocket-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: jitu Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: v008

 Description   

There needs to be one programming model. This will help to write an endpoint class and be deployed in standalone or Java EE environments.

The endpoint class can be based on the annotations.
@WebSocket("/echo")
public class Echo {
...
}

1. The deployment in EE happens via DD(if anything needs to be configured/overwritten what is there in annotations). Many cases DD is optional. And we don't have to do DD in the first release. Just war the endpoints, deploy the war to app server.

2. In the standalone case a deployment is driven by a programmatic API to configure things(if any). It will take the same endpoint class (which is annotated) that worked in EE. Annotation processing is happening only one time and saying that we don't use annotated endpoints for standalone deployment doesn't make sense. For e.g see javax.xml.ws.Endpoint class for JAX-WS standalone deployment. In this case,

Endpoint e = Endpoint.publish("ws://localhost:8080/echo", Echo.class) // Same class with annotations
...
e.stop();

Of course, certain features that are available in EE cannot be done(or optional) in standalone. JAX-WS/JAX-RS followed this programming model successfully. This will help moving things from one deployment model to another easily. Easy to test. Developers don't have to learn two programming models.



 Comments   
Comment by dannycoward [ 17/Nov/12 ]

See the comment for TYRUS-14 - we will continue with POJOs and Endpoint subclasses.

We have a deployment API for client and server which meets the needs of developers.

We scan WAR files for POJOs, no requirement for any other scanning.

Comment by dannycoward [ 17/Nov/12 ]

Resolved in v008.

Generated at Fri Apr 28 18:01:20 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.