connection = (RemoteConnection)constructor.newInstance();
} catch (Exception exception) {
throw ValidationException.invalidValueForProperty(protocol, PersistenceUnitProperties.REMOTE_PROTOCOL, exception);
}
}
RemoteSession remoteSession = new RemoteSession();
remoteSession.setIsMetadataRemote(false);
remoteSession.setProject(this.session.getProject());
remoteSession.setProfiler(this.session.getProfiler());
remoteSession.setSessionLog(this.session.getSessionLog());
remoteSession.setEventManager(this.session.getEventManager());
remoteSession.setQueries(this.session.getQueries());
remoteSession.setProperties(this.session.getProperties());
remoteSession.setName(this.session.getName());
remoteSession.setRemoteConnection(connection);
this.session = remoteSession;
}
} else {
// Configure as server.
if (protocol.equalsIgnoreCase(RemoteProtocol.RMI)) {