public CSTAConnectionID getConnID() {
		synchronized (this) {
			if (this.connID != null) {
				return this.connID;
			}
		}
		if (this.termConns != null) {
			TSConnection tc = null;
			CSTAConnectionID tcConnID = null;
			synchronized (this.termConns) {
				for (int i = 0; i < this.termConns.size(); i++) {
					tc = (TSConnection) this.termConns.elementAt(i);
					try {
						tcConnID = tc.getConnID();
					} catch (TsapiPlatformException e) {
						log.error("Ignoring exception: " + e);
					}
					if (tcConnID != null) {
						return tcConnID;
					}
				}
			}
		}
		if (this.staleTermConns != null) {
			TSConnection tc = null;
			CSTAConnectionID tcConnID = null;
			synchronized (this.staleTermConns) {
				for (int i = 0; i < this.staleTermConns.size(); i++) {
					tc = (TSConnection) this.staleTermConns.elementAt(i);
					try {
						tcConnID = tc.getConnID();
					} catch (TsapiPlatformException e) {
						log.error("Ignoring exception: " + e);
					}
					if (tcConnID != null) {
						return tcConnID;
					}
				}
			}
		}
		throw new TsapiPlatformException(4, 0, "no connection id found!");
	}