Issue Details (XML | Word | Printable)

Key: JERSEY-2046
Type: Bug Bug
Status: Resolved Resolved
Resolution: Works as designed
Priority: Major Major
Assignee: Marek Potociar
Reporter: Michal Gajdos
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

SSE: The events sent to clients are not in real time

Created: 15/Aug/13 09:42 AM   Updated: 04/Feb/14 10:54 AM   Resolved: 30/Aug/13 04:17 PM
Component/s: media
Affects Version/s: 2.1
Fix Version/s: 2.3

Time Tracking:
Not Specified

Tags: 17315664 bdb sse wls
Participants: Marek Potociar and Michal Gajdos

 Description  « Hide

I have a SSE resource method as below. I wanted to send an event in every second.

for (int i = 1; i <= 10; i++) { 
    OutboundEvent.Builder eb = new OutboundEvent.Builder(); 
    eventOutput.write( Date())) 
                        .data(Integer.class, i) 

After I deploy it to WLS and initiate a request to this SSE resource using a web browser or curl, I found that the client can not see anything before all the events are generated. In other words, the client can not receive the event in real time.

Marek Potociar added a comment - 30/Aug/13 04:17 PM

The event source will not be able to send any events until it is returned from the resource method. This is by design. Closing the issue.