if (getDescriptor() == null) {
throw new IMException("Descriptor not set");
}
IMConnection imConnection = new JabberIMConnection((JabberPublisherDescriptor)getDescriptor(),
getAuthenticationHolder());
if (imConnection.connect()) {
return imConnection;
}
throw new IMException("Connection failed");
}