What I was thinking (at least in my initial "what if?" thoughts) is
that you'd have something like:
@WebSocketApplication(uri="/bob")
public class Bob { ... }
and then at deploy time, the container would detect that annotation on
the class and hand off the class ref to a handler in glassfish that
would then register this class/uri combo with the WebSocketEngine. This
would prevent developers from having to do sad hacks such as create a
servlet whose sole job is to do that work in its init().
On 7/29/10 9:54 AM, Jerome Dochez wrote:
> On 7/29/10 6:38 AM, Justin Lee wrote:
>> If i wanted to define an annotation so that people could just
>> annotate their websocket application and have glassfish find and deal
>> with that annotation, how would I go about that? Is that even
>> possible? It'd obviously involve at least one new annotation and
>> then a handler. Are we able to hook in to the system like that?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
> it is but I need to understand a few more things...
>
> 1. how would your annotation data be used ? meaning who is responsible
> for handling the annotation contract at runtime ? Is it a deployer ?
> or a container ?
> 2. how would the annotation be used ? in a class ? method ? etc...
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>