Is it possible to deploy multiple jaxrs-services in WINK

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to deploy multiple jaxrs-services in WINK

Pradeep Fernando
hi devs,

May be I'm asking a silly question here. I need to deploy multiple
jaxrs applications in wink runtime.

AFAIK, there is a class that extends jsr311 Application class and
under that there are many resources. (please correct me i'm wrong).
currently in the wink getting started guide I observe .class file
deployment mechanism.

is it possible to support multiple jaxrs application archives (a jar
file or similar, that has a Application class and a set of resources).

As of my current understanding, at the deployment phase wink create a
RequestProcessor, for the provided application and call

requestProcessor.handleRequest(request, response).

looks like I have to maintain a set of requestPrcocessors per each
service and dispatch them according to a context path mapping at a
higher level. Is there a better way of doing this. may be within the
wink runtime itself. ?

what is the extention point where i can process a custom archive
instead of default .class file scan.

any feedback is highly appreciated.
Thanks,
--Pradeep
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to deploy multiple jaxrs-services in WINK

Pradeep Fernando
hi again,

in the DeploymentConfiguration.java I see a method called add
application. I think, this is there behavior I'm expecting. Is there a
tutorial or sample that shows how to deploy more than one application
within jaxrsRuntime.

thanks
--Pradeep.
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to deploy multiple jaxrs-services in WINK

Michael Elman
Administrator
In reply to this post by Pradeep Fernando
If I understand correctly your question, you want to register multiple
Application instances?
You can do it using the org.apache.wink.server.utils.RegistrationUtils
class.



On Wed, Feb 9, 2011 at 1:51 PM, Pradeep Fernando <[hidden email]>wrote:

> hi devs,
>
> May be I'm asking a silly question here. I need to deploy multiple
> jaxrs applications in wink runtime.
>
> AFAIK, there is a class that extends jsr311 Application class and
> under that there are many resources. (please correct me i'm wrong).
> currently in the wink getting started guide I observe .class file
> deployment mechanism.
>
> is it possible to support multiple jaxrs application archives (a jar
> file or similar, that has a Application class and a set of resources).
>
> As of my current understanding, at the deployment phase wink create a
> RequestProcessor, for the provided application and call
>
> requestProcessor.handleRequest(request, response).
>
> looks like I have to maintain a set of requestPrcocessors per each
> service and dispatch them according to a context path mapping at a
> higher level. Is there a better way of doing this. may be within the
> wink runtime itself. ?
>
> what is the extention point where i can process a custom archive
> instead of default .class file scan.
>
> any feedback is highly appreciated.
> Thanks,
> --Pradeep
>
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to deploy multiple jaxrs-services in WINK

Pradeep Fernando
hi

On Wed, Feb 9, 2011 at 5:35 PM, Michael Elman <[hidden email]> wrote:
> If I understand correctly your question, you want to register multiple
> Application instances?
> You can do it using the org.apache.wink.server.utils.RegistrationUtils
> class.

thanks Michael. I think, it has the API calls I'm looking for.

this might sound like a user list bound question.

Is it possible to deploy jaxrs applications as jar file in wink. ?


thanks
--Pradeep.
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to deploy multiple jaxrs-services in WINK

Michael Elman
Administrator
Sure. As long as its in the classpath.

On Wed, Feb 9, 2011 at 2:49 PM, Pradeep Fernando <[hidden email]>wrote:

> hi
>
> On Wed, Feb 9, 2011 at 5:35 PM, Michael Elman <[hidden email]> wrote:
> > If I understand correctly your question, you want to register multiple
> > Application instances?
> > You can do it using the org.apache.wink.server.utils.RegistrationUtils
> > class.
>
> thanks Michael. I think, it has the API calls I'm looking for.
>
> this might sound like a user list bound question.
>
> Is it possible to deploy jaxrs applications as jar file in wink. ?
>
>
> thanks
> --Pradeep.
>