concept endpoint in category ejb

This is an excerpt from Manning's book EJB 3 in Action, Second Edition.
Suppose you have a legacy application that needs to send messages to an MDB. You can do this by implementing a JCA-compliant adapter/connector that includes support for message inflow contract. Once your JCA resource adapter or connector is deployed to a Java EE container, you can use the message inflow contract to have an asynchronous message delivered to an endpoint inside the container. A JCA endpoint is essentially the same as a JMS destination—it acts as a server proxy to an MDB (a message consumer/listener in JMS terms). As soon as a message arrives at the end point, the container triggers any registered MDBs listening to the endpoint and delivers the message to it.
Before we dive into the server API, we need to spend a few minutes discussing threading and security. Unlike Servlets, a WebSocket endpoint is created for each client that initiates a connection. An endpoint is thus stateful and serves only one client. It’s possible to override this behavior by supplying a ServerEndpointConfi.Configurator object that implements the getEndPointInstance() method. This method returns an instance of the WebSocket endpoint to be used for a new connection.
Annotated endpoints are much easier but less flexible than programmatic endpoints. With an annotated endpoint, all configuration is performed via annotations. The annotations mark the class that’s to be used as the endpoint, lifecycle callback methods, and methods that are to process messages. All of the functionality for the endpoint, lifecycle, and message processing is combined into a single Java object.
The @ServerEndpoint annotation is the annotation that marks a class as being a WebSocket endpoint. The container scans the class path at startup looking for classes with this annotation. Besides identifying the class as a WebSocket endpoint, it also configures the URI for the endpoint, as well as the encoders and decoders to be used when processing a message. The annotation is defined as follows:
@Retention(value = RetentionPolicy.RUNTIME) @Target(value = {ElementType.TYPE}) public @interface ServerEndpoint { public String value(); public String[] subprotocols() default {}; public Class<? extends Decoder>[] decoders() default {}; public Class<? extends Encoder>[] encoders() default {}; public Class<? extends ServerEndpointConfig.Configurator> configurator() default ServerEndpointConfig.Configurator.class; }The parameters to the annotation configure the endpoint:
value— The URI of the endpoint