IQueueEnqueue[] queues = new IQueueEnqueue[sharedObjectsTo.length];
for (int i = 0; i < sharedObjectsTo.length; i++) {
SOWrapper w = container.getSharedObjectWrapper(sharedObjectsTo[i]);
if (w == null)
throw new SharedObjectConnectException("receiver=" + sharedObjectsTo[i].getName() + " not found"); //$NON-NLS-1$ //$NON-NLS-2$
queues[i] = new QueueEnqueueImpl(w.getQueue());
}
// OK now we've got ids and wrappers, create a connector
result = new SOConnector(sharedObjectFrom, sharedObjectsTo, queues);
addConnector(result);
// notify listeners