Package com.sun.messaging.jmq.jmsserver.cluster

Examples of com.sun.messaging.jmq.jmsserver.cluster.BrokerState


            DBManager.lockTables(conn, true); // true = lock

            try {
                DAOFactory daoFactory = dbmgr.getDAOFactory();
                BrokerDAO brokerDAO = daoFactory.getBrokerDAO();
                BrokerState state = brokerDAO.getState(conn, brokerID);
                if ( !state.isActiveState() ) {
                    try {
                        // Remove broker's and its data
                        conn.setAutoCommit(false); // do this in 1 txn
                        daoFactory.getConsumerStateDAO().deleteAll(conn);
                        daoFactory.getMessageDAO().deleteAll(conn);
View Full Code Here


            DBManager.lockTables(conn, true); // true = lock

            try {
                DAOFactory daoFactory = dbmgr.getDAOFactory();
                BrokerDAO brokerDAO = daoFactory.getBrokerDAO();
                BrokerState state = brokerDAO.getState(conn, brokerID);
                if ( !state.isActiveState() ) {
                    try {
                        conn.setAutoCommit(false);
                        daoFactory.getJMSBGDAO().delete(conn, bname, null);
                        daoFactory.getTMLogRecordDAOJMSBG().deleteAllByName(conn, bname, null);
                        conn.commit();
View Full Code Here

     * @throws BrokerException
     */
    public BrokerState getState( Connection conn, String id )
        throws BrokerException {

        BrokerState state = null;

        boolean myConn = false;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        Exception myex = null;
View Full Code Here

     * @throws BrokerException
     */
    public boolean isBeingTakenOver( Connection conn, String id )
        throws BrokerException {

        BrokerState brokerState = getState( conn, id );
        int state = brokerState.intValue();
        return ( state == BrokerState.I_FAILOVER_PENDING ||
                 state == BrokerState.I_FAILOVER_STARTED ||
                 state == BrokerState.I_FAILOVER_COMPLETE ||
                 state == BrokerState.I_FAILOVER_FAILED );
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.cluster.BrokerState

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.