> I don't think this is correct with regard to services that don't use > HttpServletRequest or HttpServletResponse directly or indirectly. If I'm > right, you can use most of your Tapestry services on them, speciallyl the > singleton ones.
Ah yes, of course you are right. The proxy will get/create the service for the thread if it doesn't exist. I should have just done the test... The funny thing is, I was using an @Inject'd logger so clearly everything isn't null... Josh On Wed, Apr 13, 2011 at 5:31 PM, Thiago H. de Paula Figueiredo <thiag...@gmail.com> wrote: > On Wed, 13 Apr 2011 19:27:06 -0300, Josh Canfield <joshcanfi...@gmail.com> > wrote: > >> 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. > > I don't think this is correct with regard to services that don't use > HttpServletRequest or HttpServletResponse directly or indirectly. If I'm > right, you can use most of your Tapestry services on them, speciallyl the > singleton ones. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and > instructor > Owner, Ars Machina Tecnologia da Informação Ltda. > http://www.arsmachina.com.br > > --------------------------------------------------------------------- > 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