Searching this question I found a couple of Posts talking about. All they speaks about “APP class”. My problem is I cant find where it is. I just need to know where is the best place to reach connectionStateChanged status.
(Searched folder by folder over the entire workspace)
It was a way for older versions of the platform. Now this mechanism is updated and you can you Event Listeners instead. See this example of how to add your logic right after login, where you already know the user.
@stukalov
Thanks a lot. I’m dealing whith this sample right now.
At the moment I cant find where to link AfterUserLoginEventListener with the application. It’s a defined file name? it’s just because located at core and executed automatically?..
This is events approach. This event will be raised on the core tier after successful login. So, you define a component (annotated as @Component) in the core module that implements ApplicationListener<UserLoggedInEvent> interface, a name of the class really doesn’t matter. The onApplicationEvent method is dictated by the interface and will be invoked once the UserLoggedInEvent event is raised.
So, finally it should look like:
@Component
public class MyBusinessLogicAfterUserLogin implements ApplicationListener<UserLoggedInEvent> {
...
@Override
public void onApplicationEvent(UserLoggedInEvent event) {
...
}
...
}