protected void restartMaster() { this.stopIfMaster(); this.startNewMaster(); }
/** * @see org.jboss.ha.framework.interfaces.HAService#start() */ @Override public void start() throws Exception { this.registerRPCHandler(); this.registerDRMListener(); }
/** * {@inhericDoc} * @see org.jboss.ha.framework.server.HAServiceImpl#getReplicant() */ protected Serializable getReplicant() { return new SimpleCachableMarshalledValue(this.drmEntry); }
private void sendLocalEvent(String type) { E event = this.getEventFactory().createEvent(this, type); try { this.getEventFacility().notifyListeners(event); } catch (Exception e) { this.log.warn("Failed to send local event: " + event, e); } }
protected HAPartition findHAPartitionWithName (String name) throws Exception { return HAPartitionLocator.getHAPartitionLocator().getHAPartition(name, null); }
protected void containerIsAboutToStop() { if (target != null) { target.setInvocationsAuthorization(HATarget.DISABLE_INVOCATIONS); target.disable(); } }
public ObjectStreamSource getObjectStreamSource() { if (objectStreamSource == null) { objectStreamSource = new MarshalledValueObjectStreamSource(); } return objectStreamSource; }
protected void containerIsFullyStarted () { if( target != null ) target.setInvocationsAuthorization (HATarget.ENABLE_INVOCATIONS); }
/** * Expose to parent class * @see org.jboss.ha.framework.server.HASingletonImpl#stopIfMaster() */ @Override protected void stopIfMaster() { super.stopIfMaster(); } }
@Override public synchronized byte[] toByteArray() throws IOException { if (serializedForm == null) { serializedForm = serialize(); } raw = null; return serializedForm; }
/** * @see org.jboss.ha.framework.server.EventFactory#createEvent(HAService, java.lang.String) */ @Override public HAServiceEvent createEvent(Object source, String type) { return new HAServiceEvent(source, type); } }
/** * @see org.jboss.ha.singleton.HASingleton.RpcHandler#stopOldMaster() */ @Override public void stopOldMaster() throws Exception { // ovidiu 09/02/04 - temporary solution for Case 1843, use an asynchronous // distributed call. //callMethodOnPartition("_stopOldMaster", new Object[0], new Class[0]); this.callAsyncMethodOnPartition("stopOldMaster", new Object[0], new Class[0]); }
/** * @see org.jboss.ha.framework.interfaces.EventListener#handleEvent(java.util.EventObject) */ @Override public void handleEvent(E event) throws Exception { this.callAsyncMethodOnPartition("handleEvent", new Object[] { event }, HANDLE_EVENT_TYPES); }
public List<?> getReplicants() throws Exception { return target.getReplicantList(); }
public ClusterPartition() { this.logHistory("Partition object created"); }
/** * {@inhericDoc} * @see org.jboss.ha.framework.server.HAServiceImpl#setServiceHAName(java.lang.String) */ @Inject(fromContext = FromContext.NAME) public void setServiceHAName(String haName) { super.setServiceHAName(haName); }
private Serializable createReplicant(ModClusterServiceDRMEntry entry) { return new SimpleCachableMarshalledValue(entry); }
protected void containerIsAboutToStop () { if( target != null ) { target.setInvocationsAuthorization (HATarget.DISABLE_INVOCATIONS); target.disable (); } this.ejbModuleStopping = true; }
public SessionAttributeMarshallerFactoryImpl() { this(new MarshalledValueObjectStreamSource()); }
protected void containerIsFullyStarted () { if (target != null) target.setInvocationsAuthorization(HATarget.ENABLE_INVOCATIONS); }