Package com.sun.messaging.jmq.jmsserver.persist.jdbc.sharecc

Examples of com.sun.messaging.jmq.jmsserver.persist.jdbc.sharecc.ShareConfigRecordDAO


        logger.logToAll(Logger.INFO, br.getKString(br.I_SHARECC_BACKUP,
                                                   clusterID, backupfile));

        ShareConfigChangeDBManager mgr = ShareConfigChangeDBManager.getDBManager();
        ShareConfigRecordDAO dao = mgr.getDAOFactory().getShareConfigRecordDAO();
        try {
            List<ChangeRecordInfo> records = null;

            Util.RetryStrategy retry = null;
            do {
                try {
                    records = dao.getAllRecords( null );
                    break;
                } catch ( Exception e ) {
                    if ( retry == null ) {
                         retry = new Util.RetryStrategy(mgr);
                    }
                    retry.assertShouldRetry( e );
                }
            } while ( true );

            Globals.getLogger().logToAll(Logger.INFO, br.getKString(
                                         br.I_SHARECC_BACKUP_RECORDS,
                                         String.valueOf(records.size()),
                                         dao.getTableName()));

            ChangeRecord.backupRecords(records, backupfile, true);

            Globals.getLogger().logToAll(Logger.INFO,
                                         br.getKString(br.I_SHARECC_BACKUP_RECORDS_SUCCESS,
View Full Code Here


        Connection conn = null;
        Exception myex = null;
        try {
            List<ChangeRecordInfo> records = ChangeRecord.prepareRestoreRecords(backupfile);

            ShareConfigRecordDAO dao = mgr.getDAOFactory().getShareConfigRecordDAO();

            Globals.getLogger().logToAll(Logger.INFO, br.getKString(
                                         br.I_SHARECC_RESTORE_RECORDS,
                                         String.valueOf(records.size()),
                                         backupfile));

            conn = mgr.getConnection( false );

            Util.RetryStrategy retry = null;
            do {
                try {
                    ChangeRecordInfo resetcri = ChangeRecord.makeResetRecord( true );
                    dao.insertResetRecord( conn, resetcri, false);
                    Iterator itr = records.iterator();
                    ChangeRecordInfo cri = null;
                    while (itr.hasNext()) {
                        cri = (ChangeRecordInfo)itr.next();
                        if (cri.getType() == ChangeRecordInfo.TYPE_RESET_PERSISTENCE) {
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.persist.jdbc.sharecc.ShareConfigRecordDAO

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.