• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

Listening for events

I was reading folowing lines and I did not understand clearly.
 Listening for events
This interface forces your bean to implement the onApplicationEvent() method,
which is responsible for reacting to the application event.

Any ideas, resources,sample code,links, highly appreciated. thanks in advance.
0
gudii9
Asked:
gudii9
  • 2
2 Solutions
 
objectsCommented:
When a bean implement ApplicationListener it will be notified (onApplicationEvent()) gets called when an application event occurs
this is useful if you're bean needs to know for example when the application has started up, or is shutting down
0
 
for_yanCommented:
If you register bean as application event listener then the container will call onApplicationEvent() metod
of the bean when event is published. Therefore if you want bean to respondto application events you need
to implement the onApplicationEvent() method
0
 
objectsCommented:
> If you register bean as application event listener then the container will call onApplicationEvent() metod

you don't register your bean
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now