users@websocket-spec.java.net

[jsr356-users] Re: [jsr356-experts] Re: Package naming and arrangement

From: Danny Coward <danny.coward_at_oracle.com>
Date: Wed, 12 Dec 2012 13:31:04 -0800

Hi Arun,

On 12/12/12 11:59 AM, Arun Gupta wrote:
> Danny,
>
> In Java EE 6, javax.servlet.annotation and javax.xml.bind.annotation
> are the only two packaged that have annotations separated out. All
> other technologies (JAX-RS, CDI, EJB, JAX-WS, etc) have them in the
> same packages. It makes sense to flatten out
> javax.websocket.annotations to javax.websocket package.
Yes we put took out the annotation subpackage in did that in an earlier
draft for that reason.

>
> As Mark mentioned, splitting the APIs in two packages does create
> cyclic dependency. OTOH, do you expect only APIs in the client package
> to be bundled for rich client applications ?
Rich client applications will need the javax.websocket.* package, server
applications will need javax.websocket.* and javax.websocket.server.*.

> IMHO the names are intuitive and its only 5 classes. I'd rather keep a
> flat structure with everything in javax.websocket.* package.
OK. Well we are balancing the need not to require server API classes for
rich clients, which really pulls us in the direction of needing a
separate package to make the separation between the models clean.

We may well have more server specific classes in future releases too !

- Danny
>
> Thanks,
> Arun
>
> On 12/12/12 3:49 AM, Mark Thomas wrote:
>> On 12/12/2012 00:33, Danny Coward wrote:
>>
>> <snip/>
>>
>>> This is what the API would look like in this (final?) package
>>> structure:-
>>>
>>> javax.websocket.server.*
>>> - DefaultServerEndpointConfiguration
>>> - ServerEndpointConfiguration
>>> - ServerContainer
>>> - WebSocketEndpoint
>>> - WebSocketPathParam
>>>
>>> javax.websocket.*
>>> -<everything else>
>>>
>>> Let me know if anyone sees any issues with this arrangement.
>> One very minor nit is that it creates a circular dependency between the
>> two packages. It could be broken by having separate ContainerProviders
>> for client and server. I'm on the fence as to whether this is worth
>> doing.
>>
>> Mark
>>
>


-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation