[ATMOSPHERE-161] init-param org.atmosphere.useWebSocket set to false still force Jetty8WebSocket Created: 20/Oct/11  Updated: 20/Oct/11  Resolved: 20/Oct/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: survivant Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

in AtmosphereServlet,

if the init-param : org.atmosphere.useWebSocket

is found, the flag will be set to TRUE, even if the value is FALSE.

the flag should use the value init-param-value or remove this flag is not used anymore.



 Comments   
Comment by jfarcand [ 20/Oct/11 ]
https://github.com/Atmosphere/atmosphere/commit/a1db5cc11a584ca03a6f90193ee6d078513949a4





[ATMOSPHERE-160] java.lang.NullPointerException RC2 websocket on Jetty8 Created: 20/Oct/11  Updated: 20/Oct/11  Resolved: 20/Oct/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: survivant Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

here my web.xml

<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.broadcasterClass</param-name>
<param-value>org.atmosphere.util.ExcludeSessionBroadcaster</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxIdleTime</param-name>
<param-value>99999999</param-value>
</init-param>

<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/ChatAtmosphereHandler/*</url-pattern>
</servlet-mapping>

2112 [qtp11328770-20 - /socketiochat/ChatAtmosphereHandler/websocket] INFO org.atmosphere.websocket.WebSocketProcessor - Atmosphere detected WebSocket: org.atmosphere.websocket.container.Jetty8WebSocket
2112 [qtp11328770-20 - /socketiochat/ChatAtmosphereHandler/websocket] ERROR org.atmosphere.cpr.AsynchronousProcessor - No AtmosphereHandler found. Make sure you define it inside META-INF/atmosphere.xml
2112 [qtp11328770-20 - /socketiochat/ChatAtmosphereHandler/websocket] INFO org.atmosphere.websocket.WebSocketProcessor - failed invoking atmosphere servlet doCometSupport()
javax.servlet.ServletException: No AtmosphereHandler found. Make sure you define it inside META-INF/atmosphere.xml
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:182)
at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:147)
at org.atmosphere.container.JettyWebSocketUtil.doService(JettyWebSocketUtil.java:66)
at org.atmosphere.container.JettyCometSupportWithWebSocket.service(JettyCometSupportWithWebSocket.java:84)
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1169)
at org.atmosphere.websocket.WebSocketProcessor.dispatch(WebSocketProcessor.java:116)
at org.atmosphere.websocket.WebSocketProcessor.dispatch(WebSocketProcessor.java:98)
at org.atmosphere.websocket.JettyWebSocketHandler.onOpen(JettyWebSocketHandler.java:173)
at org.eclipse.jetty.websocket.WebSocketConnectionD08.handshake(WebSocketConnectionD08.java:848)
at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:245)
at org.eclipse.jetty.websocket.WebSocketFactory.acceptWebSocket(WebSocketFactory.java:320)
at org.atmosphere.container.JettyWebSocketUtil.doService(JettyWebSocketUtil.java:62)
at org.atmosphere.container.JettyCometSupportWithWebSocket.service(JettyCometSupportWithWebSocket.java:84)
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1169)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1137)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1123)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:488)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:972)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:906)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:582)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:52)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)
2112 [qtp11328770-20 - /socketiochat/ChatAtmosphereHandler/websocket] ERROR org.atmosphere.websocket.WebSocketProcessor - No AtmosphereResource has been suspended. The WebSocket will be closed.
2011-10-19 10:43:52.959:WARN:oejw.WebSocketConnectionD08:
java.lang.NullPointerException
at org.atmosphere.websocket.WebSocketProcessor.request(WebSocketProcessor.java:129)
at org.atmosphere.websocket.protocol.SimpleHttpProtocol.parseMessage(SimpleHttpProtocol.java:71)
at org.atmosphere.websocket.JettyWebSocketHandler.onMessage(JettyWebSocketHandler.java:161)
at org.eclipse.jetty.websocket.WebSocketConnectionD08$WSFrameHandler.onFrame(WebSocketConnectionD08.java:739)
at org.eclipse.jetty.websocket.WebSocketParserD08.parseNext(WebSocketParserD08.java:332)
at org.eclipse.jetty.websocket.WebSocketConnectionD08.handle(WebSocketConnectionD08.java:218)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)
2011-10-19 10:43:52.959:WARN:oejw.WebSocketConnectionD08:
java.lang.NullPointerException
at org.atmosphere.websocket.WebSocketProcessor.request(WebSocketProcessor.java:129)
at org.atmosphere.websocket.protocol.SimpleHttpProtocol.parseMessage(SimpleHttpProtocol.java:93)
at org.atmosphere.websocket.JettyWebSocketHandler.onControl(JettyWebSocketHandler.java:119)
at org.eclipse.jetty.websocket.WebSocketConnectionD08$WSFrameHandler.onFrame(WebSocketConnectionD08.java:640)
at org.eclipse.jetty.websocket.WebSocketParserD08.parseNext(WebSocketParserD08.java:332)
at org.eclipse.jetty.websocket.WebSocketConnectionD08.handle(WebSocketConnectionD08.java:218)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)



 Comments   
Comment by jfarcand [ 20/Oct/11 ]

Fixed


https://github.com/Atmosphere/atmosphere/commit/2d665993df7c7122ccce057676c138b5c0b3e52c
{noformat]





[ATMOSPHERE-157] Add a ServletContext Attribute during the initialization of the Default Broadcaster Factory Created: 11/Aug/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Improvement Priority: Major
Reporter: ghillert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Mailing List reference: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Adding-ServletContext-Attributes-during-initialization-of-the-Default-Broadcaster-Factory-tt6599345.html

I am working on a deeper integration between Atmosphere and Spring and have the requirement, to make Broadcasters available within the core Spring Application context. Hereby, I ran into issues regarding Servlet versus Application context initialization.

The CometD folks have a good write-up about the surrounding issues here:

http://cometd.org/documentation/cometd-java/server/services/integration-spring

For the time being, I am favoring the "Late Spring Initialization" option and thus making sure that the Atmosphere Servlet is loaded first, before Spring boots up. *

As an immediate step, please add a ServletContext Attribute during the initialization of the Default Broadcaster Factory (in configureDefaultBroadcasterFactory). That way I can "listen" for that attribute being added using a ServletContextAttributeListener and use that event to trigger booting up Spring. Not sure whether this is the ultimate solution, but at least for the time being it works.

Just FYI, I started out using the Atmosphere DI Injector support and I used it to inject live broadcaster instances into the Spring application context but in order to have a better (life-cycle) handle, I rather opted for using a Factorybean that does the respected Broadcaster lookups itself.



 Comments   
Comment by jfarcand [ 29/Sep/11 ]

https://github.com/Atmosphere/atmosphere/commit/e397c826063a9fe40bfecf498c83202b8911524c





[ATMOSPHERE-155] Can't share executor services between broadcasters Created: 09/Aug/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: tomdz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I was trying to share executor services between different broadcaster instances so that they all would use the same thread pool:

ExecutorService myAsyncWriteService = ...
ExecutorService myExecutorService = ...

if (broadcaster.getBroadcasterConfig().getAsyncWriteService() != myAsyncWriteService) {
broadcaster.getBroadcasterConfig().setAsyncWriteService(myAsyncWriteService);
}
if (broadcaster.getBroadcasterConfig().getExecutorService() != myExecutorService) {
broadcaster.getBroadcasterConfig().setExecutorService(myExecutorService);
}

However this does not work because broadcasters assume they control the life cycle of these executor services and thus have various places where they call shutdown on the executor services. This of course is bad as from then on they will reject any runnable that is submitted to them.



 Comments   
Comment by jfarcand [ 29/Sep/11 ]

OK I've added a way to tell the BroadcasterConfig to not close those shared executor.

public BroadcasterConfig setAsyncWriteService(ExecutorService asyncWriteService, boolean isAsyncExecutorShared)

default is still to destroy those resource.





[ATMOSPHERE-153] SimpleBroadcaster puts messages into the asyncWriteQueue but never starts the AsyncWriteHandler Created: 05/Aug/11  Updated: 08/Aug/11  Resolved: 08/Aug/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Critical
Reporter: tomdz Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I have code like this:

Broadcaster broadcaster = new JerseySimpleBroadcaster(...);

return new SuspendResponse.SuspendResponseBuilder()
        .broadcaster(broadcaster)
        .addListener(...)
        .outputComments(false)
        .resumeOnBroadcast(true)
        .period(...)
        .build();

Then later, my code manually invokves broadcaster.broadcast(msg) which is defined in SimpleBroadcaster. It in turn creates an entry and uses DefaultBroadcaster.push to put it in the asyncWriteQueue instance variable that the broadcaster inherited from DefaultBroadcaster.
However, the runnable that takes these entries out of the asyncWriteQueue (DefaultBroadcaster.getAsyncWriteHandler) is never started (via DefaultBroadcaster.start), presumably because SimpleBroadcaster.broadcast does not invoke super.broadcast or start ?

The net effect is that these messages are never sent.



 Comments   
Comment by jfarcand [ 08/Aug/11 ]

This has been fixed in 0.8-SNAPSHOT and logged as

http://java.net/jira/browse/ATMOSPHERE-139

Thanks!!





[ATMOSPHERE-152] java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id Created: 30/Jul/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: tmkha Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File atmosphere-async-jersey-test-2.tgz     File atmosphere-async-jersey-test.tgz    

 Description   

Consistently getting "java.lang.IllegalStateException: Broadcaster ID already assigned to SCOPE.REQUEST. Cannot change the id" under light load.

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Correct-usage-of-suspend-resume-with-jersey-td6625131.html#a6635536

Sample test maven project is attached.

I ran the test with jMeter
URL: /atmosphere-async-jersey-test/cowsservices/helloworld?delay=200&who=kha
Number of Thread: 50
Ramp-up Period: 1
Loop Count: 10 to 20

And I can consistently reproduce the problem. Occasionally, if running with higher number of threads, I also saw some NPE and other exceptions.

I also modified the atmosphere-jersey and atmosphere-cpr source code (0.8-SNAPSHOT) to inject some debug logs (mainly in AtmosphereFilter, DefaultBroadcaster, DefaultBroadcasterFactory where Broadcasters are add/remove and ID are changed/added to factory) and noticed that when the error occurred, there were multiple threads working on the same Broadcaster ID at the same time.



 Comments   
Comment by tmkha [ 30/Jul/11 ]

The pom.xml of the first atmosphere-async-jersey-test.tgz is corrupted. Please use atmosphere-async-jersey-test-2.tgz.

Comment by jfarcand [ 29/Sep/11 ]

Looking...

Comment by jfarcand [ 29/Sep/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/7a71e99c2633bac4fcebcf1479e4843814c81236





[ATMOSPHERE-149] Fragmentation & memory leak on streaming Created: 27/Jul/11  Updated: 08/Aug/11  Resolved: 08/Aug/11

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jlanglade Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All browsers and OS


Attachments: File jquery.atmosphere.diff    

 Description   

When using streaming, the response can be fragmented (received in smaller parts) when receiving big messages (in my case 2k is enough) and the whole stream is maintained in memory, causing memory to get bigger with time.
Here is a patch to handle thes issues :
89c89
< jQuery.atmosphere.log(logLevel, ["Websocket is not supported, using request.fallbackTransport"]);

> jQuery.atmosphere.log(logLevel, ["Websocket is not supported, using request.fallbackTransport (" + jQuery.atmosphere.request.fallbackTransport + ")"]);
153c153
< ajaxRequest = new ActiveXObject(activexmodes[i])

> ajaxRequest = new ActiveXObject(activexmodes[i]);
193c193
< }

> };
216a217
> this.previousLastIndex = request.lastIndex;
218c219,220
< response.responseBody = ajaxRequest.responseText.substring(request.lastIndex, ajaxRequest.responseText.length);

> //response.responseBody = ajaxRequest.responseText.substring(request.lastIndex, ajaxRequest.responseText.length);
> response.responseBody = ajaxRequest.responseText;
219a222
> response.isJunkEnded = true;
220a224,226
> response.isJunkEnded = false;
> }
> if (!response.isJunkEnded) {
222c228
< var endOfJunkLenght = "<!-- EOD -->".length;

> var endOfJunkLenght = endOfJunk.length;
225c231
< if (junkEnd != ajaxRequest.responseText.length) {

> if (junkEnd > endOfJunkLenght && junkEnd != response.responseBody.length)

{ 229a236,237 > }

else {
> response.responseBody = ajaxRequest.responseText.substring(request.lastIndex, ajaxRequest.responseText.length);
256a265,268
> if (end < 0)

{ > request.lastIndex = this.previousLastIndex; > return; > }

260a273,274
> // Truncate response to avoid memory filling
> ajaxRequest.responseText = ajaxRequest.responseText.substring(request.lastIndex);
648c662
< }

> };



 Comments   
Comment by jlanglade [ 02/Aug/11 ]

Sorry, the truncate part isn't working (the responseText attribute isn't shortened as expected). this cause the browser to hang after about 20 MB of data received.
I'm currently working on another solution. I'll post as soon as it is validated.

Comment by jlanglade [ 04/Aug/11 ]

I have finally solved my problem.
I close and reopen the connection after a defined limit (10 MB by default).
This avoid the browser to consume all the memory.
Here is the diff :
65d64
< maxStreamingLength : 10000000,
90c89
< jQuery.atmosphere.log(logLevel, ["Websocket is not supported, using request.fallbackTransport (" + jQuery.atmosphere.request.fallbackTransport + ")"]);

> jQuery.atmosphere.log(logLevel, ["Websocket is not supported, using request.fallbackTransport"]);
154c153
< ajaxRequest = new ActiveXObject(activexmodes[i]);

> ajaxRequest = new ActiveXObject(activexmodes[i])
194c193
< };

> }
202d200
< var responseText = ajaxRequest.responseText;
219d216
< this.previousLastIndex = request.lastIndex;
221,222c218,219
< response.responseBody = responseText.substring(request.lastIndex, responseText.length);
< response.isJunkEnded = true;

> response.responseBody = ajaxRequest.responseText.substring(request.lastIndex, ajaxRequest.responseText.length);
>
224,226d220
< response.isJunkEnded = false;
< }
< if (!response.isJunkEnded) {
228c222
< var endOfJunkLenght = endOfJunk.length;

> var endOfJunkLenght = "<!-- EOD -->".length;
231c225
< if (junkEnd > endOfJunkLenght && junkEnd != response.responseBody.length) {

> if (junkEnd != ajaxRequest.responseText.length)

{ 236,237d229 < }

else {
< response.responseBody = responseText.substring(request.lastIndex, responseText.length);
239c231
< request.lastIndex = responseText.length;

> request.lastIndex = ajaxRequest.responseText.length;
242c234
< response.responseBody = responseText;

> response.responseBody = ajaxRequest.responseText;
265,268d256
< if (end < 0)

{ < request.lastIndex = this.previousLastIndex; < return; < }

272,287d259
< if ((request.transport == 'streaming') && (responseText.length > jQuery.atmosphere.request.maxStreamingLength)) {
< // Close and reopen connection on large data received
< ajaxRequest.abort();
< ajaxRequest.open(request.method, request.url, true);
< ajaxRequest.setRequestHeader("X-Atmosphere-Framework", jQuery.atmosphere.version);
< ajaxRequest.setRequestHeader("X-Atmosphere-Transport", request.transport);
< ajaxRequest.setRequestHeader("X-Cache-Date", new Date().getTime());
<
< if (jQuery.atmosphere.request.contentType != '')

{ < ajaxRequest.setRequestHeader("Content-Type", jQuery.atmosphere.request.contentType); < }

<
< for (var x in request.headers)

{ < ajaxRequest.setRequestHeader(x, request.headers[x]); < }

< }
509d480
< maxStreamingLength : 10000000,
677c648
< };

> }

Comment by jfarcand [ 08/Aug/11 ]

Can you attach a diff -u ? Will be simpler for me to integrate

Comment by jlanglade [ 08/Aug/11 ]

Here is the requested diff.

Comment by jfarcand [ 08/Aug/11 ]

OK , still having trouble to merge. Can you attach the entire file? Samples are failling when I merge and I want to make sure I got it right.

Comment by jfarcand [ 08/Aug/11 ]

OK patch merged properly

https://github.com/Atmosphere/atmosphere/commit/0dd4b0c7c67dd3cb49026cc6e5177cc5e73a44d9





[ATMOSPHERE-146] socket connection are dropped after about 10 minutes Created: 13/Jul/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: daleh Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

See description



 Description   

I am running jquery sub/pub snapshot8 and Jetty
jetty-distribution-7.4.3.v20110701

I am run three browser, IE 9, FF 5 and latest chrome. All three
browsers receive messages and display the data. However, is no data
is sent to the browsers after say, around 10 minutes and then data is
sent the below exception is thrown on server.

The browser's sessions are still connected. If I refresh the page on
each and set the topic and send data again, they receive it.

Do we have to send keep alive messages to keep the connections open. If
so how often would these need to be sent.

-Dale

07:45:07.381 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.372 [qtp998462082-42] INFO
com.osi.pubsub.resource.JQueryPubSub -

Broadcastable 'publishNx' Message for Topic: topci Message Size: 289

{"id":8362,"Status":"UPDATED","Count":"2","Time Updated":"14:32:05","Description":"","AMO Name":"MarkIpCust1","System":"robo_93_sy s","Alert Name":"AlertDefTestTwoX","Date Updated":"2011-07-07","Time Created":"14:05:13","Severity":"Major","Date Created":"2011-0 7-07","AMO Class":"Customer"}

07:45:07.407 [Atmosphere-AsyncWrite-2] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.436 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.452 [Atmosphere-AsyncWrite-2] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.474 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
2011-07-07 08:03:02.228:INFO::Graceful shutdown
SelectChannelConnector@0.0.0.0:9090 STARTED
2011-07-07 08:03:02.249:INFO::Graceful shutdown
o.e.j.s.h.ContextHandler

{/javadoc,file:/C:/opt/jetty/jetty-distribution -7.4.3.v201 10701/javadoc}

2011-07-07 08:03:02.249:INFO::Graceful shutdown
o.e.j.w.WebAppContext

{/,file:/C:/Users/dgh1/AppData/Local/Temp/jetty-0. 0.0.0-9090- alert-pubsub.war-_-any-/webapp/}

,C:\opt\jetty\jetty-distribution-7.4.3.
v20110701/webapps/alert-pubsub.war
2011-07-07 08:03:03.265:INFO::stopped
o.e.j.w.WebAppContext

{/,file:/C:/Users/dgh1/AppData/Local/Temp/jetty-0. 0.0.0-9090-alert-pubs ub.war-_-any-/webapp/}

,C:\opt\jetty\jetty-distribution-7.4.3.v20110701/
webapps/alert-pubsub.war
2011-07-07 08:03:03.307:INFO::stopped
o.e.j.s.h.ContextHandler

{/javadoc,file:/C:/opt/jetty/jetty-distribution -7.4.3.v20110701/java doc}

 Comments   
Comment by jfarcand [ 29/Sep/11 ]

Yes, Jetty will close the connection (or proxy and browser) if nothing occurs. You need to implement some heartbeat or use the broadcaster.scheduleXXX API to periodically output some data.





[ATMOSPHERE-143] Exception about Tomcat 7 when using Tomcat6 Created: 04/Jul/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.8
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: survivant Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/workspaces/workspace_eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AtmoSubscribeStreamingDemo/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/F:/workspaces/workspace_eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AtmoSubscribeStreamingDemo/WEB-INF/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[main] INFO org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
[main] INFO org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
[main] INFO org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Tomcat7CometSupport running under container: Apache Tomcat/6.0.26
[main] INFO org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
[main] INFO org.atmosphere.handler.ReflectorServletProcessor - Installing Servlet org.apache.struts.action.ActionServlet
[main] INFO org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
2011-07-04 09:58:11 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
2011-07-04 09:58:11 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
2011-07-04 09:58:11 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/62 config=null
2011-07-04 09:58:11 org.apache.catalina.startup.Catalina start
INFO: Server startup in 2291 ms
[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
java.lang.IllegalStateException: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
at org.atmosphere.container.Tomcat7CometSupport.<clinit>(Tomcat7CometSupport.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.atmosphere.cpr.DefaultCometSupportResolver.newCometSupport(DefaultCometSupportResolver.java:187)
at org.atmosphere.cpr.DefaultCometSupportResolver.resolveWebSocket(DefaultCometSupportResolver.java:245)
at org.atmosphere.cpr.DefaultCometSupportResolver.resolve(DefaultCometSupportResolver.java:233)
at org.atmosphere.cpr.AtmosphereServlet.autoDetectContainer(AtmosphereServlet.java:973)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:571)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - failed using comet support: org.atmosphere.container.Tomcat7CometSupport, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Using BlockingIOCometSupport.

HERE MY WEB.XML

<web-app>
<display-name>Struts-Atmosphere Comet Application</display-name>
<servlet>
<servlet-name>MeteorServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.servlet</param-name>
<param-value>org.apache.struts.action.ActionServlet</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useWebSocket</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.useNative</param-name>
<param-value>true</param-value>
</init-param>

<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MeteorServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<!-- The Usual Welcome File List -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

POM.XML

<properties>
<junit.version>4.8</junit.version>
<javassist.version>3.14.0-GA</javassist.version>
<jdk5.tools>c:/jdk/lib/tools.jar</jdk5.tools>
<slf4j.version>1.6.1</slf4j.version>
<atmosphere.version>0.8-SNAPSHOT</atmosphere.version>
<jersey.version>1.5</jersey.version>

</properties>

<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>$

{junit.version}

</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts-extras</artifactId>
<version>1.3.10</version>
</dependency>

<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-lgpl</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-lgpl</artifactId>
<version>1.7.5</version>
</dependency>

<!--
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>$

{jdk5.tools}

</systemPath>
</dependency>
-->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>$

{javassist.version}

</version>
</dependency>

<!-- Servlet & Jsp -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>$

{slf4j.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}

</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>$

{slf4j.version}

</version>
</dependency>

<!-- Atmosphere -->
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-jquery</artifactId>
<version>$

{atmosphere.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-jersey</artifactId>
<version>${atmosphere.version}

</version>
</dependency>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>$

{atmosphere.version}

</version>
</dependency>

<!-- ACTIVE MQ -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.5.0</version>
</dependency>

</dependencies>



 Comments   
Comment by jfarcand [ 06/Jul/11 ]

Salut,

please make sure you are using the latest SNAPSHOT version as I did fixed that one. Close the bug if I'm right.

A+

  • Jeanfrancois
Comment by jfarcand [ 06/Jul/11 ]

OK using the latest 0.8-SNAPSHOT I can't reproduce the issue. I used the atmosphere-chat sample to test.

Comment by survivant [ 06/Jul/11 ]

I still have the problem.

#1 - I deleted my m2 repository

#2 - I added this in my pom.xml

<repository>
<id>atmo-repo</id>
<name>atmo-repo</name>
<url>http://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

the reason is that Maven complain that atmosphere-runtime-0.8-SNAPSHOOT wasn't found

#3 - redeploy my application

#4 here the log when I start my application

INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/F:/workspaces/workspace_eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AtmoSubscribeStreamingDemo/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/F:/workspaces/workspace_eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/AtmoSubscribeStreamingDemo/WEB-INF/lib/slf4j-simple-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[main] INFO org.atmosphere.cpr.AtmosphereServlet - initializing atmosphere framework: 0.8-SNAPSHOT
[main] INFO org.atmosphere.cpr.AtmosphereServlet - using default broadcaster class: class org.atmosphere.cpr.DefaultBroadcaster
[main] INFO org.atmosphere.cpr.AtmosphereServlet - Atmosphere is using comet support: org.atmosphere.container.Tomcat7CometSupport running under container: Apache Tomcat/6.0.26
[main] INFO org.atmosphere.cpr.AtmosphereServlet - using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
[main] INFO org.atmosphere.handler.ReflectorServletProcessor - Installing Servlet org.apache.struts.action.ActionServlet
[main] INFO org.atmosphere.cpr.AtmosphereServlet - started atmosphere framework: 0.8-SNAPSHOT
2011-07-06 12:00:13 org.apache.coyote.http11.Http11Protocol start
...

#5- do a connect from the client and see that in the log

[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
java.lang.IllegalStateException: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
at org.atmosphere.container.Tomcat7CometSupport.<clinit>(Tomcat7CometSupport.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.atmosphere.cpr.DefaultCometSupportResolver.newCometSupport(DefaultCometSupportResolver.java:187)
at org.atmosphere.cpr.DefaultCometSupportResolver.resolveWebSocket(DefaultCometSupportResolver.java:245)
at org.atmosphere.cpr.DefaultCometSupportResolver.resolve(DefaultCometSupportResolver.java:233)
at org.atmosphere.cpr.AtmosphereServlet.autoDetectContainer(AtmosphereServlet.java:973)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:571)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4187)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4496)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - failed using comet support: org.atmosphere.container.Tomcat7CometSupport, error: Tomcat failed to detect this is a Comet application because context.xml is missing or the Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and WEB-INF/lib/atmosphere-compat-tomcat.jar
[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Using BlockingIOCometSupport.
[http-8080-1] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:

#6 - is it that the release in maven repository doesn't contain the latest version ?

Comment by jfarcand [ 12/Jul/11 ]

Hum, I'm still unable to reproduce the issue. Can you checkout the workspace, build it and see? Just tested on a fresh computer. I think your atmosphere-compat-tomcat.jar is not up to date.

A+

Comment by jfarcand [ 29/Sep/11 ]

This exception is expected if the NIO or APR connector aren't enabled.





[ATMOSPHERE-140] Improve Guice Support by allowing other technology to integrate Created: 03/Jul/11  Updated: 03/Jul/11  Resolved: 03/Jul/11

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Can-guice-work-with-atmopshere-xml-tt6542181.html



 Comments   
Comment by jfarcand [ 03/Jul/11 ]

https://github.com/Atmosphere/atmosphere/commit/86621311a1db2c2ea7ee0455ff67b8362746aa9f





[ATMOSPHERE-139] Regression: SimpleBroadcaster broken after fix for async write. Created: 02/Jul/11  Updated: 02/Jul/11  Resolved: 02/Jul/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Simple-Broadcasters-tt6538352.html



 Comments   
Comment by jfarcand [ 02/Jul/11 ]

https://github.com/Atmosphere/atmosphere/compare/0ee5e4d3b9...2216d6f27c





[ATMOSPHERE-137] JGroupsBroadcaster/Filter must use a unique cluster name Created: 27/Jun/11  Updated: 27/Jun/11  Resolved: 27/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See:

http://is.gd/WYCS5P



 Comments   
Comment by jfarcand [ 27/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/7d92162a9eadc66e6bc5465ee72ac1533059eccb





[ATMOSPHERE-136] Add support for Jetty 7.3/8.0.0-M3 websocket support Created: 22/Jun/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The API has been completely rewritten






[ATMOSPHERE-135] Jetty: Socket URI is not passed in correctly Created: 22/Jun/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: ghillert Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Jetty 7.2, MacOS



 Description   

Forum reference: http://java.net/projects/atmosphere/lists/users/archive/2011-06/message/142

I have been working on a little example application, that runs under its own non-ROOT Servlet context (e.g. http://localhost:8080/websockets-sample/).

Initially I had been running the application on Tomcat 6 and 7 solely using the long-polling support (Atmosphere v0.7.2) and using jQuery
plugin I am able to get responses from the server successfully. In order to also see true websockets in action, I am running my application on Jetty 7. The websockets support is recognized:

2011-06-22 00:17:38,369 INFO | qtp2123673391-32 | org.atmosphere.cpr.AtmosphereServlet | WebSocket upgrade requested |
2011-06-22 00:17:38,380 INFO | qtp2123673391-32 | org.atmosphere.cpr.WebSocketProcessor | Atmosphere
detected WebSocketSupport: org.atmosphere.websocket.JettyWebSocketSupport |

But then my URI that handles the websockets request is not found anymore (http://localhost:8080/websockets-sample/websockets/)

When I running my application under the ROOT context e.g. http://localhost:8080/, the application works in websockets mode ;.
Is there anything I need to watch out for here? It is interesting that it works for polling mode but not for websockets.

Comment by Jeanfrancois Arcand:

"That's a bug in Jetty I need to workaround in Atmosphere."



 Comments   
Comment by jfarcand [ 29/Sep/11 ]

This is fixed by now in Atmosphere





[ATMOSPHERE-134] Add support for Tomcat 7 AIO native Comet Created: 22/Jun/11  Updated: 22/Jun/11  Resolved: 22/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The comet support API in Tomcat 7 has changed, Atmosphere needs to be modified to supports it.



 Comments   
Comment by jfarcand [ 22/Jun/11 ]

https://github.com/Atmosphere/atmosphere/commit/d9bd88e90164c3571ede176065e37666a425b6c7





[ATMOSPHERE-133] Prevent IllegalStateException when Atmosphere cleaning resource Created: 20/Jun/11  Updated: 20/Jun/11  Resolved: 20/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/stale-Broadcaster-issue-tt6495223.html



 Comments   
Comment by jfarcand [ 20/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/2ae360706c9cf513d7536a9637ac913755dbdc01





[ATMOSPHERE-131] Inconsistent transport implementation Created: 10/Jun/11  Updated: 22/Jun/11  Resolved: 22/Jun/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: Emperorlou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It appears as though there is no consistent method for implementing the various transports in an application's handler. I expected websockets to create "fake" onRequest() calls generating "fake" GET requests for incoming messages but this is not the case. However it is done, we need to have a consistent model providing us the incoming messages from the browser for any transport: Comet, Websocket, Long-Polling or Polling.

There seems to be a second related issue (possibly closely related enough to put in the same task)...
It appears as though there is no way to communicate with a server from a browser effectively using Websockets. Overriding the provided atomsphere handlers will force all communication to reflect back to the browser. Overriding the onStateChange() will allow you to stop it but the connection fails as you must call super.onStateChange() to handle the websocket upgrade request, however this re-enables the reflection!



 Comments   
Comment by jfarcand [ 22/Jun/11 ]

First drop of the WebSocketProcessor pluggable architecture

https://github.com/Atmosphere/atmosphere/commit/99521d53519dcaaac49c1cf12eb666307f42a9da

Right now it use the EchoWebSocketProcessor. And HttpServletRequestWebSocketProcessor will soon be added to allow the onRequest() method to be invoked like normal Comet.

Comment by jfarcand [ 22/Jun/11 ]

Fixed in 0.8. See

https://github.com/Atmosphere/atmosphere/commit/4d1e1858c956b8cf9df5bf5922301a9216ec6a4f

for more information on how it works (need to configure the WebSocketProcessor in web.xml)





[ATMOSPHERE-130] Unterminated broadcaster threads Created: 10/Jun/11  Updated: 10/Jun/11  Resolved: 10/Jun/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Emperorlou Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It appears that after a message has been sent from the server, the thread created to do the sending stays suspended for a time. I believe this is due to the fact that the thread is expected to be "reused". If you wait, the threads will eventually die. This is a problem however because I think there is no finite limit to the number of threads that can be created per client. I've tested sending thousands of tiny messages to a client and it will attempt to create a new thread for each message waiting to be sent.

There was someone else on IRC who noticed the same issue. He apparently noticed the issue in pubsub as well so that could be used for testing. My analysis of the situation has not been confirmed and is only a user-level theory so feel free to take it for a grain of salt.



 Comments   
Comment by fmoga [ 10/Jun/11 ]

I have reported the same issue over IRC and at http://java.net/jira/browse/ATMOSPHERE-120 . Are you using any BroadcasterLifeCyclePolicy? With the latest 0.8-SNAPSHOT and using the EMPTY_DESTORY lifecycle policy I can see threads being killed shortly after no AtmosphereResources are bound to the Broadcaster.

I'm also using the new lifecycle listener to get notified of empty, idle state or broadcaster destruction to clean up resources. More at http://java.net/jira/browse/ATMOSPHERE-123 .

Comment by Emperorlou [ 10/Jun/11 ]

I think the issue still stands because if you queue up 1000 tiny packets, it will create 1000 threads (unless JF fixed this as well). For me it wasn't so much that the threads were not eventually being destroyed (they were), it was more the fact that there was no finite limit to the number of threads atmosphere is allowed to create for broadcasters. I think the limit should depend on resources and/or the number of clients connected rather than the number of messages queued. Infact, I don't see why having more than one broadcaster thread per connection is necessary.

Comment by jfarcand [ 10/Jun/11 ]

You can limit the number of thread created by configuring yourself the ExecutorService on the BroadcasterConfig. The default value use a CachedThreadPoolExecutor, which means a high number of thread can be created. Just set your own (based on your calculation above) and that should works as expected.

I'm closing the issue as not an issue, re-open if I've missed something

Comment by Emperorlou [ 10/Jun/11 ]

Excellent! I'll give it a try next time I have to worry about it





[ATMOSPHERE-128] Configuration file settings are different for websocket vs. comet use Created: 10/Jun/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: None
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: Emperorlou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Eclipse + Jetty 7.2.2



 Description   

I have my project setup to use websockets currently. I wanted to seamlessly downgrade to comet and so I set my client to use Comet instead of websockets and the server came back with an error....

09:53:02.640 [qtp9613729-21] WARN o.a.cpr.AsynchronousProcessor - No AtmosphereHandler maps request for /Connect//
09:53:02.640 [qtp9613729-21] WARN o.a.cpr.AsynchronousProcessor - AtmosphereHandler registered: /Spacewar/Connect
2011-05-30 09:53:02.640:WARN::/Spacewar/Connect
javax.servlet.ServletException: No AtmosphereHandler maps request for /Connect//
at org.atmosphere.cpr.AsynchronousProcessor.map(AsynchronousProcessor.java:260)
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:183)

I understand the error, I can fix it but it requires a change in my server side configuration files. Websockets work just fine (asside from the bugs I reported earlier).

My server side configurations are as follows:

atmosphere.xml:

web.xml:
<!-- ATMOSPHERE CONFIGURATION SECTION -->

spacewar.SWServer

AtmosphereServlet
AtmosphereServlet
org.atmosphere.cpr.AtmosphereServlet
<!-- Uncomment if you want to use Servlet 2.5 Async Support
true
-->

org.atmosphere.useWebSocket
true

0

AtmosphereServlet
/Connect

<!-- END OF ATMOSPHERE CONFIG -->



 Comments   
Comment by Emperorlou [ 10/Jun/11 ]

Yuck my config files didn't come out right...

Here they are again...

atmosphere.xml:

<atmosphere-handlers>
    <atmosphere-handler context-root="/Spacewar/Connect" class-name="org.atmosphere.gameFramework.GameFrameworkAtmosphereHandler">
    </atmosphere-handler>
</atmosphere-handlers>

web.xml

    <!-- ATMOSPHERE CONFIGURATION SECTION -->
    <listener>
        <listener-class>spacewar.SWServer</listener-class>
    </listener>
    <servlet>
        <description>AtmosphereServlet</description>
        <servlet-name>AtmosphereServlet</servlet-name>
        <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
        <!-- Uncomment if you want to use Servlet 2.5 Async Support 
        <async-supported>true</async-supported>
        <init-param>
            <param-name>org.atmosphere.useWebSocket</param-name>
            <param-value>true</param-value>
        </init-param>
        -->
        <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>AtmosphereServlet</servlet-name>
        <url-pattern>/Connect</url-pattern>
    </servlet-mapping>
    <!-- END OF ATMOSPHERE CONFIG -->
Comment by Emperorlou [ 10/Jun/11 ]

If I change my atmosphere.xml file by removing the /Spacewar from the "/Spacewar/Comet" value, comet works but Websockets don't. When I try running websockets with this change, I get the following error:

10:09:56.718 [qtp1947116-26] INFO org.atmosphere.cpr.AtmosphereServlet - WebSocket upgrade requested
10:09:56.765 [qtp1947116-26] INFO o.atmosphere.cpr.WebSocketProcessor - Atmosphere detected WebSocketSupport: org.atmosphere.websocket.JettyWebSocketSupport
10:09:56.781 [qtp1947116-26] DEBUG o.a.cpr.AsynchronousProcessor - (suspend) invoked:
HttpServletRequest: org.atmosphere.cpr.AtmosphereServlet$JettyRequestFix@7ee46a
HttpServletResponse: org.atmosphere.websocket.WebSocketHttpServletResponse@c62c07
10:09:56.781 [qtp1947116-26] WARN o.a.cpr.AsynchronousProcessor - No AtmosphereHandler maps request for /Spacewar/Connect/*
10:09:56.781 [qtp1947116-26] WARN o.a.cpr.AsynchronousProcessor - AtmosphereHandler registered: /Connect
10:09:56.843 [qtp1947116-26] INFO o.atmosphere.cpr.WebSocketProcessor - failed invoking atmosphere servlet doCometSupport()
javax.servlet.ServletException: No AtmosphereHandler maps request for /Spacewar/Connect/*
at org.atmosphere.cpr.AsynchronousProcessor.map(AsynchronousProcessor.java:260) ~[atmosphere-runtime-0.7.1.jar:0.7.1]
at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:183) ~[atmosphere-runtime-0.7.1.jar:0.7.1]

Comment by jfarcand [ 29/Sep/11 ]

Fixed in Atmosphere 0.8





[ATMOSPHERE-125] NPE on Broadcaster.destroy Created: 07/Jun/11  Updated: 08/Jun/11  Resolved: 08/Jun/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: survivant Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File AtmoSubscribeStreamingDemo-7juin.7z    

 Description   

use case :
Open Firefox
http://localhost:8080/AtmoSubscribeStreamingDemo/index3.html

click on connect, subscrible letter, unsubcribe letter.. and disconnect

[http-8080-1] WARN org.atmosphere.cpr.AtmosphereServlet - Using BlockingIOCometSupport.
[http-8080-1] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
HttpServletRequest: org.apache.catalina.connector.RequestFacade@f01771
HttpServletResponse: org.apache.catalina.connector.ResponseFacade@933bcb
[http-8080-1] INFO app.OpenChannelAction - BEGIN OpenChannelAction
[http-8080-1] DEBUG org.atmosphere.container.BlockingIOCometSupport - Suspending response: org.apache.catalina.connector.ResponseFacade@933bcb
[http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
[http-8080-2] INFO app.SubscribeAction - BEGIN SubscribeAction
[http-8080-2] INFO app.SubscribeAction - meteor: org.atmosphere.cpr.Meteor@bf053f
Voulons faire un subscribe à = letter
LettreBroadcastable called
[http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
[http-8080-2] INFO app.UnsubscribeAction - BEGIN UnsubscribeAction
[http-8080-2] INFO app.UnsubscribeAction - meteor: org.atmosphere.cpr.Meteor@bf053f
Voulons faire un unsubscribe à = letter
[http-8080-2] DEBUG org.atmosphere.cpr.AsynchronousProcessor - (suspend) invoked:
HttpServletRequest: org.apache.catalina.connector.RequestFacade@16dc861
HttpServletResponse: org.apache.catalina.connector.ResponseFacade@7e8c4d
[http-8080-2] INFO app.CloseChannelAction - BEGIN SimpleAction.sendCometMsg()
[http-8080-2] INFO app.CloseChannelAction - meteor: org.atmosphere.cpr.Meteor@bf053f
[http-8080-2] INFO app.CloseChannelAction - meteor resumed
meteor resumed
LettreBroadcastable called
[pool-3-thread-1] ERROR org.atmosphere.cpr.DefaultBroadcaster -
java.lang.NullPointerException
at org.atmosphere.cpr.DefaultBroadcaster.trackBroadcastMessage(DefaultBroadcaster.java:544)
at org.atmosphere.cpr.DefaultBroadcaster.push(DefaultBroadcaster.java:400)
at org.atmosphere.cpr.DefaultBroadcaster$6.run(DefaultBroadcaster.java:873)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

LetterBroadcaster call
scheduleFixedBroadcast(new LettreBroadcastable(), 2, TimeUnit.SECONDS);

look like the scheduler are still trying to submit a last task, but because the objects were destroy just before, we get a NPE.



 Comments   
Comment by survivant [ 07/Jun/11 ]

sample to reproduce the bug

Comment by survivant [ 08/Jun/11 ]

in the Javadoc shutdownNow()

There are no guarantees beyond best-effort attempts to stop processing actively executing tasks.

Comment by jfarcand [ 08/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/e2d8cb6fb3a05d7edea4787b5dce8430dfe3f39a





[ATMOSPHERE-124] Add Access-Control-Allow-Origin", "*" header by default in all Atmosphere's response Created: 06/Jun/11  Updated: 06/Jun/11  Resolved: 06/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.7.2

Type: Task Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Header

Access-Control-Allow-Origin", "*"

will now be added to all response. To disable, add the following init-param

org.atmosphere.cpr.dropAccessControlAllowOriginHeader
false



 Comments   
Comment by jfarcand [ 06/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/6da7cd76cd30db4c620daa8e7a2dc796a9a39d9f





[ATMOSPHERE-123] Listener for BroadcasterLifeCyclePolicy Created: 02/Jun/11  Updated: 10/Jun/11  Resolved: 10/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: New Feature Priority: Minor
Reporter: fmoga Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: atmosphere, lifecycle, listener, policy

 Description   

Enable user to do post-destroy or post-timeout resource cleanup for a Broadcaster. I'm proposing something like

public interface BroadcasterLifeCyclePolicyListener

{ void onEmpty(); void onIdle(); void onDestroy(); }

This will get registered with the Builder: new BroadcasterLifeCyclePolicy.Builder().policy(ATMOSPHERE_RESOURCE_POLICY.EMPTY_DESTROY).listener(MyBroadcasterLifeCyclePolicyListener).build();

In the above case, both onEmpty and onDestroy will get called when no AtmosphereResources are attached to the Broadcaster. If EMPTY would have been used, only onEmpty would have been triggered. Similar behaviour happens to IDLE and IDLE_DESTROY.



 Comments   
Comment by fmoga [ 02/Jun/11 ]

What do you think about this new feature? I would use it to unregister broadcasters when they timeout. Seems useful for resource cleanup outside of Atmosphere internals.

Comment by jfarcand [ 03/Jun/11 ]

Salut, I like the idea. Working on it today or early next week. Will try to include it in 0.7.2.

Comment by jfarcand [ 06/Jun/11 ]

Added support

https://github.com/Atmosphere/atmosphere/commit/9757bc2adfb6f5798ae13f47613925ffd77a7667

Comment by fmoga [ 07/Jun/11 ]

Tried the new support but callbacks don't get invoked. Might be due to http://java.net/jira/browse/ATMOSPHERE-120 .

Comment by jfarcand [ 07/Jun/11 ]

The following code snipped works fine for me with Atmosphere 0.8

		System.out.println("Client subscribed.");
		Broadcaster broadcaster = new JerseyBroadcaster();
		BroadcasterLifeCyclePolicy policy = new BroadcasterLifeCyclePolicy.Builder()
				.policy( BroadcasterLifeCyclePolicy.ATMOSPHERE_RESOURCE_POLICY.EMPTY_DESTROY).build();
		broadcaster.setBroadcasterLifeCyclePolicy(policy);

        broadcaster.addBroadcasterLifeCyclePolicyListener( new BroadcasterLifeCyclePolicyListener()
        {
            public void onEmpty()
            {
               System.out.println("onEmpty");
            }

            public void onIdle()
            {
                System.out.println("onIdle");
            }

            public void onDestroy()
            {
                System.out.println("onDestroy");
            }
        } );

		return new SuspendResponse.SuspendResponseBuilder<String>()
				.broadcaster(broadcaster).outputComments(true)
                .resumeOnBroadcast( true )
				.addListener(new EventsLogger()).build();

Can you described what you are doing? Sorry for the trouble!

Comment by fmoga [ 07/Jun/11 ]

From what I see, you're using the sample from ATMOSPHERE-120. The above change doesn't show onEmpty in my logs when a browser client disconnects (using Tomcat 7.0.14).

Can you package and attach the source of your sample or a war file?

Thanks

Comment by fmoga [ 09/Jun/11 ]

It now works with the latest 0.8-SNAPSHOT from the maven repo. Great stuff! Thanks.





[ATMOSPHERE-122] Broadcast out of order Created: 02/Jun/11  Updated: 02/Jun/11  Resolved: 02/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

There is a regression in Atmosphere. Broadcasting events arrive to the client not in the order they get broadcated. The following test case is failling

    @Test(timeOut = 60000)
    public void testConcurrentBroadcast() {
        logger.info("{}: running test: testConcurrentBroadcast", getClass().getSimpleName());

        final AtomicInteger broadcastCount = new AtomicInteger(0);
        final AtomicReference<Response> response = new AtomicReference<Response>();
        atmoServlet.addAtmosphereHandler(ROOT, new AbstractHttpAtmosphereHandler() {

            AtomicBoolean b = new AtomicBoolean(false);

            public void onRequest(AtmosphereResource<HttpServletRequest, HttpServletResponse> event) throws IOException {
                if (!b.getAndSet(true)) {
                    try {
                        event.suspend(-1, false);
                    } finally {
                    }
                } else {
                    event.getBroadcaster().broadcast("Message-1 ");
                    event.getBroadcaster().broadcast("Message-2 ");
                    event.getBroadcaster().broadcast("Message-3 ");
                    event.getBroadcaster().broadcast("Message-4");
                }
            }

            public void onStateChange(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) throws IOException {
                if (event.isResuming()) {
                    return;
                }
                event.getResource().getResponse().getWriter().write(event.getMessage().toString());
                try {
                     broadcastCount.incrementAndGet();
                } finally {
                    if (broadcastCount.get() == 4) {
                        event.getResource().resume();
                        latch.countDown();
                    }
                }
            }
        }, new RecyclableBroadcaster("suspend"));

        AsyncHttpClient c = new AsyncHttpClient();
        try {
            c.prepareGet(urlTarget).execute(new AsyncCompletionHandler<Object>() {
                @Override
                public Object onCompleted(Response r) throws Exception {
                    response.set(r);
                    return null;
                }
            });

            Thread.sleep(1000); // Make sure the first request suspended the connection.
            c.prepareGet(urlTarget).execute().get();

            assertNotNull(response.get());
            assertEquals(response.get().getStatusCode(), 200);
            assertEquals(response.get().getResponseBody(),"Message-1 Message-2 Message-3 Message-4");
        } catch (Exception e) {
            logger.error("test failed", e);
            fail(e.getMessage());
        } finally {
            c.close();
        }
    }


 Comments   
Comment by jfarcand [ 02/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/26cb3adeeef7acde4a8133130ec4792a0ec25e80





[ATMOSPHERE-121] jQuery plugin bug in removeCallback function Created: 29/May/11  Updated: 02/Jun/11  Resolved: 02/Jun/11

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: tinhtruong Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Here is the current removeCallback function from the atmosphere jQuery plugin:

removeCallback: function(func)
{
if (jQuery.inArray(func, jQuery.atmosphere.callbacks) != -1)

{ jQuery.atmosphere.callbacks.splice(index); }
}
As you can see from the above code snippet, the variable 'index' is not declared anywhere in the removeCallback function scope (and in the whole plugin either). I think this bug haven't been busted because this method is never used .
Here is a simple patch for this method:

removeCallback: function(func)
{
var index = jQuery.inArray(func, jQuery.atmosphere.callbacks);
if (index != -1) { jQuery.atmosphere.callbacks.splice(index); }

}



 Comments   
Comment by jfarcand [ 02/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/compare/e6840132ca...50da61974b

Thanks!!!





[ATMOSPHERE-120] Atmosphere-BroadcasterConfig-0 threads are not stopped when broadcaster is destroyed Created: 25/May/11  Updated: 03/Jul/11  Resolved: 09/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: fmoga Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 11.04
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK Server VM (build 20.0-b11, mixed mode)
Tomcat 7.0.14
jVisualVM 1.3


Attachments: Zip Archive jquery-pubsub.zip    
Tags: atmosphere, destroy, lifecycle, policy

 Description   

Atmosphere-BroadcasterConfig-0 threads are hanging indefinetly when having the BroadcasterPolicyLifecycle set to EMPTY or EMPTY_DESTROY and no resources attached.
I'm setting the policy like this:
broadcaster.setBroadcasterLifeCyclePolicy(new Builder().policy(ATMOSPHERE_RESOURCE_POLICY.EMPTY_DESTROY).build())

Same behavior can be seen when using broadcaster.destroy() directly.

I'm using jVisualVM to keep track of the resources.

When trying to use the IDLE or IDLE_DESTORY policies, i'm getting
java.util.concurrent.ScheduledThreadPoolExecutor.scheduleAtFixedRate(ScheduledThreadPoolExecutor.java:489)



 Comments   
Comment by jfarcand [ 02/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/310f3ea82c1d9d959902d50af656eddc1cf314a8

Please test and let me know.

Comment by fmoga [ 02/Jun/11 ]

I've attached a modified jquery-pubsub webapp using 0.7.2-SNAPSHOT where each client has a dedicated broadcaster identified by the http session. This gets closer to the type of interaction I'm using.

It is expected that when a client closes the web page, the broadcaster will shut down all the threads and destroy itself as I am using the EMPTY_DESTROY lifecycle policy and it has no more AtmosphereResources attached.

I'm seeing that the Async-Write-0 threads get killed after exactly 1 min of inactivity while the Broadcaster-Config-0 threads remain in a wait state.

Comment by jfarcand [ 02/Jun/11 ]

Fix failed

Comment by fmoga [ 09/Jun/11 ]

I can now see with latest 0.8-SNAPSHOT how threads get killed shortly after broadcaster destroy. Thanks!

Comment by jfarcand [ 09/Jun/11 ]

Fixed

Comment by michael.simons [ 02/Jul/11 ]

Hi,
should this be fixed in the mvn version of 0.7.2? If so, than it's not.

If it is fixed in 0.8 i hope for a release anytime soon. For now, i have about 5000 threads running which will stop me from using atmosphere

Thanks for your work!

This is my setup:

package de.dailyfratze.model.broadcasters;

import org.atmosphere.cpr.BroadcasterLifeCyclePolicy;
import org.atmosphere.jersey.JerseyBroadcaster;

public class LivestreamBroadcaster extends JerseyBroadcaster {
	public LivestreamBroadcaster() {
		super.setBroadcasterLifeCyclePolicy(
                  new BroadcasterLifeCyclePolicy.Builder().policy(BroadcasterLifeCyclePolicy.ATMOSPHERE_RESOURCE_POLICY.EMPTY_DESTROY).build()
                 );
		super.setID(this.getClass().getSimpleName());		
	}	
}

The resource

package de.dailyfratze.resources;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.atmosphere.cpr.Broadcaster;
import org.atmosphere.cpr.Broadcaster.SCOPE;
import org.atmosphere.cpr.BroadcasterFactory;
import org.atmosphere.jersey.SuspendResponse;
import org.codehaus.jackson.map.ObjectMapper;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import de.dailyfratze.helper.BroadcasterDestroyer;
import de.dailyfratze.model.broadcasters.LivestreamBroadcaster;

@Path("/livestream")
@Produces("text/html;charset=ISO-8859-1")
@Component
public class LivestreamResource {
	private final Logger logger = LoggerFactory.getLogger(LivestreamResource.class);	

	private final ObjectMapper om = new ObjectMapper();
	
	@Autowired
	private BroadcasterDestroyer broadcasterDestroyer;
	
	@GET
	public SuspendResponse<String> subscribe()  {
		Broadcaster broadcaster = null; 	
		try {
			broadcaster = BroadcasterFactory.getDefault().get(LivestreamBroadcaster.class, UUID.randomUUID());
			broadcaster.setScope(SCOPE.REQUEST);
		} catch(Exception e) {			
		}		
		return new SuspendResponse.SuspendResponseBuilder<String>()
			.broadcaster(broadcaster)
			.outputComments(true)
			.headerSingle("Transfer-Encoding", "chunked")		
			.addListener(broadcasterDestroyer)
			.build();        
	}
	
	public void livestreamUpdated() {
		final BroadcasterFactory broadcasterFactory = BroadcasterFactory.getDefault();
		if(broadcasterFactory == null)
			return;
		try {
			final Map<String, Object> m = new HashMap<String, Object>();		
			m.put("updatedAt", new DateTime(DateTimeZone.UTC).getMillis());
			final String msg = om.writeValueAsString(m);
			final Collection<Broadcaster> broadcasters = broadcasterFactory.lookupAll();
			for(Broadcaster broadcaster : broadcasters) {
				if(!(broadcaster instanceof LivestreamBroadcaster))					
					continue;				
				broadcaster.broadcast(msg);		
			}
		} catch (Exception e) {
			logger.error(String.format("Could not broadcast livestream update %s", e.getMessage()), e);
		}
	}
}

And the atmosphere.xml

<atmosphere-handlers>
	<atmosphere-handler context-root="/as/*"
	support-session="true"
		class-name="org.atmosphere.handler.ReflectorServletProcessor">
		<property name="servletClass"
			value="com.sun.jersey.spi.spring.container.servlet.SpringServlet" />
	</atmosphere-handler>
</atmosphere-handlers>

I'm using Spring and Spring Security 3.0.5, TC6.0.32 with APR, CometConnection Valve is configured.

Comment by michael.simons [ 02/Jul/11 ]

Additionalinfo: I don't see the Async-Write-0 thread get kill, either. I'm still on the mvn 0.7.2 version.

Comment by jfarcand [ 03/Jul/11 ]

Yes, that should have been fixed. Can you attach the logs? It seems the broadcaster still have AtmosphereResource associated and that's why they aren't destroyed. If you can privately share a test case that would help me reproducing the issue. Thanks!





[ATMOSPHERE-119] Clean cancel atmosphereResources from broadcasters Created: 20/May/11  Updated: 02/Jun/11  Resolved: 02/Jun/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: vbarrier Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Tomcat 6 NIO



 Description   

When we use multiple broadcasters in one channel.

If someone refesh the browser the old atmosphereResources isn't remove from broadcasters.

Workaround (in groovy) :

in onRequest for each broadcaster :

BroadcasterFactory.default.lookupAll().each { 
      it.atmosphereResources.findAll{ a -> a.event.isCancelled }.each{ 
          a -> b.removeAtmosphereResource(a)
      }

in onStateChange :

if (event.cancelled){
            //Help atmosphere to clear old events
            BroadcasterFactory.default.lookupAll().each {
                it.removeAtmosphereResource(event.resource)
            }
            return
        }

(I don't know if it affects the general case : 1 atmosphereResource = 1 broadcaster)



 Comments   
Comment by vbarrier [ 20/May/11 ]

Correct code for onRequest :

BroadcasterFactory.default.lookupAll().each { b ->
            b.atmosphereResources.findAll{ a -> a.event.isCancelled }.each{
                a -> b.removeAtmosphereResource(a)
            }
        }
Comment by jfarcand [ 02/Jun/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/2f1ce8e7ca7388d973c4926aa94e7c277e141493





[ATMOSPHERE-117] Add support for an exclude session Broadcaster Created: 20/May/11  Updated: 20/May/11  Resolved: 20/May/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Task Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

As described on the irc channel, Atmosphere should ships with a Broadcaster that exclude the caller when broadcasting.



 Comments   
Comment by jfarcand [ 20/May/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/b28ce8d91e6974d422e2b7e7fa6f39f4abbb717f





[ATMOSPHERE-111] message lost or dropped with Firefox 4 Created: 19/Apr/11  Updated: 19/May/11  Resolved: 19/May/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7.2
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: vbarrier Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Grails / Atmosphere 0.7.2 snapshot / jquery.atmosphere.js / Firefox 4 on MacOS



 Description   

When I broadcast to a client who has firefox 4, every 3/4 messages, the next one is not receive by the client.

Sample jquery :

function callback(response){
    $.jqotetag('**');

    var message = $.parseJSON(response.responseBody);

    switch(message.call){
        case "add-actor":
        $('#backlog-layout-window-actor').jqotepre('#postit-actor-tmpl', message.object);
        $('#backlog-layout-widget-actor').jqotepre('#postit-row-actor-tmpl', message.object);
        $('#actor-table').jqotepre('#table-row-actor-tmpl', message.object);
        break;

        case "update-actor":
        $('div.postit-actor[elemid='+this+']').jqotesub('#postit-actor-tmpl', message.object);
        $('div.postit-row-actor[elemid='+this+']').jqotesub('#postit-row-actor-tmpl', message.object);
        $('#actor-table tr[elemid='+this+']').jqotesub('#table-row-actor-tmpl', message.object);
        break;

        case "remove-actor":
        $(message.object).each(function(){
            $('div.postit-actor[elemid='+this+']').remove();
            $('div.postit-row-actor[elemid='+this+']').remove();
            $('#actor-table tr[elemid='+this+']').remove();
        });
        break;
    }
  }
  var url = $.icescrum.o.baseUrl + 'push/app?${params.product ? 'product='+params.product : params.team ? 'team='+params.team :'' }';
  $.atmosphere.subscribe(url,callback, $.atmosphere.request = {transport:'streaming'});

IceScrumAtmosphereHandler.groovy :

package org.icescrum.atmosphere

import org.atmosphere.cpr.AtmosphereHandler
import org.atmosphere.cpr.AtmosphereResource
import org.atmosphere.cpr.AtmosphereResourceEvent
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
import org.atmosphere.cpr.BroadcasterFactory
import org.atmosphere.cpr.DefaultBroadcaster
import org.icescrum.core.domain.Product
import org.icescrum.core.domain.Team
import org.apache.commons.logging.LogFactory
import org.springframework.security.web.context.HttpSessionSecurityContextRepository
import org.springframework.security.core.context.SecurityContext
import org.icescrum.core.domain.User
import org.atmosphere.util.XSSHtmlFilter


class IceScrumAtmosphereHandler implements AtmosphereHandler<HttpServletRequest, HttpServletResponse> {

    private static final log = LogFactory.getLog(this)

    void onRequest(AtmosphereResource<HttpServletRequest, HttpServletResponse> event) throws IOException {

        event.response.setContentType("text/html;charset=ISO-8859-1");
		event.response.addHeader("Cache-Control", "private");
		event.response.addHeader("Pragma", "no-cache");
        event.suspend()

        def productID = event.request.getParameterValues("product") ? event.request.getParameterValues("product")[0] : null
        def teamID = event.request.getParameterValues("team") ? event.request.getParameterValues("team")[0] : null
        def user = getUserFromAtmosphereResource(event.request)

        def channel = null
        if (productID){
            channel = Product.load(productID.toLong()) ? "product-${productID}" : null

        }else if(teamID){
            channel = Team.load(teamID.toLong()) ? "team-${teamID}" : null
        }
        if (channel){
            def broadcaster = BroadcasterFactory.default.lookup(DefaultBroadcaster.class,channel,true)
            broadcaster.broadcasterConfig.addFilter(new XSSHtmlFilter())
            broadcaster.addAtmosphereResource(event)
            if (log.isDebugEnabled()){
                log.debug("add user ${user?.username?:'anonymous'} to broadcaster: ${channel}")
                log.debug(broadcaster)
            }
        }

        if (log.isDebugEnabled()){
            log.debug("add user ${user?.username?:'anonymous'} to app broadcaster")
        }
    }

    void onStateChange(AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event) throws IOException {

        def user = getUserFromAtmosphereResource(event.resource.request)
        if (!event.message){
            return
        }

        if (event.cancelled){
            if (log.isDebugEnabled()){
                log.debug("user ${user?.username?:'anonymous'} disconnected")
                return
            }
        }

        if (log.isDebugEnabled()){
            log.debug("send message to user ${user?.username?:'anonymous'}")
        }

        event.resource.response.writer.with {
            write "${event.message}"
            flush()
        }
    }
    void destroy() {}

    private User getUserFromAtmosphereResource(def request){
        def httpSession = request.session;
        def user = null
        if (httpSession != null) {
            def context = (SecurityContext)httpSession.getAttribute(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY);
            if (context?.authentication?.isAuthenticated()){
                user = User.get(context.authentication.principal.id)
            }
        }
        user
    }
}

Broadcast example :

def broadcaster = BroadcasterFactory.default.lookup(DefaultBroadcaster.class,'product-'+params.product)
broadcaster?.broadcast([call:'add-actor',object:actor] as JSON)


 Comments   
Comment by jfarcand [ 19/May/11 ]

Fixed by

http://java.net/jira/browse/ATMOSPHERE-116





[ATMOSPHERE-110] Possible NPE when new Broadcaster gets created and never associated with Atmosphere resource Created: 12/Apr/11  Updated: 12/Apr/11  Resolved: 12/Apr/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

See:

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/multiple-broadcasters-gt-Unable-to-resume-the-suspended-connection-tt6255759.html



 Comments   
Comment by jfarcand [ 12/Apr/11 ]

Make sure we always retrieve the associated AtmosphereHandler

https://github.com/Atmosphere/atmosphere/commit/000059d8db7a25a6c3a7d7551bf66c14155f435e





[ATMOSPHERE-108] The AtmosphereServlet does not handle properly classes loaded "mvn jetty:run" Created: 07/Apr/11  Updated: 07/Apr/11  Resolved: 07/Apr/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7
Fix Version/s: 0.8

Type: Improvement Priority: Major
Reporter: rostislav Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Maven 3


Tags: maven

 Description   

Just tried 0.7.1 and saw the following warning:

WARN : org.atmosphere.cpr.AtmosphereServlet - failed to load class as an AtmosphereHandler: .Workspace.summer.samples.java.target.classes.com.asual.summer.sample.convert.StringToLicenseConverter
java.lang.ClassNotFoundException: .Workspace.summer.samples.java.target.classes.com.asual.summer.sample.convert.StringToLicenseConverter
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.atmosphere.cpr.AtmosphereServlet.loadAtmosphereHandlersFromPath(AtmosphereServlet.java:1034)

It's caused by the following code in the AtmosphereServlet:

className = className.substring(className.indexOf(WEB_INF_CLASSES)
+ WEB_INF_CLASSES.length(), className.lastIndexOf(".")).replace('/', '.');

It can be fixed with something like:

className = className.replaceFirst("^./(WEB-INF|target)/classes/(.)\.class", "$2");



 Comments   
Comment by jfarcand [ 07/Apr/11 ]

Should it be:

className = className.replaceFirst("^./(WEB-INF|target)/classes/(.)
.class", "$2");

(note the double
). I will go ahead an apply.

Comment by rostislav [ 07/Apr/11 ]

You're correct. I tested the regex in a non-Java environment.

Comment by rostislav [ 07/Apr/11 ]

Here is an extended version that will also work for the test-classes folder:

className = className.replaceFirst("^./(WEB-INF|target)/(test-)?classes/(.)
.class", "$3");

Comment by jfarcand [ 07/Apr/11 ]

Fixed Thanks!

https://github.com/Atmosphere/atmosphere/commit/3d46c6a6981e7785a5c584964bada20d31df3bac





[ATMOSPHERE-106] Removing broadcasters Created: 15/Mar/11  Updated: 06/Jun/11  Resolved: 06/Jun/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: Devenor Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If you remove the broadcaster, there is a risk that the AtmosphereResource ends up with no Broadcaster at all.

// Example
broadcaster.removeAtmosphereResource(resource);



 Comments   
Comment by jfarcand [ 23/Mar/11 ]

The issue here is if you remove an AtmosphereResource from a Broadcaster, the Broadcaster is still associated with the Atmosphere resource, hence there is a risk that the Broadcaster migth still be used if the

    AtmosphereResource#getBroadcaster().broadcast(..);

gets invoked. One solution is to throw an exception and set the broadcaster to null on the AtmosphereResource.

Comment by jfarcand [ 06/Jun/11 ]

This issue has been fixed in 0.7.2





[ATMOSPHERE-102] Comet on Opera doesn't work with http streaming, but works fine with long polling Created: 02/Mar/11  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.8

Type: Bug Priority: Major
Reporter: alienqueen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, Opera



 Description   

The jQuery plugin is unable to initiate correctly the very first request to a Wicket page. I don't know if it is limited to Wicket, though.

The clock sample is enough to prove this.

Regards.



 Comments   
Comment by jfarcand [ 29/Sep/11 ]

Fixed





[ATMOSPHERE-101] Unstable connection using firefox Created: 01/Mar/11  Updated: 19/May/11  Resolved: 19/May/11

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.7
Fix Version/s: 0.7.2

Type: Bug Priority: Major
Reporter: ethlo Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 10.10, FireFox 3.6.13, FireFox 4.0.b13



 Description   

I'm having a problem with firefox not consistently being able to lsiten for
new server sent notification. I'm using Tomcat 7.0.8 and Atmosphere 6.5.

The server will push the server's timestamp to the client every 5 seconds.

What happens:
In Google Chrome 9.0.597.94 beta:
Works as expected always, that is the pushed response from the server is
appended to the #messages element in the page

FireFox 3.6.13: The messages will not always be received. That is, if one
message is received, then all subsequent messages will also be. However,
there seems to be a problem with the initial "handshake". By refreshing the
page it seems to fix itself. Refresh again and the problem is back.

Example code: http://ethlo.no/codeexamples/asynctest/asynctest.zip

You should see messages appear in the page.

Using firebug I can see that there are two opened connections and the scripts active connection is not the right one, so subscribe callback never sees any messages. If i move the variable ajaxRequest up as an instance variable like seen below it will work.

jQuery.atmosphere = function()
{
    var ajaxRequest;


 Comments   
Comment by croser [ 24/Mar/11 ]

same problem here. would be grateful for a workaround. thanks!

Comment by jfarcand [ 25/Mar/11 ]

Working on it. I will push the proposed patch so if you can confirm it works, I will cut 0.7.1 so both of you have an official version.

Comment by jfarcand [ 25/Mar/11 ]

Hum...it doesn't work for me when I apply the patch using Atmosphere 0.7, Tomcat 6.0.x with both Chrome and Firefox.

Comment by jfarcand [ 25/Mar/11 ]

Just a quick status, the test case works fine with the patch but all the Atmosphere sample are broken. So we need a better solution Will try to take a look today.

Comment by vbarrier [ 30/Apr/11 ]

I found a quick (maybe dirty) fix :

let the ajaxRequest at the original place but :

Change the begin with :

jQuery.atmosphere = function()
{
    var activeRequest;
    var ajaxRequests = new Array();
    jQuery(window).unload(function()
    {
        for ( var i=0, len=ajaxRequests.length; i<len; ++i ){
            var request=ajaxRequests[i];
            request.onreadystatechange = function () {};
            request.abort();
        }

        if( !(typeof(transferDoc) == 'undefined') ){
            if(transferDoc != null){
                transferDoc = null;
                CollectGarbage();
            }
        }
    });

add :

  ajaxRequests.push(ajaxRequest);

after :

} else if (window.XMLHttpRequest) {
    ajaxRequest = new XMLHttpRequest();
}

This way you will always abort all ajax request.

And... samples still works

Comment by jfarcand [ 19/May/11 ]

Fixed by

http://java.net/jira/browse/ATMOSPHERE-116





[ATMOSPHERE-99] Code generation breaks on GWT 2.2 Created: 18/Feb/11  Updated: 07/Jun/11  Resolved: 07/Jun/11

Status: Resolved
Project: atmosphere
Component/s: client-gwt
Affects Version/s: 0.7
Fix Version/s: 0.8

Type: New Feature Priority: Blocker
Reporter: jabbahj Assignee: jabbahj
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Tags: gwt

 Description   

Compile gwt-demo with GWT 2.2.0:

Compiling module XXXXXX
[ERROR] Errors in 'file:XXXXX'
[ERROR] Internal compiler error
java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected



 Comments   
Comment by jabbahj [ 07/Jun/11 ]

Fixed for 0.7.2





[ATMOSPHERE-97] AtmosphereResourceImpl: incorrect check for session timeout Created: 08/Feb/11  Updated: 12/Apr/11  Resolved: 09/Feb/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.6.4
Fix Version/s: 0.1

Type: Bug Priority: Major
Reporter: nick_belaevski Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In the 166th line of code in org.atmosphere.cpr.AtmosphereResourceImpl (method suspend(long, boolean)) there is an incorrect check for session maximum inactivity interval:

if (req.getSession(false) != null && req.getSession().getMaxInactiveInterval() != -1 && req.getSession().getMaxInactiveInterval() < timeout) {

While timeout is expressed in milliseconds, getMaxInactiveInterval() returns interval in seconds.



 Comments   
Comment by jfarcand [ 09/Feb/11 ]

This is fixed in 0.7

if (req.getSession(false) != null && req.getSession().getMaxInactiveInterval() != -1 && req.getSession().getMaxInactiveInterval() * 1000 < timeout) {

Do you need a Hotfix (0.6.5) or you can use 0.7-SNAPSHOT?

Comment by nick_belaevski [ 09/Feb/11 ]

Jean-Francois,

Hotfix will be appreciated - I cannot test WebSockets integration due to this error.

Comment by jfarcand [ 11/Feb/11 ]

0.6.5 is uploading now.

– Jeanfrancois

Comment by nick_belaevski [ 11/Feb/11 ]

Thanks much!





[ATMOSPHERE-96] Websocket sample broken with Jetty 8.0.0.M2, but not 8.0.0.M1 Created: 07/Feb/11  Updated: 09/Feb/11  Resolved: 09/Feb/11

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Need to be investigated...the JQuery Sample fails with M2 but not M1



 Comments   
Comment by jfarcand [ 09/Feb/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/0f24329720ea69033934ef105d00b7ff6ba6f4e3





[ATMOSPHERE-93] migrate atmosphere-gwt into atmosphere GIT Created: 14/Jan/11  Updated: 18/Jan/11  Resolved: 18/Jan/11

Status: Resolved
Project: atmosphere
Component/s: client-gwt
Affects Version/s: None
Fix Version/s: 0.7

Type: New Feature Priority: Major
Reporter: jabbahj Assignee: jabbahj
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The following steps are needed:

  • Update the pom files to integrate correctly
  • change package names
  • update code changes from version atmosphere 0.6.3


 Comments   
Comment by jfarcand [ 18/Jan/11 ]

Integrated

https://github.com/Atmosphere/atmosphere/compare/d284c85058...bcf7855af5

The logger is not the correct one. Will file another issue for it.





[ATMOSPHERE-90] add support for cleaning up atmosphere handlers when AtmosphereServlet is destroyed by web container. Created: 07/Jan/11  Updated: 12/Apr/11  Resolved: 12/Jan/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Improvement Priority: Major
Reporter: ozzy-go-red-wings Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

add support for cleaning up atmosphere handlers when AtmosphereServlet is destroyed by web container.

Add cleanup() or similar method to AtmosphereHandler interface.

Call cleanup() from AtmosphereServlet destroy() method.

does anyone have a preference for method name??



 Comments   
Comment by jfarcand [ 12/Jan/11 ]

Fixed, Thanks

https://github.com/Atmosphere/atmosphere/commit/99d4d374a4d31ba57616227b30610954adb76a04





[ATMOSPHERE-89] migrate logging to SLF4J Created: 07/Jan/11  Updated: 12/Apr/11  Resolved: 11/Jan/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Improvement Priority: Major
Reporter: ozzy-go-red-wings Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

migrate all code to use SLF4J logging API.



 Comments   
Comment by jfarcand [ 11/Jan/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/c134d5acb8044fd5b0fd9f908c979c4e027de3af





[ATMOSPHERE-85] Compatibility issue with Prototype.js and problem with streaming Created: 28/Dec/10  Updated: 12/Apr/11  Resolved: 04/Jan/11

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Improvement Priority: Minor
Reporter: kuboluch Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File jquery.atmosphere.js    

 Description   

Hey,
I'm trying to integrate Atmosphere framework with my current project. First problem is with jQuery $ operator, because it's already used by prototypejs, so I've changed every usage of "$" to "jQuery" in my local version of jQuery.atmosphere.js. Second problem I've encountered concerns parsing response, when two or more messages are concatenated into one. In section when you look for "parent.callback" only the first message will be parsed and assinged to response.responseBody. I've added loop to parse all of them and to invoke callbacks multiple times. I've attached my version of jQuery.atmosphere.js.



 Comments   
Comment by jfarcand [ 04/Jan/11 ]

Patch applied, Thanks!

https://github.com/Atmosphere/atmosphere/commit/e224d31912ee7d75e8910f2464e3b0543ce41d19

Comment by jfarcand [ 04/Jan/11 ]

In 0.7





[ATMOSPHERE-84] Garantee of uniqueness amongst broadcasters Created: 09/Dec/10  Updated: 12/Apr/11  Resolved: 09/Dec/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Bug Priority: Minor
Reporter: mathieu.carbou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Trunk



 Description   

It's not a bug, mush more an improvement, to use UUID instead of Random integers

See Pull Request
https://github.com/Atmosphere/atmosphere/pull/5

Or directly:
https://github.com/mathieucarbou/atmosphere/commit/06a14a3224f8c40c59ccd40a582922feff30cc7d



 Comments   
Comment by jfarcand [ 09/Dec/10 ]

Integrated

https://github.com/Atmosphere/atmosphere/commit/06a14a3224f8c40c59ccd40a582922feff30cc7d

Comment by jfarcand [ 09/Dec/10 ]

In 0.7





[ATMOSPHERE-82] Better Guice+Jersey integration with GuiceManagedAtmoshpereServlet Created: 06/Dec/10  Updated: 06/Dec/10  Resolved: 06/Dec/10

Status: Resolved
Project: atmosphere
Component/s: guice
Affects Version/s: None
Fix Version/s: 0.7

Type: Improvement Priority: Major
Reporter: mathieu.carbou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Trunk version



 Description   

See GitHub Pull Request

https://github.com/Atmosphere/atmosphere/pull/3

Note: please review this file. This is a copy of the existing AtmosphereGuiceServlet, with two changes:

  • @Singleton
  • Removed GuiceFilter servlet from ReflectorServletProcessor to avoid the killer loop created when init is called

I've copied it to a more understandable name but perhaps you would prefer to take the existing one and modify it (but i really don't know how since you would have to detect that you are in a guice-managed context)

Enables to use a completely Guice-managed environment. web.xml only contains:

<listener>
<listener-class>org.company.GuiceContextListener</listener-class>
</listener>
<filter>
<filter-name>Guice Filter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Guice Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

In our Guice config, we setup Jersey + Atmosphere like this:

@Override
protected Injector getInjector() {
return Guice.createInjector(new ServletModule() {
@Override
protected void configureServlets() {
bind(MessageResource.class);
serve("/async/").with(*GuiceManagedAtmoshpereServlet.class, new HashMap<String, String>() {

{ put("org.atmosphere.useWebSocket", "true"); put("org.atmosphere.useNative", "true"); }

});
serve("/rest/").with(*GuiceContainer.class);
}
});
}



 Comments   
Comment by jfarcand [ 06/Dec/10 ]

Fixed

https://github.com/Atmosphere/atmosphere/compare/9a3799195c...ee03dfa5fd

Added some documentations as well.





[ATMOSPHERE-81] Fixing Maven POM files Created: 05/Dec/10  Updated: 06/Dec/10  Resolved: 06/Dec/10

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: None
Fix Version/s: 0.7

Type: Improvement Priority: Minor
Reporter: mathieu.carbou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File PATH1_fix_maven_pom.patch    

 Description   
  • wrong dependencies (some groupId and artifactId were inverted)
  • Fixing classpath conflicts regarding to servlet-api (now using mostly only one API from geronimo spec 3.0)
  • replacing dependencies containing embedded servlet-api to avoid classpath conflicts between 3.0 and 2.5 in IDEs

Please see Git Pull Request at https://github.com/Atmosphere/atmosphere/pull/1

Mathieu.



 Comments   
Comment by mathieu.carbou [ 05/Dec/10 ]

or see this patch otherwise

Comment by mathieu.carbou [ 05/Dec/10 ]

Note: mvn clean test passed.

Comment by mathieu.carbou [ 05/Dec/10 ]

Oups sorry don't apply this patch: it has a bad side effect

Comment by mathieu.carbou [ 05/Dec/10 ]

The attached patch alone does not work: please see the PULL REQUEST on Git Hub at

https://github.com/Atmosphere/atmosphere/pull/1

which works

Comment by mathieu.carbou [ 05/Dec/10 ]

Sorry: GOOD pull request is: https://github.com/Atmosphere/atmosphere/pull/2

The first one is closed.

Comment by jfarcand [ 06/Dec/10 ]

Thanks. Integrated in 0.7-SNAPSHOT.





[ATMOSPHERE-80] unused value for defaultBroadcastClassName static mutator on AtmosphereServlet Created: 03/Dec/10  Updated: 06/Dec/10  Resolved: 06/Dec/10

Status: Resolved
Project: atmosphere
Component/s: spade-server
Affects Version/s: 0.6.3
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: starbuxman Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Line 1213 in AtmosphereServlet just overwrites the value of the parameter with itself:

public static void setDefaultBroadcasterClassName(String broadcasterClassName)

{ broadcasterClassName = broadcasterClassName; }

should be something like :

public static void setDefaultBroadcasterClassName(String bccn)

{ this.broadcasterClassName = bccn }

 Comments   
Comment by starbuxman [ 03/Dec/10 ]

Eh, clearly I've filed it in the wrong component, and the ad-hoc example demonstrating the use of 'this' would not ever compile. But the point remains: the value on the class isn't being set, it's just overwriting the parameter value.

Comment by jfarcand [ 06/Dec/10 ]

Good catch

https://github.com/Atmosphere/atmosphere/commit/33a6811f71cfc92036e75aa87aaa8e04df37231f





[ATMOSPHERE-79] parallel changes overwritten in broadcastercache Created: 29/Nov/10  Updated: 30/Nov/10  Resolved: 30/Nov/10

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.6.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: mrbeatle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

2 writes in very close succession cause the BroadcasterCache to become corrupt, so that when writing two messages, I see the first message twice.



 Comments   
Comment by jfarcand [ 29/Nov/10 ]

Which BroadcasterCache are you using? Starting looking at it.....

Comment by mrbeatle [ 29/Nov/10 ]

I am using SessionBroadcasterCache

testing in JerseyClient:

0. subscribe to /1/test with this.client().setReadTimeout(1000); --> causes Broadcaster to be created on server
1. POST "ABC" to /1/test
2. POST "XYZ" to /1/test
3. Subscribe to /1/test

If 1 & 2 happen right after each other then I get

{"test":"ABC"} {"test":"ABC"}

If I sleep for 1 sec between 1 & 2 then I get

{"test":"ABC"} {"test":"XYZ"}

Interestingly enough, if I then subscribe again to /1/test, I get

{"vin":"ABC"} {"vin":"XYZ"}

again! It seems like after I have already been sent the cached items, I am sent them again.

Comment by mrbeatle [ 29/Nov/10 ]

Note: I am using long polling (resume on broadcast)

Comment by jfarcand [ 29/Nov/10 ]

Just curious (since you seems to have the source code). If you synchronize the SessionBroadcasterCache method, does it help? I think I need to have some read/write lock in that class.

Thanks!

Comment by mrbeatle [ 29/Nov/10 ]

I dont have access to subversion, only the sources from maven. I tried copying the code for SessionBroadcasterCache and BroadcasterCacheBase, renaming, and using this cache in my broadcaster. I synchronized retrieveLastMessage, cache, and addToCache, but this did not seem to change the behaviour.

Note: I have another problem of my own with session support not being properly activated in my junit, which I will have to deal with tomorrow (day over in Europe). I am getting these cached values anyway though. Is that expected behaviour??

Comment by jfarcand [ 29/Nov/10 ]

Salut,

the source is here:

https://github.com/Atmosphere/atmosphere

It contains the fix for you. Try it and let me know by downloading the latest 0.7-SNAPSHOT. As your last questions, can you share a test cases?

Thanks!

– Jeanfrancois

Comment by jfarcand [ 29/Nov/10 ]

Just te be sure, which exact version of Atmosphere are you using? I can see some issue if the BroadcasterConfig executorServices size is larger than 1 (I will fix that).

Comment by jfarcand [ 29/Nov/10 ]

OK, I can't fully test it right now but I've pushed a fix. Make sure you download the latest 0.7-SNAPSHOT

Comment by mrbeatle [ 30/Nov/10 ]

I was using 0.6.2.

Retested with 0.7-SNAPSHOT. The problem with a message being duplicated or lost is now fixed.

Comment by jfarcand [ 30/Nov/10 ]

Thanks for the feedback. Marking the issue as closed.





[ATMOSPHERE-78] ClassCastException when using SessionBroadcasterCache Created: 29/Nov/10  Updated: 29/Nov/10  Resolved: 29/Nov/10

Status: Resolved
Project: atmosphere
Component/s: None
Affects Version/s: 0.6.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: mrbeatle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

using Atmosphere 0.6.2



 Description   

broadcasterCache.retrieveFromCache(r) returns a List<Object>

JerseyBroadcasterUtil.broadcast:
else if (e.getMessage() instanceof List) {
for (String msg : (List<String>) e.getMessage())

{ <---- this cast is invalid for my message, which is an Object. I changed the code to: }

else if (e.getMessage() instanceof List) {
for (Object msg : (List<Object>) e.getMessage())

{ cr.setResponse(Response.ok(msg).build()); cr.getHttpHeaders().add(HttpHeaders.CONTENT_TYPE, m); cr.write(); cr.getOutputStream().flush(); }

}

which seems to work ok



 Comments   
Comment by jfarcand [ 29/Nov/10 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/c35482b4e03120267b649db971c04b95c5019ff7

Thanks!!!!





[ATMOSPHERE-77] littles fixes on jquery.atmosphere.js Created: 24/Nov/10  Updated: 01/Dec/10  Resolved: 24/Nov/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: mathieu.carbou Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File jquery.atmosphere.js_little_fixes_for_minification.patch    

 Description   

Patch created from trunk on Wednesday, November 24 2010 12:17:35

fixes some semicolons and other little things



 Comments   
Comment by jfarcand [ 24/Nov/10 ]

Fixed

https://github.com/Atmosphere/atmosphere/compare/91aa266afc...46ff7b81f9

Thanks!

Comment by jfarcand [ 01/Dec/10 ]

FYI, the following changes brokes IE Http Streaming. The fix just consist of removing the var so the connection doesn't get closed when garbage collected:

https://github.com/Atmosphere/atmosphere/commit/68cb13578cb5dd8d60527e56b0b724c5dfb48ae3





[ATMOSPHERE-72] WebApplicationException with Response.ok not working Created: 20/Oct/10  Updated: 21/Oct/10  Resolved: 21/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6.1
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: mrbeatle Assignee: atmosphere-issues
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 72

 Description   

As suggested in the newsgroup, I am using the following syntax to avoid
suspending in a long polling scenario if data is already present.
// data present, return without suspending
throw new WebApplicationException(Response.ok(sl).build());

Using Tomcat6, this works fine with
<param-name>org.atmosphere.useBlocking</param-name>
<param-value>false</param-value>

but when useBlocking is true, the "exception" is treated as a real exception by
Atmospehere and the client sees a 400 error.



 Comments   
Comment by mrbeatle [ 21/Oct/10 ]

actually, looks like the problem has nothing to do with blocking or not. I am
having the same problem on glassfish with native=true and blocking=false.

Is the cause maybe because I moved away from annotation based suspend and
instead used SuspendRersponse?

@Path("/signon/response")
@GET
@Produces(

{MediaType.APPLICATION_JSON}

)
public SuspendResponse<ResponseWrapper>
signOnGetResponse(@QueryParam("requestReplyId") String requestReplyId){
log.debug("GET /signon/response: requestReplyId" +
requestReplyId);
try {
Broadcaster responseBroadcaster =
BroadcasterFactory.getDefault().get(JerseyBroadcaster.class, requestReplyId);

responseBroadcaster.broadcastOnResume(ResponseWrapper.getTimeoutWrapper(requestR
eplyId));
ResponseWrapper result = (ResponseWrapper)
ScmaCache.getInstance().get(requestReplyId);
if (result != null)

{ // return the result immediately log.debug("GET /signon/response: result broadcasted immediately for requestReplyId: " + requestReplyId + "result: " + result); throw new WebApplicationException(Response.ok(result).build()); }

else

{ log.debug("GET /signon/response: result for requestReplyId: " + requestReplyId + "not found in the cache, so suspending"); SuspendResponse<ResponseWrapper> r = new SuspendResponse.SuspendResponseBuilder<ResponseWrapper>() .broadcaster(responseBroadcaster) .outputComments(false) //.addListener(new EventsLogger()) .period(1, TimeUnit.SECONDS) .resumeOnBroadcast(true) .header("requestReplyId", requestReplyId) .build(); return r; }


} catch (Exception e)

{ log.error("error calling signon", e); throw new WebApplicationException(400); }


}

here is the stack trace.
javax.ws.rs.WebApplicationException
at
com.xxx.myapp.webservices.services.social.SocialCentralService.signOnGetResponse
(SocialCentralService.java:763)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchP
rovider$JResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.jav
a:214)
at
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.di
spatch(ResourceJavaMethodDispatcher.java:67)
at
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:2
76)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.
java:133)
at
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.
java:83)
at
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.
java:133)
at
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResource
ClassesRule.java:71)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebAppl
icationImpl.java:1171)
at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebAppl
icationImpl.java:1103)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebAppli
cationImpl.java:1053)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebAppli
cationImpl.java:1043)
at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:406)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.j
ava:477)
at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.j
ava:662)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:15
5)
at
org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChai
n.java:116)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.servi
ce(ReflectorServletProcessor.java:271)
at
org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProce
ssor.java:135)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:187)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:14
6)
at
org.atmosphere.container.GrizzlyCometSupport.service(GrizzlyCometSupport.java:10
4)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1083)
at
org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1066)
at
com.xxx.myapp.webservices.WebServicesServletContainer.doPost(WebServicesServletC
ontainer.java:62)
at
org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1052)
at
com.xxx.myapp.webservices.WebServicesServletContainer.doGet(WebServicesServletCo
ntainer.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
79)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
88)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingS
tandardPipeline.java:85)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java
:165)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at
com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:473)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:341)
at
com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java
:161)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:137
)
at
com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:88)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:189)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:33
0)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)

Comment by jfarcand [ 21/Oct/10 ]

Add Paul for feedback

Comment by mrbeatle [ 21/Oct/10 ]

sorry, this is my error! I was catching the exception myself, thus breaking the
mechanism.

Comment by jfarcand [ 21/Oct/10 ]

You beat me on the test

Closing then . Thanks for all the feedback Continue !!!





[ATMOSPHERE-71] Add support for Broadcast.broadcastOnResume() Created: 18/Oct/10  Updated: 18/Oct/10  Resolved: 18/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.4

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 71

 Description   

See

http://is.gd/g6XcI



 Comments   
Comment by jfarcand [ 18/Oct/10 ]

New API added:

Broadcaster.broadcastOnResume(...)

http://github.com/Atmosphere/atmosphere/commit/41552b600460996965a7bff6f24cf71e2eadd58e





[ATMOSPHERE-70] Tomcat AIO support not always detected Created: 15/Oct/10  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 70

 Description   

It seems Tomcat doesn't detect the CometProcessor interface as described here

http://is.gd/g3bD9



 Comments   
Comment by jfarcand [ 22/Oct/10 ]

I didn't get any feedback for a week, marking this issue as WORKFORM





[ATMOSPHERE-69] set user-defined headers at time of broadcast Created: 07/Oct/10  Updated: 08/Dec/10  Resolved: 19/Nov/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6.1
Fix Version/s: 0.7

Type: Improvement Priority: Critical
Reporter: mrbeatle Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 69

 Description   

Allow access to setting user-defined headers at time of broadcast, for instance
via:

broadcaster.header("last-writer", writerId).broadcast(message);



 Comments   
Comment by jfarcand [ 18/Oct/10 ]

To make it work with all transport (websocket, long-polling and http streaming),
I propose:

broadcast.onFirstBroadcast(....)

what do you think?

Comment by mrbeatle [ 19/Oct/10 ]

How would the whole call then work? Would I call onFirstBroadcast("headerName",
"headerContent") instead of the normal broadcast()?

On a more abstract level, is there any other metadata (similar to headers) sent
with websocket or streaming transports that could be used for the same purpose :
the original use case for me was to include last-modifier meta-information, but I
don't really care if this info is sent via header or some other mechanism, I just
wanted to avoid changing all my data structures to include meta-info also. The
important part is that I can set the meta-info directly before the data is
broadcast to listeners (and not when they first suspend)

Comment by jfarcand [ 19/Oct/10 ]

OK I don't like my proposal. So I will implement

broadcaster.header("","").broadcast(....);

I need to think about some exception to be thrown in case the headers has
already been written.

I like the idea of sending meta data, but it may force people to follow our
protocol (like cometd is doing, which I don't like). The difficult part would be
to make sure the mata data doesn't interfere with current broadcast. Thinking.....

Comment by jfarcand [ 19/Nov/10 ]

Fixed by adding a new PerRequestBroadcastFilter:

http://is.gd/hqYzF

All you need to do is to define the filter in web.xml or add it to the broadcaster

broadcaster.getBroadcasterConfig().addFilter(...);

And that filter will be invoked per request, with the original HttpServletRequest. You can look at the Atmosphere JQuery Plugin special filter as an example:

http://is.gd/hqYGh

(https://github.com/Atmosphere/atmosphere/commit/0dae9e19412db4454e9626e0fdac1deebadc5868)

Comment by mrbeatle [ 08/Dec/10 ]

How would I then set the outgoing header? I can set something on the message itself, but I see no way of accessing the response headers.

Comment by jfarcand [ 08/Dec/10 ]

OK I've added the HttpServletResponse to the API as well

https://github.com/Atmosphere/atmosphere/commit/b159c507ef3625fe0228e689500a909916443c68

Javadocs

http://is.gd/hqYzF

Thanks for the feedback!





[ATMOSPHERE-68] Add a Wicket sample Created: 06/Oct/10  Updated: 06/Oct/10  Resolved: 06/Oct/10

Status: Resolved
Project: atmosphere
Component/s: samples
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 68

 Description   

Andrey Belyaev shared a Wicket sample, I've added JQuery support in it and we
should add it to the distribution.



 Comments   
Comment by jfarcand [ 06/Oct/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/2c1aa69730f0dce2a9904fdf84582bbe7ddaaea6





[ATMOSPHERE-67] Meteor shouldn't be cached using the HttpServletRequest Created: 06/Oct/10  Updated: 06/Oct/10  Resolved: 06/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 67

 Description   

Some framework like Wicket wrap the HttpServletRequest into their own pool of
instances, so there is some case where the same Meteor will be returned because
of the same key.



 Comments   
Comment by jfarcand [ 06/Oct/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/4e61f66a2bdebb623ff6b434ac549ce1ca21d038





[ATMOSPHERE-66] AtmosphereResourceEventListener should be invoked after the real broadcast Created: 06/Oct/10  Updated: 06/Oct/10  Resolved: 06/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 66

 Description   

Currently the AtmosphereResourceEventListener.onBroadcast(..) is called before
the message is written. It should be written after instead to make it possible
to resume a connection from the onBroadcast



 Comments   
Comment by jfarcand [ 06/Oct/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/cb3722a5a60a897faa515638a5da2ac6ddc1391a





[ATMOSPHERE-65] Issue with Jersey 1.4 and Atmoshere Spade server Created: 05/Oct/10  Updated: 24/Nov/10  Resolved: 08/Oct/10

Status: Resolved
Project: atmosphere
Component/s: spade-server
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Bug Priority: Major
Reporter: jfarcand Assignee: sandoz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 65

 Description   

The following exception only happens when Jersey 1.4 gets integrated in
Atmosphere. It can be reproduced by bumping the pom.xml Jersey's version and
running the unit test.

Oct 5, 2010 12:45:35 PM org.atmosphere.grizzly.AtmosphereSpadeServer start
INFO: AtmosphereSpade Server Started on port: 7777
Oct 5, 2010 12:45:35 PM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.19 - 10/5/10 12:45 PM
Oct 5, 2010 12:45:36 PM org.atmosphere.grizzly.AtmosphereSpadeServer start
INFO: AtmosphereSpade Server Started on port: 9999
Oct 5, 2010 12:45:36 PM com.sun.grizzly.Controller logVersion
INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.19 - 10/5/10 12:45 PM
Running testSuspendTimeout
Oct 5, 2010 12:45:36 PM org.atmosphere.cpr.AtmosphereServlet
detectSupportedFramework
WARNING: Missing META-INF/atmosphere.xml but found the Jersey runtime. Starting
Jersey
Oct 5, 2010 12:45:36 PM org.atmosphere.cpr.AtmosphereServlet configureBroadcaster
INFO: Using org.atmosphere.jersey.JerseyBroadcaster
Oct 5, 2010 12:45:36 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
org.atmosphere.tests.spade
Oct 5, 2010 12:45:36 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class org.atmosphere.tests.spade.PubSubTest
Oct 5, 2010 12:45:36 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
Oct 5, 2010 12:45:36 PM
com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:30 PM'
Oct 5, 2010 12:45:37 PM com.sun.jersey.spi.inject.Errors processErrorMessages
SEVERE: The following errors and warnings have been detected with resource
and/or provider classes:
SEVERE: Missing dependency for method public
org.atmosphere.jersey.Broadcastable
org.atmosphere.tests.spade.PubSubTest.suspendScopeRequest(org.atmosphere.cpr.Broadcaster)
throws java.util.concurrent.ExecutionException,java.lang.InterruptedException at
parameter at index 0
SEVERE: Method, public org.atmosphere.jersey.Broadcastable
org.atmosphere.tests.spade.PubSubTest.suspendScopeRequest(org.atmosphere.cpr.Broadcaster)
throws java.util.concurrent.ExecutionException,java.lang.InterruptedException,
annotated with GET of resource, class org.atmosphere.tests.spade.PubSubTest, is
not recognized as valid resource method.
SEVERE: Missing dependency for field: private org.atmosphere.cpr.Broadcaster
org.atmosphere.tests.spade.PubSubTest.broadcaster
Oct 5, 2010 12:45:37 PM org.atmosphere.cpr.AtmosphereServlet init
SEVERE:
com.sun.jersey.spi.inject.Errors$ErrorMessagesException
at com.sun.jersey.spi.inject.Errors.processErrorMessages(Errors.java:170)
at com.sun.jersey.spi.inject.Errors.postProcess(Errors.java:137)
at com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:203)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:695)
at
com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:690)
at
com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:438)
at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:287)
at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:587)
at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:213)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:342)
at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:516)
at javax.servlet.GenericServlet.init(GenericServlet.java:241)
at
org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:109)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:251)
at
org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:148)
at
org.atmosphere.cpr.AtmosphereServlet.initAtmosphereServletProcessor(AtmosphereServlet.java:755)
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:533)
at
com.sun.grizzly.http.servlet.ServletAdapter.loadServlet(ServletAdapter.java:451)
at
com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:390)
at
com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:347)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:186)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:483)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:346)
at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:85)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:168)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:140)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:90)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:190)
at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:172)
at
com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:142)
at
com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:202)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
at java.lang.Thread.run(Thread.java:637)
Oct 5, 2010 12:45:37 PM com.sun.grizzly.http.servlet.ServletAdapter doService
SEVERE: service exception:
javax.servlet.ServletException
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:540)
at
com.sun.grizzly.http.servlet.ServletAdapter.loadServlet(ServletAdapter.java:451)
at
com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:390)
at
com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:347)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:186)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:483)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:346)
at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:85)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:168)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:140)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:90)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:190)
at com.sun.grizzly.http.TaskBase.execute(TaskBase.java:172)
at
com.sun.grizzly.arp.DefaultAsyncHandler.handle(DefaultAsyncHandler.java:142)
at
com.sun.grizzly.arp.AsyncProtocolFilter.execute(AsyncProtocolFilter.java:202)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
at java.lang.Thread.run(Thread.java:637)
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.092 sec <<<
FAILURE!

Results :

Failed tests:
testSuspendTimeout(org.atmosphere.tests.spade.SpadeServerTest)



 Comments   
Comment by sandoz [ 06/Oct/10 ]

When Jersey 1.3 is used the following is output:

INFO: Initiating Jersey application, version 'Jersey: 1.3 06/17/2010 04:53 PM'
Oct 6, 2010 2:29:33 PM com.sun.jersey.server.impl.application.WebApplicationImpl
_initiate
INFO: Adding the following classes declared in
META-INF/services/jersey-server-components to the resource configuration:
class org.atmosphere.jersey.BroadcasterInjector
class org.atmosphere.jersey.AtmosphereProviders$BroadcasterProvider
class org.atmosphere.jersey.BroadcasterFactoryInjector
class org.atmosphere.jersey.AtmosphereResourceInjector
class org.atmosphere.jersey.AtmosphereResourceConfigurator
Oct 6, 2010 2:29:33 PM org.atmosphere.cpr.AtmosphereServlet init
INFO: Atmosphere Framework 0.7-SNAPSHOT started.

When Jersey 1.4 is used the following is output:

INFO: Initiating Jersey application, version 'Jersey: 1.4 09/11/2010 10:30 PM'
Oct 6, 2010 2:22:46 PM com.sun.jersey.spi.inject.Errors processErrorMessages
SEVERE: The following errors and warnings have been detected with resource
and/or provider classes:
SEVERE: Missing dependency for method public
org.atmosphere.jersey.Broadcastable
org.atmosphere.tests.spade.PubSubTest.suspendScopeRequest(org.atmosphere.cpr.Broadcaster)
throws java.util.concurrent.ExecutionException,java.lang.InterruptedException at
parameter at index 0
SEVERE: Method, public org.atmosphere.jersey.Broadcastable
org.atmosphere.tests.spade.PubSubTest.suspendScopeRequest(org.atmosphere.cpr.Broadcaster)
throws java.util.concurrent.ExecutionException,java.lang.InterruptedException,
annotated with GET of resource, class org.atmosphere.tests.spade.PubSubTest, is
not recognized as valid resource method.
SEVERE: Missing dependency for field: private org.atmosphere.cpr.Broadcaster
org.atmosphere.tests.spade.PubSubTest.broadcaster
Oct 6, 2010 2:22:46 PM org.atmosphere.cpr.AtmosphereServlet init
SEVERE:

So the the file META-INF/services/jersey-server-components is not getting
detected for 1.4 when using the spade server.

This is not an issue for the unit tests of the jersey module thus something
screwy might be going on the class loading for the uber jar.

It could be due to the version isolation mechanism we updated for 1.4.

Comment by sandoz [ 06/Oct/10 ]

There is a bug in the logic of Jersey version isolation mechanism, should be
fixed in the 1.5-SNAPSHOT soon.

This should only occur for the unit tests. The spade server uber jar if
generated should work as there is an artifact included from the jersey jars
(META-INF/jersey-module-version) that ensures the issue will not occur.

In this respect the unit tests are not testing the with uber jar. Perhaps we
should have some additional tests that do that?

Comment by jfarcand [ 06/Oct/10 ]

I agree we should add them.

Comment by sandoz [ 07/Oct/10 ]

Actually don't we have a spade-server sample using Jersey? Perhaps we can add
unit tests to that sample as IIRC the samples don't have unit tests. In Jersey
we found that adding such tests where possible to the samples were really useful
(strictly speaking they are functional tests...). It would also be a good way of
showing off the async client API. I am wondering if there could be a connection
between the Jersey test framework and this, perhaps something to consider later on.

Comment by sandoz [ 07/Oct/10 ]

Atmosphere builds and tests successfully with a local build of Jersey
1.5-SNAPSHOT. I think we will do a 1.5-ea release next week.

Comment by jfarcand [ 08/Oct/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/0381a4dd7dc680b08d631b1dc26e42979ef3dbb6

Comment by mkochco [ 20/Nov/10 ]

I'm seeing this using Jersey 1.4, Atmosphere 0.6.3 and Jetty 6.1.11. I'm a little confused after reading the commit details from jfarcand. Is moving to an EA version of Jersey 1.5 the only fix for this issue?

Comment by jfarcand [ 22/Nov/10 ]

Yes, updating should make the work.

Comment by mkochco [ 23/Nov/10 ]

Atmosphere is not compatible with Jersey 1.4. Is this a correct statement? We would really like to use Atmosphere in an upcoming project. It's a great framework. I understand how difficult it is to keep things compatible but will it be common for Atmosphere and Jersey to be incompatible in future releases?

Comment by jfarcand [ 24/Nov/10 ]

Atmosphere is compatible with Jersey, but there is a regression in Jersey 1.4. You can either use 1.3 or 1.5 and it should works. Only 1.4 Paul and I missed one scenario.

Thanks!!!

– Jeanfrancois





[ATMOSPHERE-64] Set the default BroadcasterConfig ExecutorService size to 1 Created: 04/Oct/10  Updated: 04/Oct/10  Resolved: 04/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 64

 Description   

Set the default BroadcasterConfig ExecutorService size to 1 so it is not
required by default to invoke the Broadcaster.get() to make sure messages aren't
send out of order.



 Comments   
Comment by jfarcand [ 04/Oct/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/compare/1b9ac374f4...8c78a9368c





[ATMOSPHERE-63] Fallback transport from Websocket to Comet issue with Chrome Created: 30/Sep/10  Updated: 30/Sep/10  Resolved: 30/Sep/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6
Fix Version/s: 0.6.3

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 63

 Description   

The current implementation in the JQuery PlugIn isn't falling back properly and
also makes an extra/invalid request.



 Comments   
Comment by jfarcand [ 30/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/2cd35387d46fffc5b1aa964aa3eee68dbe4be4b7





[ATMOSPHERE-62] Improve broadcaster.broadcast() to handle errors Created: 30/Sep/10  Updated: 18/Nov/10  Resolved: 18/Nov/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7
Fix Version/s: 0.7

Type: Improvement Priority: Major
Reporter: nextone Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All
URL: http://www.encausse.net


Issuezilla Id: 62

 Description   

Add feedback to broadcaster#broadcast() :

public void myMethod(){
Broadcaster bc = BroadcasterFactory.getDefault().lookup(...);
bc.broadcast("text",resource);
}

If broadcast() fails there is not feedback. Should do:

public void myMethod(){
Broadcaster bc = BroadcasterFactory.getDefault().lookup(...);
if (bc.broadcast("text",resource).hasFailed())

{ ... }

}

or something like :

public void myMethod(){
Broadcaster bc = BroadcasterFactory.getDefault().lookup(...);
try

{ bc.broadcast("text",resourceSet); }

catch(Exception ex){
for (AtmosphereResource ar : resourceSet){
if (ar.isClosed())

{ // Something like that ... }

}
}
}



 Comments   
Comment by jfarcand [ 22/Oct/10 ]

Will add a new callback on AtmosphereResourceEventListener

onThrowable(AtmosphereResourceEvent event)

{ Throwable t = event.throwable(); }
Comment by jfarcand [ 18/Nov/10 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/41851d2488126e4cb85dd12233154ef77e9f6d8a





[ATMOSPHERE-61] Fail the websocket handshake before invoking a resource Created: 29/Sep/10  Updated: 29/Sep/10  Resolved: 29/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 61

 Description   

Currently we fail the websocket request after the resource has been executed. We
must fail it as soon as we detect that the running Container isn't supporting
Websocket



 Comments   
Comment by jfarcand [ 29/Sep/10 ]

Fixed:

http://github.com/Atmosphere/atmosphere/commit/667d3c8b6a0177cfa2137ea42d68764e397488ff





[ATMOSPHERE-60] Some data might be lost when junk comments are mixed with streaming data Created: 29/Sep/10  Updated: 29/Sep/10  Resolved: 29/Sep/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 60

 Description   

The current plugin may remove some data if the data is included in the same
packet as the Atmosphere's junk comments.



 Comments   
Comment by jfarcand [ 29/Sep/10 ]

http://github.com/Atmosphere/atmosphere/commit/f1f8ea9d838d85d9abb28542d92c6b240407bc89





[ATMOSPHERE-59] No flags/exception while broadcasting to a broken pipe Created: 28/Sep/10  Updated: 29/Sep/10  Resolved: 29/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.7
Fix Version/s: 0.6.2

Type: Improvement Priority: Major
Reporter: nextone Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All
URL: http://encausse.titanpad.com/2


Issuezilla Id: 59

 Description   

Environement:
-------------

  • Tomcat 5.5
  • JDK 1.6
  • Atmosphere 0.7
  • Configure web.xml with org.atmosphere.cpr.CometSupport.maxInactiveActivity

How to reproduce:
-----------------

1. Create a Servlet that extends AtmosphereHandler
2. onRequest(): store the AtmosphereResource
3. onStateChange(): release the AtmosphereResource
=> AtmosphereResource are correctly set and released after the maxInactiveActivity.

4. Close browser windows then quickly fire a broadcast(server thread, JDring or JSP
call) BEFORE maxInactiveActivity :

4.1 Broadcaster bc = BroadcasterFactory.getDefault().lookup(DefaultBroadcaster.class,
"/MyAtmosphereServlet");
4.2 Iterate throught AtmosphereResource to pick some of them
4.3 Broadcast: bc.broadcast(text, resourceSet);

=> The Broadcast is correctly performed but there is no flags, exception, ... telling
the text was not send because of broken pipe (browser window is closed)

Use Case:
---------

  • The website build a hidden IFrame on each page while browsing (after 2s)
  • The server store in a Map: Application's UsersId / (Set of AtmosphereResource)
  • The latest AtmosphereResource of the user's Set is flag as "Active"
  • When server broadcast a messages to users it choose the "Active" connection (not all
    user's connection) because we dont want to spam all it's browser's tabs.
  • If the user close it's active connection the message is not received, there is no
    feedback fom API and we can't default on an other user connection.


 Comments   
Comment by jfarcand [ 29/Sep/10 ]

looking...

Comment by jfarcand [ 29/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/d5202dab64437ce781a9b124616c79878d18703b





[ATMOSPHERE-58] Shared BroadcasterConfig instance Created: 27/Sep/10  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: bertrandg Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: PC


Issuezilla Id: 58

 Description   

Testing Atmosphere 0.6.1, I used three Atmosphere handlers defined in a Grails
1.3.4 application; adding a filter with some (Groovy) code like this on one
handler:

broadcaster.broadcasterConfig.addFilter(new XSSHtmlFilter())

I remarked that this filter was used for the all broadcasters. So examining the
reference objects I saw that the same BroascaterConfig instance was used by the
three broadcasters.

The web container used is Tomcat 6.0-snapshot



 Comments   
Comment by jfarcand [ 29/Sep/10 ]

OK, I've deployed:

atmosphere-chat.war
atmosphere-pubsub.war
atmosphere-twitter-search.war

The classloader is isolating the static variable so I don't see shared
BroadcasterConfig instance. Can it be a Grails issue?

Comment by bertrandg [ 29/Sep/10 ]

Precisely, the three Atmosphere handlers are declared in the same web application
(using the Grails Atmosphere plugin).
Is it recommanded to use only one Atmosphere in a web application?

Comment by jfarcand [ 04/Oct/10 ]

Ha! This is a valid use case.

Comment by jfarcand [ 22/Oct/10 ]

Fixed
http://github.com/Atmosphere/atmosphere/commit/eef217ffbefe7a10a8df1d37680348dabe69c5af





[ATMOSPHERE-57] FF automatic reconnect issue on refresh Created: 21/Sep/10  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 57

 Description   

See

http://is.gd/flwnn



 Comments   
Comment by jfarcand [ 22/Oct/10 ]

Fixed in 0.7 unless I'm no longer able to reproduce





[ATMOSPHERE-55] Add support for Callable<?> to Broadcaster.schedule Created: 20/Sep/10  Updated: 20/Sep/10  Resolved: 20/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 55

 Description   

Add support for Callable, which get executed when the scheduling occurs.



 Comments   
Comment by jfarcand [ 20/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/3c0079d39403afe3394b3461dfb11284e4a13d61





[ATMOSPHERE-54] Delayed Broadcast Message Out of Order with String Created: 18/Sep/10  Updated: 18/Sep/10  Resolved: 18/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 54

 Description   

See

http://is.gd/fgzFf



 Comments   
Comment by jfarcand [ 18/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/4f137caa5fc4ed14e5722cfaf84119553f69a1bc





[ATMOSPHERE-53] Allow session timeout configuration Created: 16/Sep/10  Updated: 16/Sep/10  Resolved: 16/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 53

 Description   

By default Atmosphere doesn't allow configuring the session-timeout. Improve
that behavior by allowing it when specified in web.xml



 Comments   
Comment by jfarcand [ 16/Sep/10 ]

http://github.com/Atmosphere/atmosphere/commit/cd930857c8b48adee2eaf409e9669f333e57fd0e





[ATMOSPHERE-52] Websocket connection disposal with Jetty Created: 15/Sep/10  Updated: 15/Sep/10  Resolved: 15/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 52

 Description   

See

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Websocket-connection-disposal-tt5534499.html#a5534499



 Comments   
Comment by jfarcand [ 15/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/1c97bea29b753280c75f316acd8adcfa46c838ca





[ATMOSPHERE-51] Delayed/buffered broadcast not cleared when @Schedule is used Created: 12/Sep/10  Updated: 12/Sep/10  Resolved: 12/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 51

 Description   

See

http://is.gd/f7ILT



 Comments   
Comment by jfarcand [ 12/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/707b61c56a7fe332178515c9cfc741b952577eb6





[ATMOSPHERE-50] NPE in BroadcastConfig Created: 10/Sep/10  Updated: 10/Sep/10  Resolved: 10/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 50

 Description   

See

http://is.gd/f4bpm



 Comments   
Comment by jfarcand [ 10/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/78749736702bdb6f656cf9b9a7e4ef2e25f29bd1





[ATMOSPHERE-49] GAE support broken Created: 08/Sep/10  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 49

 Description   

GAE support is currently broken. The application works fine when deployed
locally but fail when deployed in the cloud. Some work need to be done with the
way the broadcast messages are sent.



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.





[ATMOSPHERE-48] X-Cache-Date must be fill expended date String, not UTC time. Created: 07/Sep/10  Updated: 07/Sep/10  Resolved: 07/Sep/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 48

 Description   

From the mailling list

I just encountered another issue as well in trying to make long-polling work
with the HeaderBroadcasterCache. The jQuery plugin sets the X-Cache-Date header
to a fully expanded date string, rather than UTC time expressed in ms as the
HeaderBroadcasterCache expects.

In jquery.atmosphere.js, I believe

ajaxRequest.setRequestHeader("X-Cache-Date", new Date());

should be

ajaxRequest.setRequestHeader("X-Cache-Date", new Date().getTime());

to be compatible with the HeaderBroadcasterCache.



 Comments   
Comment by jfarcand [ 07/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/eeb17b22918a066bdc4c22dcf681072a8ca0ae90





[ATMOSPHERE-47] (Grizzly 1.9.19 regression) Grizzly's Websocket support broken after integration of 1.9.19 Created: 07/Sep/10  Updated: 05/Jan/11  Resolved: 05/Jan/11

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 47

 Description   

The current Grizzly's Websocket support is currently broken because of the API
changes made recently. The patch from Justin compile but hasn't been tested enough:

http://github.com/Atmosphere/atmosphere/commit/02e26ecdf4fc12462152732024e55d56c9e9ea3a



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 10/Sep/10 ]

The issue is in Grizzly itself. 1.9.19 only support Websocket when the
WebSocketEngine gets initialized in Servlet.init(). If you try to do it in
service, the following code in WebSocketEngine alwasy return null

public boolean handle(AsyncExecutor asyncExecutor) {
WebSocket socket = null;
try {
Request request = asyncExecutor.getProcessorTask().getRequest();
if ("WebSocket".equalsIgnoreCase(request.getHeader("Upgrade")))

{ socket = getWebSocket(asyncExecutor, request); }

} catch (IOException e)

{ return false; }

return socket != null;
}

Comment by jfarcand [ 14/Sep/10 ]

I've hacked a workaround, which is to specify the servlet path in web.xml so
Grizzly is able to upgrade the connection

http://github.com/Atmosphere/atmosphere/commit/414183f94642e5d02b4aae728adaa3047f78e262

Example:

<init-param>
<param-name>grizzly.application.path</param-name>
<param-value>/index.html</param-value>
</init-param>

will tell Atmosphere to invoke WebsocketEngine.register(/index.htm) so all
request to that resource will be upgraded. The websocket sample now works
properly, there is still another hack needed to make Jersey works.

Comment by jfarcand [ 05/Jan/11 ]

Fixed

https://github.com/Atmosphere/atmosphere/commit/8a0e2ccee9fefef7318fe6fe4ee41c52a0c93ebd





[ATMOSPHERE-46] Headers not set when defined on the request Created: 07/Sep/10  Updated: 07/Sep/10  Resolved: 07/Sep/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6.1
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 46

 Description   

See

http://is.gd/eTNQR



 Comments   
Comment by jfarcand [ 07/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/90bb457e7f59c9d3446a7481b0fe6f606d6df4a7





[ATMOSPHERE-44] cannot resume with @Resume Created: 30/Aug/10  Updated: 21/Sep/10  Resolved: 21/Sep/10

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.6.1
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: mehdiabbes Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows XP
Platform: PC


Issuezilla Id: 44

 Description   

see :

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/cannot-resume-with-
Resume-td5412422.html#a5412422



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 10/Sep/10 ]

Included in 0.6.2

Comment by jfarcand [ 21/Sep/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/04eecf90131b312c8bb4869dc612df7ff0e0d0de

I've tested by adding in atmosphere.xml session-support="true" with

@GET
@Suspend(listeners=

{EventsLogger.class}

)
public Broadcastable subscribe()

{ return new Broadcastable(topic); }

@GET
@Resume
@Path("/resume")
public String resume()

{ return "resumed"; }

And

(Suspend)
curl http://127.0.0.1:8080/atmosphere-pubsub/chat

(Resume, using the cookie from the Suspend request)
curl -b JSESSIONID=C6A6FC4D976F72A36E77E4225ABDF209
http://127.0.0.1:8080/atmosphere-pubsub/chat/resume





[ATMOSPHERE-43] Add support for Jetty 7 Websocket Created: 29/Aug/10  Updated: 12/Sep/10  Resolved: 12/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6.1
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: survivant
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 43

 Description   

Currently only Jetty 8 is supported.



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 10/Sep/10 ]

Sebastien has a fix.

Comment by survivant [ 10/Sep/10 ]

changed how to find classes in classpath. Use
Thread.currentThread().getContextClassLoader().loadClass(testClass) instead of
Class.findClass(testClass)

Comment by jfarcand [ 12/Sep/10 ]

Fix target.

http://github.com/Atmosphere/atmosphere/commit/7cba3879ef8845d936f99b8c2896f48e5ba188f1





[ATMOSPHERE-42] Default values of Broadcaster parameters (@DefaultValue) Created: 29/Aug/10  Updated: 25/Oct/10  Resolved: 25/Oct/10

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.6.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 42

 Description   

See:

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Fixed-Jersey-issues-546-related-to-default-values-of-Broadcaster-parameters-tt5469167.html#a5469167



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 22/Oct/10 ]

This has been fixed by Paul. Available in 0.7

Comment by sandoz [ 25/Oct/10 ]

Updated the BroadcasterProvider to use the the
@StringReader.ValidateDefaultValue(false) annotation.





[ATMOSPHERE-41] Switching transport not working Created: 29/Aug/10  Updated: 29/Aug/10  Resolved: 29/Aug/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6.1
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 41

 Description   

See:

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/jquery-pubsub-transport-switch-tt5386090.html#a5386090



 Comments   
Comment by jfarcand [ 29/Aug/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/d31534c1b52051b01a288bb516605bdaa379fe61





[ATMOSPHERE-40] Bayeux support broken with JBoss 5.1 Created: 29/Aug/10  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 40

 Description   

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Jboss-5-1-and-atmosphere-bayeux-samples-0-6-1-war-tt5355251.html#a5355251



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 22/Oct/10 ]

Fix available in 0.7





[ATMOSPHERE-39] NPE in AtmosphereServlet on Jetty (with WebSockets) Created: 26/Aug/10  Updated: 12/Sep/10  Resolved: 12/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.6.2

Type: Bug Priority: Major
Reporter: mwessendorf Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File NPE_AtmosphereServlet.patch    
Issuezilla Id: 39

 Description   

Strange NPE on Jetty 7.1.x - looks like was not tested



 Comments   
Comment by mwessendorf [ 26/Aug/10 ]

Created an attachment (id=3)
fix

Comment by mwessendorf [ 26/Aug/10 ]

Ok.. I do get more NPEs.

Looks like WebSocket is totally broken (or the sample is wrong), on jetty 7.1.x

Comment by mwessendorf [ 26/Aug/10 ]

java.lang.NullPointerException
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1093)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1076)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1062)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:527)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:423)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:493)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:358)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:866)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:245)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)
at org.eclipse.jetty.server.Server.handle(Server.java:351)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:594)
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1042)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:549)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:211)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:424)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:506)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Thread.java:619)

===> Why is comet stuff needed for websocket?

Comment by mwessendorf [ 26/Aug/10 ]

do not see it with Jetty 8.0.0.M0

Comment by jfarcand [ 29/Aug/10 ]

Grr I always assumed Jetty 8 was the only one supporting Websocket. I've filled
issue:

https://atmosphere.dev.java.net/issues/show_bug.cgi?id=43

to implement it and then I will make sure this issue get fixed. THANKS!

Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 12/Sep/10 ]

The NPE was a consequence of Websocket not supported in Jetty 7.1 This is now fixed

http://github.com/Atmosphere/atmosphere/commit/7cba3879ef8845d936f99b8c2896f48e5ba188f1

Do you need the Eclipse/Maven plugin or it was a typo? I can add it





[ATMOSPHERE-38] jquery.atmosphere.js 'long-polling' and 'streaming' modes do not work in WebKit or IE Created: 10/Aug/10  Updated: 12/Apr/11  Resolved: 21/Sep/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: ghazel Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 38

 Description   

I set up a very simple HTTP/1.1 chunked server which outputs the WebKit "junk" padding, same as
Atmosphere. It then counts up once per second, outputting a chunk each time.

FireFox: 'streaming' mode works and I get the new number in responseBody each callback. In 'long-
polling' mode on Firefox I get the entire payload in responseBody, from the beginning, each time. The
difference there is a bit odd.

WebKit: Both modes, I get callbacks every second but responseBody is empty ("").

IE: 'streaming' I get no callbacks, but if I change my server to output <script> tags they do execute
once per second. 'long-polling' I get no callbacks until the connection is closed.

Is there something special I need to do to get WebKit to work at all?



 Comments   
Comment by jfarcand [ 29/Aug/10 ]

Hum, can you tried the atmosphere-jquery-pubsub sample and see if that works? It
works fine for me so I'm puzzled about why it isn't with your application

http://oss.sonatype.org/content/repositories/releases/org/atmosphere/samples/atmosphere-pubsub/0.6.1/

Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 21/Sep/10 ]

Close it as fixed as I haven't heard back and it works for me.





[ATMOSPHERE-37] Errors during reconnect on GF 3.0.1 Created: 28/Jul/10  Updated: 29/Sep/11  Resolved: 29/Sep/11

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.7
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: nakoned Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 37

 Description   

As reported on a mailing list. There are some issues with Atmosphere that happen
during reconnect to GF. Please refer to:

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Intermettent-Errors-during-reconnect-td5303153.html#a5303153

for details.



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.





[ATMOSPHERE-36] Broadcaster#setScope now working as expected Created: 22/Jul/10  Updated: 12/Apr/11  Resolved: 22/Jul/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: fmoga Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issuezilla Id: 36

 Description   

Steps to reproduce:

1) Open the meteor-chat sample
2) Append the following line in the doGet method:
Meteor m = Meteor.build(req, list, null);
m.getBroadcaster().setScope(SCOPE.REQUEST); <---
3) Deploy to Tomcat appserver

Expected result:

  • Each client receives it's own messages

Actual result:

  • Application behaves as application scope is used

Notes:

  • This reproduces on the atmosphere-chat sample as well
  • Adding more logging to the methods, broadcaster keeps request scope set but
    doesn't behave like that


 Comments   
Comment by jfarcand [ 22/Jul/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/3396c8aa733dbbcf36d0be7a6562b7a4454f38bc





[ATMOSPHERE-35] Update to Grizzly 1.9.19-beta6 Created: 21/Jul/10  Updated: 21/Jul/10  Resolved: 21/Jul/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 35

 Description   

1.9.19-beta6 contains fixes for the hack I needed to add in order to support web
socket.



 Comments   
Comment by jfarcand [ 21/Jul/10 ]

Fixed

http://github.com/Atmosphere/atmosphere/commit/02e26ecdf4fc12462152732024e55d56c9e9ea3a





[ATMOSPHERE-34] SCOPE issue with Meteor Created: 18/Jul/10  Updated: 18/Jul/10  Resolved: 18/Jul/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 34

 Description   

See

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/SCOPE-REQUEST-on-Meteor-tt5309814.html#a5309814



 Comments   
Comment by jfarcand [ 18/Jul/10 ]

Fixed

ad004f3..9a1b714 master -> master





[ATMOSPHERE-33] java.lang.IllegalStateException with BlockingIOCometSupport and CometSupport.maxInactiveActivity Created: 09/Jul/10  Updated: 09/Jul/10  Resolved: 09/Jul/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 33

 Description   

As reported on the user list, setting

<init-param>
<param-name>org.atmosphere.cpr.CometSupport.maxInactiveActivity</param-name>
<param-value>30000</param-value>
</init-param>

to detect idle connection when BlockingIOCometSupport or Jetty is used produces:

-------------------------------
-------------------------------
Trace : Ressource - org.atmosphere.cpr.AtmosphereResourceImpl@433b8a :
atmosphere client closed connexion
-------------------------------
-------------------------------
9 juil. 2010 11:48:56 org.atmosphere.cpr.AtmosphereServlet doCometSupport
GRAVE: AtmosphereServlet exception
java.lang.IllegalStateException: Request object no longer valid. This object
has been cancelled
at
org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:226)
at
org.atmosphere.cpr.AsynchronousProcessor.timedout(AsynchronousProcessor.java:297)
at
org.atmosphere.container.BlockingIOCometSupport.suspend(BlockingIOCometSupport.java:165)
at
org.atmosphere.container.BlockingIOCometSupport.service(BlockingIOCometSupport.java:93)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1085)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1068)
at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1054)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.jalios.jcms.servlet.FriendlyURLFilter.doFilter(FriendlyURLFilter.java:115)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.jalios.jcms.servlet.InitFilter.doFilter(InitFilter.java:200)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
com.jalios.jcms.db.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:38)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)



 Comments   
Comment by jfarcand [ 09/Jul/10 ]

Fixed

1b92057..113acd9 master -> master





[ATMOSPHERE-32] Spade Server SSL not supported Created: 07/Jul/10  Updated: 08/Jul/10  Resolved: 08/Jul/10

Status: Resolved
Project: atmosphere
Component/s: spade-server
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 32

 Description   

The AtmosphereSpadeServer currently isn't supporting SSL.



 Comments   
Comment by jfarcand [ 07/Jul/10 ]

Fixed:

SSLConfig cfg = new SSLConfig();
ClassLoader cl = getClass().getClassLoader();
URL keystoreUrl = cl.getResource("ssltest-keystore.jks");
String keyStoreFile = new File(keystoreUrl.toURI()).getAbsolutePath();
cfg.setKeyStoreFile(keyStoreFile);
cfg.setKeyPass("changeit");

URL cacertsUrl = cl.getResource("ssltest-cacerts.jks");
String trustStoreFile = new File(cacertsUrl.toURI()).getAbsolutePath();
cfg.setTrustStoreFile(trustStoreFile);
cfg.setTrustStorePass("changeit");

AtmosphereSpadeServer sslSpade =
AtmosphereSpadeServer.build("https://127.0.0.1:" + 7777 + "/",
PubSubTest.class.getPackage().getName(), cfg );
sslSpade.start();

Comment by jfarcand [ 08/Jul/10 ]

Fix target

Comment by jfarcand [ 08/Jul/10 ]

Fix ttile





[ATMOSPHERE-31] Must return status code 200 instead of 204 when long polling is used Created: 28/Jun/10  Updated: 08/Jul/10  Resolved: 08/Jul/10

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 31

 Description   

See threads here:

http://atmosphere-users-mailling-list.2493822.n2.nabble.com/204-No-Content-td5224916.html#a5224916



 Comments   
Comment by jfarcand [ 28/Jun/10 ]

Fixed

http://github.com/jfarcand/atmosphere/commit/2dfbd4572cca68d45386c49fd7c8e46aef4a5639

Comment by jfarcand [ 08/Jul/10 ]

Fix target





[ATMOSPHERE-30] Twitter sample broken Created: 28/Jun/10  Updated: 08/Jul/10  Resolved: 08/Jul/10

Status: Resolved
Project: atmosphere
Component/s: samples
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 30

 Description   

The Twitter sample is broken with 0.6.



 Comments   
Comment by jfarcand [ 28/Jun/10 ]

Fixed

http://github.com/jfarcand/atmosphere/commit/d3be10cca8f2addd4efb345992a058c133bbc28d

Comment by jfarcand [ 08/Jul/10 ]

Fix target





[ATMOSPHERE-29] WebSocket and SSL not working Created: 28/Jun/10  Updated: 08/Jul/10  Resolved: 08/Jul/10

Status: Resolved
Project: atmosphere
Component/s: client-jquery
Affects Version/s: 0.6
Fix Version/s: 0.6.1

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 29

 Description   

The current Plugin code replace http with ws, but https doesn't get replaced
properly.



 Comments   
Comment by jfarcand [ 29/Jun/10 ]

Fixed

2dfbd45..dc51db5 master -> master

Comment by jfarcand [ 08/Jul/10 ]

Fix target





[ATMOSPHERE-28] "broadcaster is null" exception with @Singleton Created: 20/Apr/10  Updated: 09/Oct/10  Resolved: 09/Oct/10

Status: Resolved
Project: atmosphere
Component/s: annotations
Affects Version/s: 0.5
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: tvanier Assignee: sandoz
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS X
Platform: Macintosh


Issuezilla Id: 28

 Description   

When injecting a Broadcaster to a resource class, a "broadcaster is null"
exception is raised upon broadcast if the resource class is annotated with
@Singleton.
Removing the @Singleton annotation fixes the issue.



 Comments   
Comment by jfarcand [ 09/Jul/10 ]

Raise the bug to Paul. Paul, once you have a chance, can you share the solution
for this issue. We probably need to change the way Broadcaster gets injected.

Comment by sandoz [ 27/Aug/10 ]

The current BroadcasterInjector implementation injects stuff in the scope of a
singleton.

This requires that a request be in scope because it accesses the
HttpServletRequest. Thus an IllegalStateException could occur if there is no
request in scope or the Broadcaster reference injected would be incorrect for
further requests.

So strictly speaking this injector should be in the scope of PerRequest. Jersey
1.3 will produce an error if there is an attempt to inject such a reference on a
singleton bean.

Then if we want to support injection of a Broadcaster into a singleton we have
two options:

1) The developer inject Injectable<Broadcaster>; or

2) We support the injection of a Broadcaster proxy whose implementation
delegates to the Broadcaster obtained from the HttpServletRequest. If methods on
the Broadcaster proxy are called out of scope an IllegalStateException will
still occur. Which is kind of why i prefer 1) (which is how Guice works) because
it makes it clearer to the developer.

It should be easy to support 2) by using a Java Proxy. Thus we would have two
BroadcasterInjector implementations one for per-request and one for singleton.

Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by sandoz [ 09/Oct/10 ]

Proxies are injected for singletons. Also a more meaningful message is logged
when the proxy is accessed outside the scope of an HTTP request.

Additionally the jersey-server-components file was modified to just contain the
class AtmosphereResourceConfigurator. All other providers are registered
programatically as with AtmosphereResourceConfigurator.





[ATMOSPHERE-27] NPE in AsynchronousProcessor.map() Created: 02/Apr/10  Updated: 12/Apr/11  Resolved: 02/Apr/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: mwessendorf Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 27

 Description   

In "AsynchronousProcessor.map()" this line gives me the NPE:

config.getBroadcasterFactory().add(g.broadcaster,g.broadcaster.getID());

because g.broadcaster is NULL (btw. isn't 'g' a pretty bad variable name? )

What am I doing? I extend from the "AtmosphereServlet" and add my own handler, like:

this.addAtmosphereHandler(somePath, new MyAtmosphereHandler());

inside of the addAtmosphereHandler(), the framework does this:

AtmosphereHandlerWrapper w = new AtmosphereHandlerWrapper(h);
==> so AtmosphereHandlerWrapper.broadcaster is null.

However, there a (very) lame way to get it done to work, such as:

this.atmosphereHandlers.put(somePath,
new AtmosphereHandlerWrapper(new MyAtmosphereHandler(),
BroadcasterFactory.getDefault().get()));

But IMO the "atmosphereHandlers" shouldn't be exposed at all.. And using that
variable is really lame.

So, I think I am wondering why inside this constructor:
public AtmosphereHandlerWrapper(AtmosphereHandler g) {
this.atmosphereHandler = g;
}

we do NOT see something like:

this.broadcaster = BroadcasterFactory.getDefault().get()

PS: I start to see this error today, when I upgraded to 0.6... Since I want to
use the "new" factories..



 Comments   
Comment by jfarcand [ 02/Apr/10 ]

Came back from vacation just for you Applied your recommendation and renamed
the variable This is a regression caused by the fix for n handler support
added 2 days ago.

Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AsynchronousProcessor.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereServlet.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/BroadcasterFactory.java
Sending
atmosphere/plugins/grizzly-adapter/src/main/java/org/atmosphere/grizzly/AtmosphereAdapter.java
Transmitting file data ....
Committed revision 979.
jfarcands-macbook-pro:atmosphere jfarcand$





[ATMOSPHERE-26] NullPointerException when unloading AtmosphereServlet Created: 17/Mar/10  Updated: 12/Apr/11  Resolved: 17/Mar/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: jabbahj Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 26

 Description   

The following stacktrace appears:

java.lang.NullPointerException
at org.atmosphere.cpr.BroadcasterConfig.destroy(BroadcasterConfig.java:123)
at org.atmosphere.cpr.DefaultBroadcaster.destroy(DefaultBroadcaster.java:92)
at org.atmosphere.cpr.AtmosphereServlet.destroy(AtmosphereServlet.java:555)



 Comments   
Comment by jfarcand [ 17/Mar/10 ]

Fixed, thanks!

Sending modules/cpr/src/main/java/org/atmosphere/cpr/BroadcasterConfig.java
Transmitting file data .
Committed revision 920.





[ATMOSPHERE-25] Problem with path on Windows Created: 20/Feb/10  Updated: 12/Apr/11  Resolved: 20/Feb/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: survivant Assignee: survivant
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 25

 Description   

problem to launch war with spade-server on Windows. Should handle "
"



 Comments   
Comment by survivant [ 20/Feb/10 ]

Commit
C:\Source\atmosphere\extras\spade-server\src\main\java\org\atmosphere\spade\AtmosphereSpadeLauncher.java
C:\Source\atmosphere\plugins\grizzly-adapter\src\main\java\org\atmosphere\grizzly\AtmosphereAdapter.java
C:\Source\atmosphere\extras\spade-server\src\main\java\org\atmosphere\spade\AtmosphereSpadeLauncher.java
C:\Source\atmosphere\plugins\grizzly-adapter\src\main\java\org\atmosphere\grizzly\AtmosphereAdapter.java
At revision: 878





[ATMOSPHERE-24] Broadcaster ExecutorServices strategy should be configurable Created: 28/Jan/10  Updated: 08/Sep/10  Resolved: 08/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.5
Fix Version/s: 0.5

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 24

 Description   

It shoul dbe possible to decide if the ExecutorServices associated with a
Broadcaster can be globally shared among all instance or one per Broadcasdter.
The default right now is one per Broadcaster.



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

This has been fixed since 0.5





[ATMOSPHERE-23] java.lang.ClassCastException when broadcasting non String messages Created: 07/Jan/10  Updated: 12/Apr/11  Resolved: 11/Jan/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.5

Type: Bug Priority: Major
Reporter: jotel71 Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS X
Platform: Macintosh


Issuezilla Id: 23

 Description   

When broadcasting non String object using the following methods

Broadcaster.broadcast(Object msg, AtmosphereResource r)
Broadcaster.broadcast(Object msg, Set<AtmosphereResource> subset)

i.e. to the to specific AtmosphereResources

It's due to cast in implementation of these methods in DefaultBroadcaster class.

msg = (String) bc.filter(msg);

should be replaced by:

msg = bc.filter(msg);



 Comments   
Comment by jfarcand [ 11/Jan/10 ]

Fixed. Thanks for the patch

Sending modules/cpr/src/main/java/org/atmosphere/cpr/DefaultBroadcaster.java
Transmitting file data .
Committed revision 778.

Comment by jfarcand [ 11/Jan/10 ]

...





[ATMOSPHERE-22] Make container discovery work on GFv3 and Grizzly Created: 12/Dec/09  Updated: 12/Apr/11  Resolved: 12/Dec/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.2

Type: Bug Priority: Major
Reporter: neotyk Assignee: atmosphere-issues
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh
URL: http://n2.nabble.com/FYI-Servlet-3-0-Async-discovery-is-now-the-default-td4148162.html#a4152619


Issuezilla Id: 22

 Description   

As described in provided link GlassFish v3 and Grizzly comet support are
overlapping and not allow to be detected automatically.



 Comments   
Comment by neotyk [ 12/Dec/09 ]

It has already happened





[ATMOSPHERE-20] Events broadcasted event when a WebApplicationException is thrown Created: 25/Nov/09  Updated: 12/Apr/11  Resolved: 08/Dec/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.5

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 20

 Description   

>BTW. I found that when method annotated with @Broadcast throws a
>WebApplicationException constructed with Response with error status code then
>the response entity is still broadcasted to suspended connections

...discussed as the mailling list.



 Comments   
Comment by sandoz [ 08/Dec/09 ]

Fixed in the trunk.





[ATMOSPHERE-19] Add support for CometSupport discovery Created: 23/Nov/09  Updated: 21/Sep/10  Resolved: 21/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.4
Fix Version/s: 0.6

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 19

 Description   

See:

http://is.gd/52euK



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 21/Sep/10 ]

We have made significant progress since that issues was filled. Closing as fixed





[ATMOSPHERE-18] Improve BroadcasterLookup Implementation Created: 23/Nov/09  Updated: 25/Nov/09  Resolved: 25/Nov/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.4
Fix Version/s: 0.5

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 18

 Description   

See

http://is.gd/52eoQ



 Comments   
Comment by jfarcand [ 25/Nov/09 ]

Fixed. The new API is:

BroadcasterLookup.build(Broadcaster.class,Object ID);

BroadcasterLookup.lookup(Broadcaster.class,Object ID);

Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AsynchronousProcessor.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereServlet.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/Broadcaster.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/DefaultBroadcaster.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/util/BroadcasterLookup.java
Sending
atmosphere/modules/jersey/src/main/java/org/atmosphere/jersey/AtmosphereProviders.java
Sending
atmosphere/modules/jersey/src/main/java/org/atmosphere/jersey/JerseyBroadcaster.java
Sending atmosphere/plugins/cluster-jgroups/pom.xml
Sending atmosphere/pom.xml
Sending
atmosphere/samples/gwt-auction/src/main/java/org/gwtcomet/server/StreamingServiceImpl.java
Sending
atmosphere/samples/gwt-auction/src/main/java/org/gwtcomet/server/StreamingServlet.java
Sending
atmosphere/samples/rest-twitter/src/main/java/org/atmosphere/samples/twitter/TwitterResource.java
Transmitting file data ............
Committed revision 694.





[ATMOSPHERE-17] Add support for CometSupport auto-detection Created: 23/Nov/09  Updated: 04/Jan/10  Resolved: 04/Jan/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.4
Fix Version/s: 0.5

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 17

 Description   

See:

http://is.gd/52ehw



 Comments   
Comment by jfarcand [ 04/Jan/10 ]

This has been fixed by Viktor :

Author: viktorklang
Date: 2009-12-03 19:21:50+0000
New Revision: 718

Added:

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/CometSupportResolver.java

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/DefaultCometSupportResolver.java
Modified:

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereServlet.java

Log:
Improving dynamic container detection.





[ATMOSPHERE-16] Add support for connection drop with Container that doesn't supports it Created: 23/Nov/09  Updated: 25/Jan/10  Resolved: 25/Jan/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.4
Fix Version/s: 0.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 16

 Description   

See:

http://is.gd/52e36

Mainly, we should make sure isCancelled gets called when the
Broadcaster.broadcast/scheduled gets invoked and the write operation throws an
IOException.



 Comments   
Comment by jfarcand [ 25/Jan/10 ]

Sending
modules/cpr/src/main/java/org/atmosphere/cpr/AsynchronousProcessor.java
Sending
modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereResourceEventImpl.java
Sending
modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereResourceImpl.java
Sending
modules/cpr/src/main/java/org/atmosphere/handler/ReflectorServletProcessor.java
Sending
modules/jersey/src/main/java/org/atmosphere/jersey/AtmosphereFilter.java
Sending
modules/jersey/src/main/java/org/atmosphere/jersey/JerseyBroadcaster.java
Transmitting file data ......





[ATMOSPHERE-15] java.lang.IllegalStateException: DISPATCHED,initial on jetty Created: 18/Nov/09  Updated: 12/Apr/11  Resolved: 21/Sep/10

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: naff Assignee: atmosphere-issues
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 15

 Description   

Hi,

I get following exception while using atmosphere with jetty 7.0.0.v20091005
(with jetty-maven-plugin):

java.lang.IllegalStateException: DISPATCHED,initial
at
org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:493)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:105)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:58)
at
org.atmosphere.cpr.AtmosphereEventImpl.resume(AtmosphereEventImpl.java:104)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxClient.setAtmosphereEvent(AtmosphereBayeuxClient.java:123)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxServlet.service(AtmosphereBayeuxServlet.java:215)
at
org.cometd.server.AbstractCometdServlet.service(AbstractCometdServlet.java:238)
at
org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:157)
at
org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:118)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:239)
at
org.atmosphere.handler.ReflectorServletProcessor.onEvent(ReflectorServletProcessor.java:135)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:119)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:102)
at
org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:73)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:662)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1211)

Is it atmosphere bug or maybe it is a Jetty bug?



 Comments   
Comment by jfarcand [ 19/Nov/09 ]

I will take a look. Looks like an issue with Atmosphere and the way Jetty is
used. Which bayeux demo are you using?

Comment by naff [ 19/Nov/09 ]

The exception that i've pasted I get with my own application which uses dojo
1.3.2 and runs following code:
var cometd = dojox.cometd.init(cometdUri);
var cometdTest = {
test : function()

{ console.debug("TESTTESTTESTTESTTESTTESTTESTTEST!!") console.dir(arguments); }

};
dojox.cometd.startBatch();
dojox.cometd.subscribe("/test", cometdTest, "test");
dojox.cometd.endBatch();

Today I checked out atmosphere from 0.4.1 tag and run samples/bayeux with jetty
7.0.0.RC6 and run chat & ack demo, and got following error:
SEVERE: AtmosphereServlet exception
java.lang.IllegalStateException: Request object no longer valid. This object has
been cancelled
at
org.atmosphere.cpr.AtmosphereResourceImpl.getRequest(AtmosphereResourceImpl.java:174)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:155)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:104)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:58)
at
org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:116)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxClient.setAtmosphereResource(AtmosphereBayeuxClient.java:160)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxServlet.service(AtmosphereBayeuxServlet.java:236)
at
org.cometd.server.AbstractCometdServlet.service(AbstractCometdServlet.java:250)
at
org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:159)
at
org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:120)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:238)
at
org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:134)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:143)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:116)
at
org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:73)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:790)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:775)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:426)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:118)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:495)
at
org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:179)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:116)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:243)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:112)
at org.eclipse.jetty.server.Server.handle(Server.java:337)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:546)
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:987)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:736)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:399)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:437)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:435)
at java.lang.Thread.run(Thread.java:619)

Both exception are thrown on timeout, and after timeout and error connection is
estabilished again.

Comment by jfarcand [ 25/Nov/09 ]

Yes, that exception has been fixed with 0.5-SNAPSHOT. Can you try it with your
sample? I'm having a hard time reproducing the issue.

Comment by naff [ 03/Dec/09 ]

Hi,

Sorry for such long delay. I've checked out trunk and built it. I've modified
pom.xml for bayeux/sample (added jetty-maven-plugin 7.0.0.RC6) and started
samples/bayeux with:
mvn org.mortbay.jetty:jetty-maven-plugin:7.0.0.RC6:run

After joining to chat, I've an error:
java.lang.IllegalStateException: DISPATCHED,initial
at
org.eclipse.jetty.server.AsyncContinuation.complete(AsyncContinuation.java:493)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:107)
at
org.atmosphere.container.Jetty7CometSupport.action(Jetty7CometSupport.java:58)
at
org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:116)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxClient.setAtmosphereResource(AtmosphereBayeuxClient.java:160)
at
org.atmosphere.plugin.bayeux.AtmosphereBayeuxServlet.service(AtmosphereBayeuxServlet.java:236)
at
org.cometd.server.AbstractCometdServlet.service(AbstractCometdServlet.java:250)
at
org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:159)
at
org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:120)
at
org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:238)
at
org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:134)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:143)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:116)
at
org.atmosphere.container.Jetty7CometSupport.service(Jetty7CometSupport.java:73)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:836)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:819)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:426)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:118)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:495)
at
org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:179)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:930)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:361)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:864)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:116)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:243)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:112)
at org.eclipse.jetty.server.Server.handle(Server.java:337)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:546)
at
org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:987)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:736)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209)
at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:399)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:437)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:435)
at java.lang.Thread.run(Thread.java:619)

Here is a log from chat:
asda: asda has joined
SERVER: disconnected!
SERVER: reconnected!
SERVER: disconnected!

and the exception is thrown at the second SERVER: disconnected! message.
I hope this helps.

Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 21/Sep/10 ]

Unable to reproduce.





[ATMOSPHERE-14] javax.ws.rs.ext.MessageBodyWriter not applied properly after the first broadcast Created: 16/Oct/09  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.4
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 14

 Description   

The following scenario doesn't work

(1) Suspend -> content-type == text/html
(2) Broadcast -> content-type == text/plain
(3) Broadcast -> content-type == text/html

The MessageBodyWriter will be set only when (1) happens, and (2) will be written
with the wrong MessageBodyWriter.



 Comments   
Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 22/Oct/10 ]

This not possible to support that scenario, so closing as invalid. The
content-type must be set at suspend time





[ATMOSPHERE-13] Output some HTML comments by default for browser that needs some bytes to handle suspended connections Created: 13/Oct/09  Updated: 02/Nov/09  Resolved: 02/Nov/09

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.3
Fix Version/s: 0.4

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 13

 Description   

See

http://n2.nabble.com/Chrome-safari-issue-using-the-chat-example-td3810770.html#a3810770

The idea here would be to send back "junk" based on the user agent



 Comments   
Comment by jfarcand [ 16/Oct/09 ]

Change category

Comment by jfarcand [ 02/Nov/09 ]

Fixed, will be part of Atmosphere 0.4.1





[ATMOSPHERE-12] Allow broadcaster to broadcast non real time message Created: 25/Aug/09  Updated: 16/Oct/09  Resolved: 16/Oct/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.4
Fix Version/s: 0.4

Type: Improvement Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 12

 Description   

In some application, it is not necessary to broadcast messages real time, e.g at
the moment the Broadcaster.broadcast gets invoked. Some message are useless and
can be delayed until a real Broadcast gets executed, by aggregating them. The
scenario can be:

Broadcaster.broadcast(msg, MessageType.URGENT|DELAYED|etc)

This will requires an API change to the interface. The same feature could be
supported by using a BroadcastFilter right now and filtering based on some
tag/pattern from the message like:

All message starting with X-- will be delayed.



 Comments   
Comment by jfarcand [ 22/Sep/09 ]

Fixed

Author: jfarcand
Date: 2009-09-23 02:59:46+0000
New Revision: 468

Modified:

trunk/atmosphere/modules/core/src/main/java/org/atmosphere/core/JerseyBroadcaster.java
trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/Broadcaster.java

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/BroadcasterConfig.java

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/DefaultBroadcaster.java

trunk/atmosphere/modules/cpr/src/main/java/org/atmosphere/util/WebDotXmlReader.java

trunk/atmosphere/plugins/cluster-jgroups/src/main/java/org/atmosphere/plugin/cluster/jgroups/JGroupsFilter.java
trunk/atmosphere/pom.xml

trunk/atmosphere/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java





[ATMOSPHERE-11] Atmosphere throws an exception when POSTing Created: 14/Aug/09  Updated: 22/Oct/10  Resolved: 22/Oct/10

Status: Resolved
Project: atmosphere
Component/s: jersey
Affects Version/s: 0.3
Fix Version/s: 0.7

Type: Bug Priority: Major
Reporter: egarcia_sms Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS X
Platform: Macintosh


Attachments: Java Archive File atmosphere-portable-runtime-0.4-SNAPSHOT.jar    
Issuezilla Id: 11

 Description   

Very often, Atmosphere will thrown this error and refuse to work when trying to
access a REST endpoint defined like this:

@POST
@Produces("application/json")
public JSONObject list(@FormParam("list") Integer paramList,
@FormParam("list2") Integer paramList2, ...){}

Right now, I'm only using Jersey annotations and no Atmosphere ones yet (like
@Resume or @Broadcast). The error is:

WARNING: StandardWrapperValve[AtmosphereServlet]: PWC1406: Servlet.service() for
servlet AtmosphereServlet threw exception
javax.servlet.ServletException: Invalid AtmosphereHandler
at
org.atmosphere.cpr.AsynchronousProcessor.map(AsynchronousProcessor.java:145)
at
org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:116)
at
org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:102)
at
org.atmosphere.container.GrizzlyCometSupport.service(GrizzlyCometSupport.java:98)
at
org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:662)
at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1505)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:338)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:237)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:202)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:752)
at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:473)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:341)
at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:161)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:137)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:88)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:189)
at
com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
at
com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
at java.lang.Thread.run(Thread.java:637)

I'm working with GlassFish v3 (tried builds b57 and b59) and Java version
"1.6.0_13".

One curious thing is that if I remove the parameters, it seems to fix it.

If you need any other info, just ask. Thanks in advance



 Comments   
Comment by jfarcand [ 24/Aug/09 ]

Thanks! If you can attach the war file, that will help me getting up to speed.
Or just send it to jfarcand@apache.org. Thanks again!

Comment by jfarcand [ 24/Aug/09 ]

OK I think I know what's happenning. I think the query string might case the
issue. Can you attach you atmosphere.xml file? I will on my side attach a patch
for you to test so tomorrow when I came back it may be fixed and the fix can be
included in 0.3.1.

Improve the error message:

Sending
modules/cpr/src/main/java/org/atmosphere/cpr/AsynchronousProcessor.java
Transmitting file data .
Committed revision 402.

Comment by jfarcand [ 24/Aug/09 ]

I think I was wrong with my latest analysis as I'm using the servletPath for
mapping the url with it's atmosphere handler. So if you can send me a war file
it will be pretty fast for me to fix it.

Comment by jfarcand [ 24/Aug/09 ]

Created an attachment (id=2)
Use that jar file which will logs everything

Comment by jfarcand [ 25/Aug/09 ]

Please let me know if you have a chance. I want to add the fix for the upcoming
release scheduled tomorrow.

Comment by egarcia_sms [ 26/Aug/09 ]

Sorry, I've tested it, but right now the only issue I'm having very frequently is now the "Error with
Atmosphere 0.3 and GlassFish" that I've posted on the mailing list. Also, I've been using your posted
.jar, but I don't know where the logs are being stored.

Last time I had this issue, I remember that I tried to fast debug it, and I saw that the call to
req.getServletPath() in AsynchronousProcessor.java:116 was returning null, but the req contained my
path, IIRC. But as I'm only having the other issue right now, I cannot be sure.

Anyway, if I run into it again, be sure I'll post again ASAP.

Thanks again!

Comment by jfarcand [ 26/Aug/09 ]

Thanks for the explanation. I don't think this is a bug with Atmosphere, but
probably with Grizzly/GlassFish as is looks quite similar to Issue #10, which is
produced when a Response object gets re-used after resuming the connection. I
will keep the bug open but will go ahead and release 0.3.1

Comment by jfarcand [ 16/Oct/09 ]

Change category

Comment by jfarcand [ 08/Sep/10 ]

Change target.

Comment by jfarcand [ 22/Oct/10 ]

Closing this issue as fixed. Please reopen if you still see it.





[ATMOSPHERE-10] IllegalStateException on Glassfish Created: 01/Aug/09  Updated: 31/Aug/09  Resolved: 31/Aug/09

Status: Resolved
Project: atmosphere
Component/s: samples
Affects Version/s: 0.1
Fix Version/s: 0.4

Type: Bug Priority: Major
Reporter: driscoll Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Attachments: Zip Archive tictactoe.zip    
Issuezilla Id: 10

 Description   

I reported an earlier problem with running my tictactoe program on Glassfish.

That problem still seems to be there.

I'm now running on GF v3 b56, with Atmosphere .3

I'm getting the following error in my logs:

java.lang.IllegalStateException: PWC3990: getWriter() has already been called
for this response
at org.apache.catalina.connector.Response.getOutputStream(Response.java:688)
at
org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:213)
at
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:865)
at
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:403)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1506)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:293)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:351)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:250)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:148)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:746)
at com.sun.grizzly.comet.CometEngine.executeServlet(CometEngine.java:481)
at com.sun.grizzly.comet.CometEngine.handle(CometEngine.java:350)
at com.sun.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:84)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:147)
at
com.sun.grizzly.arp.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:126)
at com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:88)
at com.sun.grizzly.http.TaskBase.run(TaskBase.java:189)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)

I believe that I'm using the same tictactoe as in the samples, but I'll attach
my program as well, just to be sure.



 Comments   
Comment by driscoll [ 01/Aug/09 ]

Created an attachment (id=1)
TicTacToe program

Comment by driscoll [ 01/Aug/09 ]

I should also note that this program works fine on Tomcat.

Comment by jfarcand [ 31/Aug/09 ]

Fixed

Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/container/GlassFishv2CometSupport.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/container/GrizzlyCometSupport.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AsynchronousProcessor.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/handler/AbstractReflectorAtmosphereHandler.java
Transmitting file data ....
Committed revision 413.





[ATMOSPHERE-9] <async-support comment could use expansion Created: 22/Jul/09  Updated: 22/Jul/09  Resolved: 22/Jul/09

Status: Resolved
Project: atmosphere
Component/s: samples
Affects Version/s: 0.1
Fix Version/s: 0.2

Type: Improvement Priority: Minor
Reporter: driscoll Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 9

 Description   

In the counter example, you currently say:

<!-- Uncomment if you want to use Servlet 3.0 Async Support
<async-supported>true</async-supported>
-->

May I suggest you instead say:

<!-- To use Servlet 3.0 Async Support, uncomment the element
below,
<async-supported>true</async-supported>

And change the schema of this web.xml to say:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="3.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/j2ee/web-app_3_0.xsd">

-->

Yes, this is a small thing, but it'd be handy to have the information right
there, I think.



 Comments   
Comment by neotyk [ 22/Jul/09 ]

Fixed as requested.

Date: 2009-07-22 21:16:54+0000
New Revision: 375

Modified:
trunk/atmosphere/samples/chat/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/core-rest-chat/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/counter-longpolling/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/flickr-comet/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/rest-cluster-chat/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/rest-counter/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/scala-chat/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/simple-jersey/src/main/webapp/WEB-INF/web.xml
trunk/atmosphere/samples/twitter/src/main/webapp/WEB-INF/web.xml





[ATMOSPHERE-7] Possible AtmosphereEvent leak Created: 12/May/09  Updated: 16/Oct/09  Resolved: 16/Oct/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.2
Fix Version/s: 0.2

Type: Bug Priority: Major
Reporter: jfarcand Assignee: atmosphere-issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 7

 Description   

See

http://n2.nabble.com/AtmosphereEvents-are-not-getting-removed-even-after-connections-are-closed---Tomcat-td2868873.html



 Comments   
Comment by jfarcand [ 12/May/09 ]

Fixed by detecting when the client closed the connection.

Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/container/GlassFishv2CometSupport.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/container/GrizzlyCometSupport.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/container/TomcatCometSupport.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereEvent.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/AtmosphereEventImpl.java
Sending
atmosphere/modules/cpr/src/main/java/org/atmosphere/cpr/WebContainer.java
Sending
atmosphere/samples/chat/src/main/java/org/atmosphere/samples/chat/ChatAtmosphereHandler.java
Transmitting file data .......
Committed revision 191.





[ATMOSPHERE-6] onMessage not invoked when suspend times out Created: 29/Apr/09  Updated: 16/Oct/09  Resolved: 16/Oct/09

Status: Resolved
Project: atmosphere
Component/s: runtime
Affects Version/s: 0.1
Fix Version/s: 0.4

Type: Bug Priority: Major
Reporter: jfarcand Assignee: jfarcand
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: