> Did you check the meteor module. In that case the Tapestry Filter will run > inside the Atmosphere Servlet.
I've spent too much of today reading the white paper and experimenting because I'm intrigued by anything async these days. Atmosphere can work with Tapestry, as long as you don't want to do anything Tapestry-like when you get a broadcast. I mistakenly assumed that this was a more general Continuations library (as is provided in jetty-continuations), really it appears to be more about doing more pubsub/broadcast type apps. My use case is more about freeing up server threads while I continue to process the request. When you receive a broadcast you are not in the Tapestry stack. You might think it would be cool to use your @Inject'd services when you get a broadcast, but you'll get an NPE because the thread that executes the broadcast is not a thread that has been setup by tapestry. Your page attributes are stored as thread locals and so you will have none. You can however format and write your own response. To answer the OPs question, you could write a ComponentClassTransformerWorker which checked for the @Broadcast on page/component events and trigger a broadcast. If you implement a ResultProcessor for some object that doesn't write to the response and turn off GZIP compression (always seams to want to write something). If you use the MeteorServlet then you also need to rename your AppModule to TapestryFilterModule because of how MeteorServlet names your filter. Josh On Wed, Apr 13, 2011 at 10:26 AM, Taha Hafeez <tawus.tapes...@gmail.com> wrote: > Hi Josh > > Did you check the meteor module. In that case the Tapestry Filter will run > inside the Atmosphere Servlet. > > regards > Taha > > > > On Wed, Apr 13, 2011 at 10:38 PM, Josh Canfield <joshcanfi...@gmail.com>wrote: > >> I haven't played with Atmosphere specifically, but I've played a bit >> Jetty continuations, or Servlet 3's startAsync in Tapestry. >> >> It's not a trivial integration, but I've gotten something barely >> working using Jetty's Continuations. For my solution I created an >> @AsyncEvent which essentially hijacks the event method and wraps it in >> a Runnable that gets dumped into a threadpool. When the method >> completes it resumes the continuation. >> >> The challenge is that both the Servlet3 and Jetty Continuation (and >> atmosphere from the look of it) expect you to return from your event >> method when you suspend. This means that you go all they way back up >> the stack to the container where it notes that you've suspended the >> request and then re-issues the request when you resume. For tapestry, >> this means that it thinks you're done with the request and starts >> cleaning up all the injectable services that you probably still need >> to finish your suspended request. >> >> I did this all about 6 months ago and haven't had a chance to get into >> the tapestry source to work out a way to teach it about suspended >> requests. >> >> Josh >> >> On Tue, Apr 12, 2011 at 4:48 AM, <tmar...@gmx.de> wrote: >> > Hello again! >> > >> > Is there any way to get the @Broadcast annotation from Atmosphere: >> > >> > >> http://atmosphere.java.net/nonav/apidocs/org/atmosphere/annotation/Broadcast.html >> > >> > working inside of a Tapestry5 page or component? >> > >> > Or are there any general, architectural restrictions why this can not >> work in Tapestry right now? >> > >> > If not, what changes would be necessary in order to be able to be able to >> use it? >> > >> > Thanks! >> > >> > Tobias >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> > For additional commands, e-mail: users-h...@tapestry.apache.org >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org