use of org.compiere.model.MReplication in project adempiere by adempiere.
the class ReplicationLocal method connectRemote.
// doIt
/**
* Connect to Remote Server
* @throws java.lang.Exception
*/
private void connectRemote() throws Exception {
// Replication Info
m_replication = new MReplication(getCtx(), getRecord_ID(), get_TrxName());
//
String AppsHost = m_replication.getHostAddress();
int AppsPort = m_replication.getHostPort();
CConnection connection = new CConnection(AppsHost);
connection.setAppsPort(AppsPort);
log.info(AppsHost + ":" + AppsPort);
try {
Server server = connection.getServer();
// log.fine("- ServerHome: " + serverHome);
if (server == null)
throw new Exception("NoServer");
m_serverRemote = server;
// log.fine("- Server: " + m_serverRemote);
// log.fine("- Remote Status = " + m_serverRemote.getStatus());
} catch (Exception ex) {
log.log(Level.SEVERE, "connectRemote", ex);
throw new Exception(ex);
}
}
Aggregations