Search in sources :

Example 6 with ServerMessagingDelegate

use of cbit.vcell.message.server.ServerMessagingDelegate in project vcell by virtualcell.

the class SolverPreprocessor method sendFailureAndExit.

/**
 * Starts the application.
 * @param args an array of command-line arguments
 * @throws VCMessagingException
 */
public static void sendFailureAndExit(HTCSolver htcSolver, SimulationTask simTask, String hostName, SimulationMessage simMessage) throws VCMessagingException {
    VCMessagingService service = VCellServiceHelper.getInstance().loadService(VCMessagingService.class);
    service.setDelegate(new ServerMessagingDelegate());
    VCMessageSession session = service.createProducerSession();
    try {
        WorkerEventMessage.sendFailed(session, htcSolver, simTask, hostName, simMessage);
        sleep(500);
        service.close();
        sleep(500);
    } catch (VCMessagingException e1) {
        e1.printStackTrace();
    } finally {
        System.exit(-1);
    }
}
Also used : ServerMessagingDelegate(cbit.vcell.message.server.ServerMessagingDelegate) VCMessageSession(cbit.vcell.message.VCMessageSession) VCMessagingService(cbit.vcell.message.VCMessagingService) VCMessagingException(cbit.vcell.message.VCMessagingException)

Aggregations

VCMessagingService (cbit.vcell.message.VCMessagingService)6 ServerMessagingDelegate (cbit.vcell.message.server.ServerMessagingDelegate)6 VCMessagingException (cbit.vcell.message.VCMessagingException)4 ServiceInstanceStatus (cbit.vcell.message.server.ServiceInstanceStatus)3 VCellServiceMXBeanImpl (cbit.vcell.message.server.jmx.VCellServiceMXBeanImpl)3 Date (java.util.Date)3 MBeanServer (javax.management.MBeanServer)3 ObjectName (javax.management.ObjectName)3 ExportServiceImpl (cbit.vcell.export.server.ExportServiceImpl)2 VCMessageSession (cbit.vcell.message.VCMessageSession)2 DatabaseServerImpl (cbit.vcell.modeldb.DatabaseServerImpl)2 Cachetable (cbit.vcell.simdata.Cachetable)2 DataServerImpl (cbit.vcell.simdata.DataServerImpl)2 DataSetControllerImpl (cbit.vcell.simdata.DataSetControllerImpl)2 File (java.io.File)2 ConnectionFactory (org.vcell.db.ConnectionFactory)2 KeyFactory (org.vcell.db.KeyFactory)2 WorkerEventMessage (cbit.vcell.message.messages.WorkerEventMessage)1 CommandService (cbit.vcell.message.server.cmd.CommandService)1 CommandServiceLocal (cbit.vcell.message.server.cmd.CommandServiceLocal)1