users@jersey.java.net

[Jersey] Re: Capacity to integrate with Jersey container

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 29 Aug 2014 14:41:10 +0200

Hello Patrice,

Here's what we do in our in-memory test container:
https://github.com/jersey/jersey/blob/master/test-framework/providers/inmemory/src/main/java/org/glassfish/jersey/test/inmemory/InMemoryConnector.java

Marek

P.S. I still do not agree with what you are trying to do (you should IMO just call EJBs directly from your back-end components and make sure the transactions boundaries do not leak through your public REST APIs - this may require a change in the REST API granularity), but good luck anyway... :)

On 23 Aug 2014, at 22:51, Patrice Thiebaud <paul.knee_at_gmx.com> wrote:

> Hi,
>
> I would highly appreciate if someone could point out a way to locally integrate with Jersey container without using HTTP.
>
> My use case is the following :
> 1. a REST operation exposed by an application A needs to invoke with transaction propagation an operation exposed by application B
> 2. on the calling side, a specific connector provider is registered via JerseyClientBuilder using it's ClientConfig.connectorProvider(ConnectorProvider) method :
> > the connector invokes a method of a stateless session bean (EJB) deployed in application B :
> - the method signature comprises parameters among which one is of String type and is dedicated to an entity if one is present in client request
> - client request handling is easy on the calling side
> 3. each application is therefore an enterprise application, packaged as an .ear file
> 4. on the called side, that is to say inside the remote method implementation, I am wondering how to locally integrate with Jersey container so that the operation be invoked
> > for the time being, I don't know how to handle client request on the receiving side, but it should be easy if there is a way to integrate with < /font>Jersey container through Jersey API (2.5.1 version if possible)Jersey container Jersey container
> 5. response handling is easy.
>
> In that scenario, what Jersey API class could I use to locally integrate with Jersey container ?
>
> Thanks in advance.
> Regards.