Package org.codehaus.activemq.io.impl

Examples of org.codehaus.activemq.io.impl.DefaultWireFormat


     *
     * Runs at about 2600 msg/sec on OS X G4 1.5ghz
     */
    public void XtestMessageSerialization() throws Exception {
        message.setReceiptRequired(false);
        DefaultWireFormat wireFormat = new DefaultWireFormat();

        long start = System.currentTimeMillis();
        for (int i = 0; i < MESSAGE_COUNT; i++) {

            message.setJMSMessageID("id:"+i);

            PacketByteArrayOutputStream pos = new PacketByteArrayOutputStream();
            DataOutputStream os = new DataOutputStream(pos);
            os.writeByte(1);
            os.writeUTF("Test");
            wireFormat.writePacket(message, os);
            os.close();
           
        }
        long end = System.currentTimeMillis();

View Full Code Here


       
        int workers=10;
        Callable task = new Callable() {
            public Object call() throws Exception {
               
                DefaultWireFormat wireFormat = new DefaultWireFormat();
                ActiveMQMessage copy = message.deepCopy();
                copy.setReceiptRequired(false);
               
                for (int i = 0; i < MESSAGE_COUNT; i++) {
                    copy.setJMSMessageID("id:"+i);

                    PacketByteArrayOutputStream pos = new PacketByteArrayOutputStream();
                    DataOutputStream os = new DataOutputStream(pos);
                    os.writeByte(1);
                    os.writeUTF("Test");
                    wireFormat.writePacket(copy, os);
                    os.close();
                }
               
                return null;
            }
View Full Code Here

        File directory = new File("target/journal");
        if( vmPersistenceAdapter==null ) {
            delete(directory);
            vmPersistenceAdapter = new VMPersistenceAdapter();
        }
        JournalPersistenceAdapter adapter = new JournalPersistenceAdapter(directory, vmPersistenceAdapter, new DefaultWireFormat());
        adapter.setJournalType(journalType);
        return adapter;
    }
View Full Code Here

    protected BrokerContainerImpl createBroker() throws JMSException {
        BrokerContainerImpl container = new BrokerContainerImpl("DefaultBroker");

        // Start internal vm protocoll
        BrokerConnectorImpl vmConnector = new BrokerConnectorImpl(container, "vm://localhost", new DefaultWireFormat());
        BrokerConnectorImpl tcpConnector = new BrokerConnectorImpl(container, "tcp://localhost:9100", new DefaultWireFormat());

        // start activemq broker
        container.start();
        return container;
    }
View Full Code Here

* @version $Revision: 1.2 $
*/
public class BDbTopicMessageStoreTest extends TopicMessageStoreTestSupport {
    protected PersistenceAdapter createPersistenceAdapter() throws Exception {
        Environment environment = BDbQueueMessageContainerTest.createEnvironment();
        return new BDbPersistenceAdapter(environment, new DefaultWireFormat());
    }
View Full Code Here

*/
public class BDbQueueMessageContainerTest extends MessageContainerTestSupport {

    protected PersistenceAdapter createPersistenceAdapter() throws Exception {
        Environment environment = BDbQueueMessageContainerTest.createEnvironment();
        return new BDbPersistenceAdapter(environment, new DefaultWireFormat());
    }
View Full Code Here

*/
public class BDbQueueMessageStoreTest extends QueueMessageStoreTestSupport {
 
    protected PersistenceAdapter createPersistenceAdapter() throws Exception {
        Environment environment = BDbQueueMessageContainerTest.createEnvironment();
        return new BDbPersistenceAdapter(environment, new DefaultWireFormat());
    }
View Full Code Here

*/
public class HowlJournalQueueMessageStoreTest extends QueueMessageStoreTestSupport {
    protected PersistenceAdapter createPersistenceAdapter() throws Exception {
        File directory = new File("target/journal");
        delete(directory);
        JournalPersistenceAdapter adapter = new JournalPersistenceAdapter(directory, new VMPersistenceAdapter(), new DefaultWireFormat());
        adapter.setJournalType(JournalPersistenceAdapter.HOWL_JOURNAL_TYPE);
        return adapter;
    }
View Full Code Here

*/
public class JournalQueueMessageStoreTest extends QueueMessageStoreTestSupport {
    protected PersistenceAdapter createPersistenceAdapter() throws Exception {
        File directory = new File("target/journal");
        delete(directory);
        JournalPersistenceAdapter adapter = new JournalPersistenceAdapter(directory, new VMPersistenceAdapter(), new DefaultWireFormat());
        adapter.setJournalType(JournalPersistenceAdapter.DEFAULT_JOURNAL_TYPE);
        return adapter;
    }
View Full Code Here

    /**
     * @return
     */
    public static PersistenceAdapter createDefault() {
        AxionDataSource ds = new AxionDataSource("jdbc:axiondb:testdb");
        return new JDBCPersistenceAdapter(ds, new DefaultWireFormat());
    }
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.io.impl.DefaultWireFormat

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.