Search in sources :

Example 1 with SingletonLaunchStatisticsService

use of com.github.nagyesta.abortmission.strongback.rmi.service.impl.SingletonLaunchStatisticsService in project abort-mission by nagyesta.

the class AbstractInMemoryDataSourceIntegrationTest method setUp.

@BeforeEach
void setUp() throws Exception {
    try {
        service = new SingletonLaunchStatisticsService();
        final Remote abortMissionService = UnicastRemoteObject.exportObject(service, port);
        if (Arrays.asList(registry.list()).contains(RmiServerConstants.SERVICE_NAME)) {
            registry.rebind(RmiServerConstants.SERVICE_NAME, abortMissionService);
        } else {
            registry.bind(RmiServerConstants.SERVICE_NAME, abortMissionService);
        }
    } catch (final Exception ex) {
        throw new StrongbackException("Server startup failed.", ex);
    }
}
Also used : Remote(java.rmi.Remote) StrongbackException(com.github.nagyesta.abortmission.strongback.base.StrongbackException) SingletonLaunchStatisticsService(com.github.nagyesta.abortmission.strongback.rmi.service.impl.SingletonLaunchStatisticsService) StrongbackException(com.github.nagyesta.abortmission.strongback.base.StrongbackException) RemoteException(java.rmi.RemoteException) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

StrongbackException (com.github.nagyesta.abortmission.strongback.base.StrongbackException)1 SingletonLaunchStatisticsService (com.github.nagyesta.abortmission.strongback.rmi.service.impl.SingletonLaunchStatisticsService)1 Remote (java.rmi.Remote)1 RemoteException (java.rmi.RemoteException)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1