Package org.apache.activemq.util

Examples of org.apache.activemq.util.DefaultIOExceptionHandler


            }
            if (brokerId == null) {
                brokerId = broker.getBrokerId();
            }
            if (ioExceptionHandler == null) {
                setIoExceptionHandler(new DefaultIOExceptionHandler());
            }
            LOG.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + ") started");
            getBroker().brokerServiceStarted();
            checkSystemUsageLimits();
            startedLatch.countDown();
View Full Code Here


    BrokerService broker;

    @Test
    public void testRollbackOnRecover() throws Exception {
        broker = createAndStartBroker(true);
        DefaultIOExceptionHandler ignoreAllExceptionsIOExHandler = new DefaultIOExceptionHandler();
        ignoreAllExceptionsIOExHandler.setIgnoreAllErrors(true);
        broker.setIoExceptionHandler(ignoreAllExceptionsIOExHandler);

        ActiveMQConnectionFactory f = new ActiveMQConnectionFactory("vm://localhost?async=false");
        f.setAlwaysSyncSend(true);
        Connection c = f.createConnection();
View Full Code Here

        // startup db
        sharedDs = (EmbeddedDataSource) new DataSourceSupport().getDataSource();

        broker = new BrokerService();

        DefaultIOExceptionHandler handler = new DefaultIOExceptionHandler();
        handler.setIgnoreSQLExceptions(false);
        handler.setStopStartConnectors(true);
        broker.setIoExceptionHandler(handler);
        broker.addConnector("tcp://localhost:0");
        broker.setUseJmx(false);
        broker.setPersistent(true);
        broker.setDeleteAllMessagesOnStartup(true);
View Full Code Here

    BrokerService broker;

    @Test
    public void testRollbackOnRecover() throws Exception {
        broker = createAndStartBroker(true);
        DefaultIOExceptionHandler ignoreAllExceptionsIOExHandler = new DefaultIOExceptionHandler();
        ignoreAllExceptionsIOExHandler.setIgnoreAllErrors(true);
        broker.setIoExceptionHandler(ignoreAllExceptionsIOExHandler);

        ActiveMQConnectionFactory f = new ActiveMQConnectionFactory("vm://localhost?async=false");
        f.setAlwaysSyncSend(true);
        Connection c = f.createConnection();
View Full Code Here

                    registerFTConnectorMBean(masterConnector);
                }
            }
            brokerId = broker.getBrokerId();
            if (ioExceptionHandler == null) {
              setIoExceptionHandler(new DefaultIOExceptionHandler());
            }
            LOG.info("ActiveMQ JMS Message Broker (" + getBrokerName() + ", " + brokerId + ") started");
            getBroker().brokerServiceStarted();
            startedLatch.countDown();
        } catch (Exception e) {
View Full Code Here

        configureBroker(master);
        master.start();
    }

    protected void configureBroker(BrokerService brokerService) {
        DefaultIOExceptionHandler stopBrokerOnStoreException = new DefaultIOExceptionHandler();
        // we want any store io exception to stop the broker
        stopBrokerOnStoreException.setIgnoreSQLExceptions(false);
        brokerService.setIoExceptionHandler(stopBrokerOnStoreException);
    }
View Full Code Here

        // startup db
        sharedDs = (EmbeddedDataSource) DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory());

        broker = new BrokerService();

        DefaultIOExceptionHandler handler = new DefaultIOExceptionHandler();
        handler.setIgnoreSQLExceptions(false);
        handler.setStopStartConnectors(true);
        broker.setIoExceptionHandler(handler);
        broker.addConnector("tcp://localhost:0");
        broker.setUseJmx(false);
        broker.setPersistent(true);
        broker.setDeleteAllMessagesOnStartup(true);
View Full Code Here

        configureBroker(master);
        master.start();
    }

    protected void configureBroker(BrokerService brokerService) {
        DefaultIOExceptionHandler stopBrokerOnStoreException = new DefaultIOExceptionHandler();
        // we want any store io exception to stop the broker
        stopBrokerOnStoreException.setIgnoreSQLExceptions(false);
        brokerService.setIoExceptionHandler(stopBrokerOnStoreException);
    }
View Full Code Here

        }

        startAllConnectors();

        if (ioExceptionHandler == null) {
            setIoExceptionHandler(new DefaultIOExceptionHandler());
        }

        if (LOG.isInfoEnabled()) {
            LOG.info("Apache ActiveMQ " + getBrokerVersion() + " ("
                    + getBrokerName() + ", " + brokerId + ") started");
View Full Code Here

    BrokerService broker;

    @Test
    public void testRollbackOnRecover() throws Exception {
        broker = createAndStartBroker(true);
        DefaultIOExceptionHandler ignoreAllExceptionsIOExHandler = new DefaultIOExceptionHandler();
        ignoreAllExceptionsIOExHandler.setIgnoreAllErrors(true);
        broker.setIoExceptionHandler(ignoreAllExceptionsIOExHandler);

        ActiveMQConnectionFactory f = new ActiveMQConnectionFactory("vm://localhost?async=false");
        f.setAlwaysSyncSend(true);
        Connection c = f.createConnection();
View Full Code Here

TOP

Related Classes of org.apache.activemq.util.DefaultIOExceptionHandler

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.