if (!(conn instanceof JBossConnection))
{
throw new Exception("Connection not an instance of JBossConnection");
}
JBossConnection jbconn = (JBossConnection)conn;
DelegateSupport del = (DelegateSupport)jbconn.getDelegate();
ConnectionState state = (ConnectionState)del.getState();
return state.getServerID();
}