I am following example450 ( Java API EMA) and running my code from eclipse. I am getting error of "Login stream was closed". How do I make the token refresh? And how do I know when the current token is going to expire? I tried using OperationModel.API_DISPATCH in EmaFactory.createOmmConsumer method call. But of no use. Can anybody help me with the example code or some solution code on this? so that I keep getting the data uninterrupted.