/** * Create a new TransactionStickyFirstAvailable. */ public TransactionStickyFirstAvailable() { super(new FirstAvailable()); }
public Object chooseTarget (FamilyClusterInfo clusterFamily) { return chooseTarget(clusterFamily, null); }
public void startRMIServer(NullActivityFactoryImpl naf, SleeInternalEndpoint endpoint, EventLookup eventLookup, ActivityContextFactoryImpl activityContextFactory) { RemoteSleeService stub = null; try { if (logger.isDebugEnabled()) { logger.debug("Starting Slee Service HARMI Server"); } InitialContext ctx = new InitialContext(); // TODO This shouldn't be hardcoded - use a config. file to // configure the partition name, jndi name, port number and // inetaddress HAPartition myPartition = (HAPartition) ctx .lookup("/HAPartition/DefaultPartition"); rmiServer = new HARMIServerImpl(myPartition, "RemoteSleeService", RemoteSleeService.class, new RemoteSleeServiceImpl(naf, eventLookup, activityContextFactory)); stub = (RemoteSleeService) rmiServer .createHAStub(new FirstAvailable()); ctx.rebind("/SleeService", stub); if (logger.isDebugEnabled()) { logger.debug("Bound SleeService rmi stub in jndi"); } } catch (Exception e) { logger.error("Failed to start HA RMI server for Remote slee service", e); } }