users@tyrus.java.net

Re: Migration to 1.0-b09

From: Stepan Kopriva <stepan.kopriva_at_oracle.com>
Date: Mon, 21 Jan 2013 17:22:52 +0100

Hi Max,

you are right - currently there is no way how to pass an instance to server. I also think that we should keep this functionality.

Can you please file this in our issue tracking system: http://java.net/jira/browse/TYRUS

Thanks,
Stepan


On Jan 21, 2013, at 3:49 PM, Max Bureck <maxbureck_at_arcor.de> wrote:

> Hello,
>
> I just tried to update to Tyrus 1.0-b09 from b08. This is a simple standalone Application, not running inside an application server. Before, I was able to pass an instance of Endpoint to a org.glassfish.tyrus.server.DefaultServerConfiguration which was then passed to a org.glassfish.tyrus.server.Server.
>
> With the new version I can't pass instantiated Endpoints to the Server anymore. I can only pass the class object of the Endpoint to the Server (via DefaultServerConfiguration) and the Server instantiates the class. But I need to do some configuration on the Endpoint instance. So if there is no way to pass Endpoint objects to the server, I either have to get control over the way classes get instantiated in the Server or I have to get access to the Endpoint Instances after the server was started to configure the Instance afterwords. Since we want to have as little dependencies as possible it would be no alternative to use CDI to inject configuration into the Endpoint.
> Or is there any other way I am not aware of?
>
> Best Regards,
> Max