- if (availableSessions != null)
- {// there are available sessions
- if (availableSessions.length>1)
- {// more than one session if available... can not choose
-
- // represents list of session as String
- StringBuffer sessionURNs = new StringBuffer("");
- for (int i = 0; i< availableSessions.length ; i++)
- {
- sessionURNs.append(availableSessions[i]+" ");
- }
- throw new NoDefaultSessionException("Several sessions available, please pick one: "+sessionURNs);
- }
-
- // check if only one session available. if yes, open it
- if (availableSessions.length == 1)
- {
- // only one session available, open it.
- return this.getIClient(clientHandle, availableSessions[0]);
- }
- else {
- log.debug("No active session found");
+ if (availableSessions != null) {// there are available sessions
+ if (availableSessions.length > 1) {// more than one session if available... can not choose
+
+ // represents list of session as String
+ StringBuffer sessionURNs = new StringBuffer("");
+ for (int i = 0; i < availableSessions.length; i++) {
+ sessionURNs.append(availableSessions[i] + " ");