Hi Peter, If it was as easy as what you suggest I wouldn't have bothered with the mailing list, this is a last resort I don't use these mailing lists lightly only when I start banging my head against a wall, I had already done the registering of the ApplicationListener. As for lack of detail I am not really sure what to post that would be of help. I would also argue that it is a Tapestry question as I am using Tapestry Spring Security which is configured directly by T5. Spring is reporting events to the ApplicationListener its the events that occur in Tapestry Spring Security that are not appearing. If I use the first example then I get other events from the container but not from TSS.
I have been in contact with the guy from TSS and he told me his Spring knowledge was limited and directed me to the Tapestry mailing board. From looking through the debugger it appears that TSS has no application listeners to notify when it wishes to send an event. However, Spring has an application listener as I am getting other events from it. Therefore, I am confused how the ApplicationListener is set on TSS, I wonder if I have to specifically add the ApplicationListener for Tapestry in the AppModule. It seems like the TSS is initialised before the Spring context files and annotations. It looks like TSS has little support and I probably should cut my losses now and remove it and just go for a pure Spring based implementation. Thanks David On 30 Mar 2011, at 16:00, p.stavrini...@albourne.com wrote: > Hi David, > > Apart from the lack of details in your question, this is also hardly a > Tapestry question. You should direct it to the Spring forums instead, but if > this reply helps so be it: > > You will need in your applicationContext.xml to define a bean that will > automatically start receiving events (I assume you know how)... I am not > familiar with Spring security, but the API docs are quite clear: > > http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/context/ApplicationListener.html > > So code that might have looked something like this in the past: > > public void onApplicationEvent(ApplicationEvent applicationEvent) > { > if (applicationEvent instanceof AuthenticationSuccessEvent) > { > AuthenticationSuccessEvent event = (AuthenticationSuccessEvent) > applicationEvent; > UserDetails userDetails = (UserDetails) > event.getAuthentication().getPrincipal(); > > //notify here now, etc. > } > } > > 'In theory' (untested of course) can now be replaced by: > > public void onApplicationEvent(AuthenticationSuccessEvent successEvent) > { > UserDetails userDetails = (UserDetails) > successEvent.getAuthentication().getPrincipal(); > //notify here etc. > > } > > And thats all?! > > Cheers, > Peter > > > > ----- Original Message ----- > From: "David Uttley" <dutt...@democracysystems.com> > To: "Tapestry users" <users@tapestry.apache.org> > Sent: Wednesday, 30 March, 2011 16:50:26 GMT +02:00 Athens, Beirut, > Bucharest, Istanbul > Subject: Logon notification > > So do I have any takers for this problem? > > Somebody must be recording logins somewhere, I don't have to use Spring to do > it. > > ------Original message > > I am trying to get spring security to notify me of a successful logon using > the Spring ApplicationListener. However, the ApplicationListener doesn't seem > to be notified of the events. > > Any help or pointers will be appreciated. > > I am using t5.2 Spring 3.0 and the 3.0.0-snapshot of t5 Spring Security. > > > ------- > > Thanks > David > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >
smime.p7s
Description: S/MIME cryptographic signature