Sorry for delayed response, somehow missed this thread. Yes, we should be able
to discover features automatically when using CDI. The @Provider may not be
required, we rely on javax.ws.rs.core.Feature implementors instead. But John is
right, in the sample the SseFeature is manually registered
On Mon, Sep 18, 2017 at 7:01 AM John D. Ament wrote:
> On Mon, Sep 18, 2017 at 6:27 AM Sergey Beryozkin
> wrote:
>
>> On 18/09/17 11:14, John D. Ament wrote:
>> > I'm assuming you mean
>> >
>>
On Mon, Sep 18, 2017 at 6:27 AM Sergey Beryozkin
wrote:
> On 18/09/17 11:14, John D. Ament wrote:
> > I'm assuming you mean
> >
>
Ok, I added
@Provider(value = Type.Feature, scope = Scope.Server)
Andriy, will CXF CDI auto-discover it now or will it have to be updated
a bit to have CXF features/interceptors picked up, same way we can do it
for Spring ?
Thanks, Sergey
On 18/09/17 11:27, Sergey Beryozkin wrote:
On
On 18/09/17 11:14, John D. Ament wrote:
I'm assuming you mean
https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java#L39
?
That looks manually registered.
It should not be there,
we need to add a CXF
I'm assuming you mean
https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/sse_cdi/src/main/java/demo/jaxrs/sse/StatsApplication.java#L39
?
That looks manually registered.
For my #1 its a CDI 2.0 feature. I think it'll work with this approach
though.
Any
Have a look at the sse cdi demo Andriy added to the distribution,
the feature (the one dealing with SSE) is expected to be auto-registered.
Re the transport id, by default CXF assumes it is 'plain' HTTP, so it
needs a hint.
What did you mean with 1) ?
Sergey
On 18/09/17 00:57, John D. Ament
Ok, i was able to work a bit deeper into this.
1. the integration works, but firing async events doesn't work. I'm not
sure it should, since you're just appending to the request; but I want to
play with async requests a bit.
2. The integration seems flakey I'm afraid. I'll run a test, almost
I'm trying to create a very basic example of using SSE + CDI events. To do
that, I created a basic endpoint based on a CXF systest that I found, but
tried to adapt it to work with CDI.
@Path("/sse")
@RequestScoped
public class SseEventEndpoint {
@Inject
private Event event;
@Context