Skip to content

Commit

Permalink
changing so that tests don't create unnecessary threads
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Feb 16, 2015
1 parent a265a50 commit 5e259c7
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -89,7 +89,7 @@ public class SessionServiceImpl implements SessionService {
private DQPCore dqp;

private Map<String, SessionMetadata> sessionCache = new ConcurrentHashMap<String, SessionMetadata>();
private Timer sessionMonitor = new Timer("SessionMonitor", true); //$NON-NLS-1$
private Timer sessionMonitor = null;
private List<String> securityDomainNames;

public void setSecurityDomain(String domainName) {
Expand Down Expand Up @@ -389,6 +389,7 @@ public void setAuthenticationType(AuthenticationType flag) {

public void start() {
LogManager.logDetail(LogConstants.CTX_SECURITY, new Object[] {"Default security domain configured=", this.securityDomainNames}); //$NON-NLS-1$
this.sessionMonitor = new Timer("SessionMonitor", true); //$NON-NLS-1$
this.sessionMonitor.schedule(new TimerTask() {
@Override
public void run() {
Expand All @@ -398,9 +399,10 @@ public void run() {
}

public void stop(){
this.sessionMonitor.cancel();
if (sessionMonitor != null) {
this.sessionMonitor.cancel();
}
this.sessionCache.clear();
this.sessionMonitor.cancel();
}

public void setVDBRepository(VDBRepository repo) {
Expand Down

0 comments on commit 5e259c7

Please sign in to comment.