public Dictionary <String, Object> GetConfig() { while (config == null || reread_config) { try { config = ((identity.Response) new identity.Request( getSession().GetProperty("UserId"), new String[] { "realm", "objecttype" }, new KeyValuePair <string, string>[] { new KeyValuePair <string, string>("realm", Bootstrap.getAppRealm()), new KeyValuePair <string, string>("objecttype", "Agent") }, getSession() ).getResponse()).property; reread_config = false; Log.Init(); } catch (identity.IdentityException ex) { Log.Error(ex); session = null; } } return(config); }
public Session getSession() { session = Session.getSession(this, session); if (session == null || !session.isValid()) { lock (this) { session = Session.getSession(this, session); if (session == null || !session.isValid()) //need re-auth ? { session = Auth.login( Bootstrap.getAppRealm(), auth.indexType.moduleInstance, "Application", new Callback[] { new NameCallback(Bootstrap.getAppUser()), new PasswordCallback(Bootstrap.getAppPassword()) } ); naming = Naming.Get(new naming.Request(session)); reread_config = true; //clear config config = GetConfig(); } } } return(session); }
public Session getSession() { Session session = Session.getSession(this, sessionId); if (session == null || !session.isValid()) { lock (this) { session = Session.getSession(this, sessionId); if (session == null || !session.isValid()) //need re-auth ? { session = Auth.login( Bootstrap.getAppRealm(), auth.indexType.moduleInstance, "Application", new Callback[] { new NameCallback(Bootstrap.getAppUser()), new PasswordCallback(Bootstrap.getAppPassword()) } ); sessionId = session.sessionId; naming = null; //clear naming config = null; //clear config } } } return(session); }
public Dictionary <String, Object> GetConfig() { if (config == null) { config = ((identity.Response) new identity.Request( getSession().GetProperty("UserId"), new String[] { "realm", "objecttype" }, new KeyValuePair <string, string>[] { new KeyValuePair <string, string>("realm", Bootstrap.getAppRealm()), new KeyValuePair <string, string>("objecttype", "Agent") }, getSession() ).getResponse()).property; Log.Init(); } return(config); }