activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raffaele <r.gambe...@prismasw.it>
Subject setDeleteAllMessagesOnStartup(true) and MySql
Date Mon, 11 Jun 2007 10:11:09 GMT

Hi all,

Im yet trying to do some test with a BrokerService and some settings.

Now, I tried with persistence on MySql and with
setDeleteAllMessagesOnStartup(true), here is the code:

...
configurePersistence();
m_broker.addConnector("tcp://localhost:61616");
m_broker.setDeleteAllMessagesOnStartup(true);
m_broker.start();
// Do sending of messagges
....

And so, with that flag set to true, the program blocks indefinitely in
m_broker.start(), in particular it blocks here(the bold line of code) in
JDBCPersitenceAdapter.java:
public void deleteAllMessages() throws IOException {
        TransactionContext c = getTransactionContext();
        try {
            getAdapter().doDropTables(c);
           
getAdapter().setUseExternalMessageReferences(isUseExternalMessageReferences());
            getAdapter().doCreateTables(c);
        } catch (SQLException e) {
            JDBCPersistenceAdapter.log("JDBC Failure: ",e);
            throw IOExceptionSupport.create(e);
        } finally {
            c.close();
        }
    }

Any hint?

Best regards,

Raffaele
-- 
View this message in context: http://www.nabble.com/setDeleteAllMessagesOnStartup%28true%29-and-MySql-tf3900695s2354.html#a11058012
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message