try {
sndT = Thread.currentThread();
if(reset) {
reset = false;
throw new ConnectorException("Reset forced");
}
synchronized(shellout) {
//shellout.writeBuffer(pinf.procid, (LinkedList) ls);
Iterator it = ls.iterator();
while(it.hasNext()) {
shout.writeObject(it.next());
}
shout.flush();
}
if(reset) {
reset = false;
throw new ConnectorException("Reset forced");
}
} catch(org.jboss.fresh.shell.ShellIOException ex) {
log.debug("CATCH ShellIOException ");
Throwable th = ex.getCause();
if(th instanceof org.jboss.fresh.io.ApplicationIOException) {
log.debug("CATCH ApplicationIOException ");
th = th.getCause();
if(th instanceof org.jboss.fresh.events.net.TakenOverException) {
log.debug("CATCH TakenOverException ");
throw (TakenOverException) th;
}
} else if(th instanceof ThrowableProxy) {
log.debug("CATCH ThrowableProxy ");
String cname = ((ThrowableProxy) th).getClassName();
if("org.jboss.fresh.io.ApplicationIOException".equals(cname)) {
log.debug("CATCH LC ApplicationIOException ");
th = th.getCause();
if(th instanceof ThrowableProxy) {
log.debug("CATCH ThrowableProxy ");
cname = ((ThrowableProxy) th).getClassName();
if("org.jboss.fresh.events.net.TakenOverException".equals(cname)) {
log.debug("CATCH LC TakenOverException ");
throw new TakenOverException(th.getMessage());
}
}
}
}
throw new ConnectorException("Exception while reading from remote process: (" + this + ", procid: " + shin.getProcID() + ")", ex);
} catch(Exception ex) {
//log.error("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
throw new ConnectorException("Exception while writing to remote process: (" + this + ", procid: " + shout.getProcID() + ")", ex);
} finally {
sndT = null;
}
//log.info(" done sending.");