You'll need to provide a little more detail on the problem you're seeing. I use this exact model in my application and it works fine. I do this in my LifecycleAdvisor:
Code:
public void onCommandsCreated(ApplicationWindow window) {
doUserLoginIfNeeded( window );
}
/**
* Require the user to login if the current authentication context is empty.
*/
protected void doUserLoginIfNeeded(ApplicationWindow window) {
// If the user is not already logged in, then force them to do so.
// This avoids asking the user to login again when a secondary window is opened.
CommandManager commandManager = window.getCommandManager();
ApplicationSecurityManager asm = getApplicationServices().getApplicationSecurityManager();
Authentication auth = asm.getAuthentication();
if( auth == null ) {
_logger.info( "User not authenticated -- Force Login" );
ActionCommand command = commandManager.getActionCommand( "loginCommand" );
command.execute();
}
}
How are you forcing the login process?
Larry.