protected void containerIsFullyStarted () { if( target != null ) target.setInvocationsAuthorization (HATarget.ENABLE_INVOCATIONS); }
protected void containerIsFullyStarted () { if (target != null) target.setInvocationsAuthorization(HATarget.ENABLE_INVOCATIONS); }
protected void containerIsAboutToStop() { if (target != null) { target.setInvocationsAuthorization(HATarget.DISABLE_INVOCATIONS); target.disable(); } }
protected void containerIsAboutToStop () { if( target != null ) { target.setInvocationsAuthorization (HATarget.DISABLE_INVOCATIONS); target.disable (); } this.ejbModuleStopping = true; }
/** * Removes the local node from the distributed registry of nodes providing * the service and causes {@link #invocationsAllowed()} to return * <code>false</code>. */ public void destroy() { try { this.cleanExistenceInCurrentHAPartition(); // maybe some threads are blocked: we let them go here: // setInvocationsAuthorization (HATarget.DISABLE_INVOCATIONS); } catch (Exception e) { log.error("failed to destroy", e); } }
/** * Creates a new HATarget. * * @param partition the {@link HAPartition} for the service's cluster * @param replicantName the name of the service * @param target the service's {@link #getReplicantList() replicant} * @param allowInvocations <code>true</code> if {@link #invocationsAllowed()} * should return <code>true</code> immediately; * <code>false</code> if not * @throws Exception */ public HATarget(HAPartition partition, String replicantName, Serializable target, int allowInvocations) throws Exception { this.replicantName = replicantName; this.target = target; setInvocationsAuthorization (allowInvocations); updateHAPartition(partition); }