String connectionName = XmlUtil.attribute(element, "connection");
if (connectionName!=null) {
List<ArgDescriptor> argDescriptors = new ArrayList<ArgDescriptor>();
persistenceSessionDescriptor.setArgDescriptors(argDescriptors);
ArgDescriptor argDescriptor = new ArgDescriptor();
argDescriptor.setTypeName(Connection.class.getName());
ReferenceDescriptor connectionDescriptor = new ReferenceDescriptor();
connectionDescriptor.setValue(connectionName);
argDescriptor.setDescriptor(connectionDescriptor);
}
SubscribeOperation subscribeOperation = new SubscribeOperation();
subscribeOperation.setWireEvents(false);
persistenceSessionDescriptor.addOperation(subscribeOperation);