You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes there is a need to access Injector and other objects from other servlet classes, such as SessionListner, in order to cleanup resources when a session ends (just one example). In a situation like that, it is useful to get access to an instance of an Injector and its services.
Proposal:
Make AppContext static and available anywhere in the application without to have to pass it around.
Example:
AppContect.set("xxx");
AppContect.get("xxx");
In the AppBootstrap:
public void init(AppContext context){
context.set("injector", getInjector());
}
sometimes there is a need to access Injector and other objects from other servlet classes, such as SessionListner, in order to cleanup resources when a session ends (just one example). In a situation like that, it is useful to get access to an instance of an Injector and its services.
Proposal:
Make
AppContext
static and available anywhere in the application without to have to pass it around.Example:
In the AppBootstrap:
In the SessionListener:
The text was updated successfully, but these errors were encountered: