git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/application-support-layer/applicationSupportLayerCore@70645 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
781989dbea
commit
dd4f078818
|
@ -211,19 +211,12 @@ public class ASLSession{
|
||||||
public void setScope(String scope) {
|
public void setScope(String scope) {
|
||||||
logger.info("The scope about to set is: " + scope);
|
logger.info("The scope about to set is: " + scope);
|
||||||
lastUsedTime = System.currentTimeMillis();
|
lastUsedTime = System.currentTimeMillis();
|
||||||
String test = scope.trim();
|
|
||||||
if (test == null)
|
|
||||||
logger.info("1");
|
|
||||||
test = scope.trim().substring(1);
|
|
||||||
if (test == null)
|
|
||||||
logger.info("2");
|
|
||||||
String[] split = scope.trim().substring(1).split("/",2);
|
String[] split = scope.trim().substring(1).split("/",2);
|
||||||
// Uncomment this and comment the line bellow for devsec
|
//Uncomment this and comment the line bellow for devsec
|
||||||
// String vo = "/" + split[0].toLowerCase();
|
//String vo = "/" + split[0].toLowerCase();
|
||||||
String vo = "/" + split[0];
|
String vo = "/" + split[0];
|
||||||
if(split.length > 1)
|
if(split.length > 1)
|
||||||
vo += "/" + split[1];
|
vo += "/" + split[1];
|
||||||
logger.info("*** VRE to be set:" + vo + " ***");
|
|
||||||
logger.info("GCube scope returns: " + GCUBEScope.getScope(vo));
|
logger.info("GCube scope returns: " + GCUBEScope.getScope(vo));
|
||||||
this.scope = GCUBEScope.getScope(vo);
|
this.scope = GCUBEScope.getScope(vo);
|
||||||
String previousScopeName = scopeName;
|
String previousScopeName = scopeName;
|
||||||
|
@ -237,7 +230,7 @@ public class ASLSession{
|
||||||
initializeAttributes();
|
initializeAttributes();
|
||||||
// clear the attribute
|
// clear the attribute
|
||||||
loggedIn = false;
|
loggedIn = false;
|
||||||
logger.info("Passing the logging because the variable was set");
|
logger.debug("Passing the logging because the variable was set");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((previousScopeName != null && !previousScopeName.equals(scopeName)) || previousScopeName == null) {
|
if ((previousScopeName != null && !previousScopeName.equals(scopeName)) || previousScopeName == null) {
|
||||||
|
@ -247,14 +240,13 @@ public class ASLSession{
|
||||||
LoginToVreAccessLogEntry loginEntry = new LoginToVreAccessLogEntry();
|
LoginToVreAccessLogEntry loginEntry = new LoginToVreAccessLogEntry();
|
||||||
accessLogger.logEntry(username, scope, loginEntry);
|
accessLogger.logEntry(username, scope, loginEntry);
|
||||||
} else
|
} else
|
||||||
logger.info("Passing the logging because the scope was the same");
|
logger.debug("Passing the logging because the scope was the same");
|
||||||
initializeAttributes();
|
initializeAttributes();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logUserLogin(String scope) {
|
public void logUserLogin(String scope) {
|
||||||
logger.info("LogUserLogin method called");
|
|
||||||
innerSession.clear();
|
innerSession.clear();
|
||||||
loggedIn = true;
|
loggedIn = true;
|
||||||
// ACCESS LOGGER
|
// ACCESS LOGGER
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Notifier {
|
||||||
|
|
||||||
public void notifyAllWaiting() throws InterruptedException
|
public void notifyAllWaiting() throws InterruptedException
|
||||||
{
|
{
|
||||||
logger.info("Sending wake up signal to " + sem.getQueueLength() + " receivers...");
|
logger.debug("Sending wake up signal to " + sem.getQueueLength() + " receivers...");
|
||||||
sem.release(sem.getQueueLength());
|
sem.release(sem.getQueueLength());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,9 @@ public class SessionManager {
|
||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
thread.interrupt();
|
thread.interrupt();
|
||||||
logger.info(new Date(System.currentTimeMillis()) + " clean thread was interrupted");
|
logger.debug(new Date(System.currentTimeMillis()) + " clean thread was interrupted");
|
||||||
thread.join();
|
thread.join();
|
||||||
logger.info(new Date(System.currentTimeMillis()) + " clean thread was joint");
|
logger.debug(new Date(System.currentTimeMillis()) + " clean thread was joint");
|
||||||
super.finalize();
|
super.finalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class SessionManager {
|
||||||
Thread.sleep(300000);
|
Thread.sleep(300000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.error("Exception:", e);
|
logger.error("Exception:", e);
|
||||||
logger.info(new Date(System.currentTimeMillis()) + " clean thread was interrupted (in clean thread)");
|
logger.debug(new Date(System.currentTimeMillis()) + " clean thread was interrupted (in clean thread)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//TODO: cleanup invalid sessions: add locks...
|
//TODO: cleanup invalid sessions: add locks...
|
||||||
|
@ -72,7 +72,7 @@ public class SessionManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info(new Date(System.currentTimeMillis()) + " clean thread was terminated");
|
logger.debug(new Date(System.currentTimeMillis()) + " clean thread was terminated");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue