Package org.apache.geronimo.kernel.management

Examples of org.apache.geronimo.kernel.management.State


     */
    public final void start() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        // Move to the starting state
        State originalState;
        synchronized (this) {
            originalState = getStateInstance();
            if (originalState == State.RUNNING) {
                return;
            }
View Full Code Here


     * is a bad idea and therefore not allowed.
     */
    public final void startRecursive() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        State state = getStateInstance();
        if (state != State.STOPPED && state != State.FAILED && state != State.RUNNING) {
            // Cannot startRecursive while in the stopping state
            // Dain: I don't think we can throw an exception here because there is no way for the caller
            // to lock the instance and check the state before calling
            return;
View Full Code Here

     */
    public final void stop() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        // move to the stopping state
        State originalState;
        synchronized (this) {
            originalState = getStateInstance();
            if (originalState == State.STOPPED || originalState == State.FAILED) {
                return;
            }
View Full Code Here

     */
    final void fail() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        synchronized (this) {
            State state = getStateInstance();
            if (state == State.STOPPED || state == State.FAILED) {
                return;
            }
        }

View Full Code Here

                }

                int stateValue = kernel.getGBeanState(name);
                if (stateValue != State.RUNNING_INDEX) {
                    GBeanData data = kernel.getGBeanData(name);
                    State state = State.fromInt(stateValue);
                    StringBuilder buf = new StringBuilder();
                    buf.append("(").append(state.getName());
                    // Since it's not unusual for a failure to be caused by a port binding failure
                    //    we'll see if there's a likely looking port attribute in the config data
                    //    for the GBean.  It's a long shot, but hey.
                    if (data != null && data.getAttributes() != null) {
                        Map map = data.getAttributes();
View Full Code Here

     */
    public final void start() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        // Move to the starting state
        State originalState;
        synchronized (this) {
            originalState = getStateInstance();
            if (originalState == State.RUNNING) {
                return;
            }
View Full Code Here

     * is a bad idea and therefore not allowed.
     */
    public final void startRecursive() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        State state = getStateInstance();
        if (state != State.STOPPED && state != State.FAILED && state != State.RUNNING) {
            // Cannot startRecursive while in the stopping state
            // Dain: I don't think we can throw an exception here because there is no way for the caller
            // to lock the instance and check the state before calling
            return;
View Full Code Here

     */
    public final void stop() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        // move to the stopping state
        State originalState;
        synchronized (this) {
            originalState = getStateInstance();
            if (originalState == State.STOPPED || originalState == State.FAILED) {
                return;
            }
View Full Code Here

     */
    final void fail() {
        assert !Thread.holdsLock(this): "This method cannot be called while holding a synchronized lock on this";

        synchronized (this) {
            State state = getStateInstance();
            if (state == State.STOPPED || state == State.FAILED) {
                return;
            }
        }

View Full Code Here

                    Object object = container.getComponentInstance((String)id);
                    if (object instanceof BrokerService) {
                        BrokerService brokerService = (BrokerService) object;
                        String brokerName = brokerService.getBrokerName();
                        String brokerURI = brokerService.getMasterConnectorURI();
                        State state = brokerService.isStarted() ? State.RUNNING : State.STOPPED;
                        BrokerServiceWrapper wrapper = new BrokerServiceWrapper(brokerName, brokerURI, brokerService, state);
                        brokerServices.put(brokerName, wrapper);
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.management.State

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.