Examples of XStreamSerializer


Examples of org.axonframework.serializer.xml.XStreamSerializer

        Object serializer;
        if (element.hasAttribute(EVENT_SERIALIZER_ATTRIBUTE)) {
            serializer = new RuntimeBeanReference(element.getAttribute(EVENT_SERIALIZER_ATTRIBUTE));
        } else {
            serializer = createAutowiredBeanWithFallback(new XStreamSerializer(), Serializer.class);
        }
        builder.addConstructorArgValue(serializer);

        if (element.hasAttribute(PERSISTENCE_EXCEPTION_RESOLVER_ATTRIBUTE)) {
            builder.addPropertyReference("persistenceExceptionResolver", element.getAttribute(
View Full Code Here

Examples of org.axonframework.serializer.xml.XStreamSerializer

     * to be stored in a separate Mongo Document.
     *
     * @param mongo MongoTemplate instance to obtain the database and the collections.
     */
    public MongoEventStore(MongoTemplate mongo) {
        this(new XStreamSerializer(), mongo);
    }
View Full Code Here

Examples of org.axonframework.serializer.xml.XStreamSerializer

     *
     * @param mongoTemplate   The template giving access to the required collections
     * @param storageStrategy The strategy for storing and retrieving events from the collections
     */
    public MongoEventStore(MongoTemplate mongoTemplate, StorageStrategy storageStrategy) {
        this(mongoTemplate, new XStreamSerializer(), storageStrategy);
    }
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

      assertEquals("Snapshot filename suffix must match /[a-zA-Z0-9]*[Ss]napshot/, but 'SNAPSHOT' does not", exception.getMessage());
    }
  }

  public void testXStreamSnapshot() throws Exception {
    Serializer serializer = new XStreamSerializer();

    takeSnapshot(serializer);
    recover(serializer);
  }
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

    startAndCrash(strategy);
    recover(strategy);
  }

  public void testXStreamJournal() throws Exception {
    Serializer strategy = new XStreamSerializer();

    startAndCrash(strategy);
    recover(strategy);
  }
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

  public void testRoundtripJava() throws Exception {
    checkRoundtrip("snapshot", new JavaSerializer());
  }

  public void testRoundtripXStream() throws Exception {
    checkRoundtrip("xstreamsnapshot", new XStreamSerializer());
  }
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

    assertEquals("initial one two", second.prevalentSystem().toString());
    second.close();
  }

  public void testDetectExistingSnapshotFromUnknownSnapshotManager() throws Exception {
    Prevayler<StringBuffer> first = createPrevayler("xstreamsnapshot", new XStreamSerializer());
    appendTakeSnapshotAndClose(first);

    try {
      createPrevayler("snapshot", new JavaSerializer());
      fail();
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

          e.getMessage().endsWith("0000000000000000002.xstreamsnapshot cannot be read; only [snapshot] supported"));
    }
  }

  public void testMultipleSerializationStrategiesFromXStream() throws Exception {
    Prevayler<StringBuffer> prevayler = createPrevayler("xstreamsnapshot", new XStreamSerializer());
    appendTakeSnapshotAndClose(prevayler);

    checkSnapshotAndDeleteJournal("0000000000000000002.xstreamsnapshot", "0000000000000000001.journal");

    checkCanReadSnapshotWithMultipleStrategies();
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

  public void testUsePrimaryForWritingSnapshot() throws Exception {
    Prevayler<StringBuffer> first = createPrevaylerMulti();
    appendTakeSnapshotAndClose(first);
    checkSnapshotAndDeleteJournal("0000000000000000002.xstreamsnapshot", "0000000000000000001.journal");

    Prevayler<StringBuffer> second = createPrevayler("xstreamsnapshot", new XStreamSerializer());
    assertEquals("initial one two", second.prevalentSystem().toString());
    second.close();
  }
View Full Code Here

Examples of org.prevayler.foundation.serialization.XStreamSerializer

  private Prevayler<StringBuffer> createPrevaylerMulti() throws Exception {
    PrevaylerFactory<StringBuffer> factory = new PrevaylerFactory<StringBuffer>();
    factory.configurePrevalentSystem(new StringBuffer("initial"));
    factory.configurePrevalenceDirectory(_testDirectory);
    factory.configureSnapshotSerializer("xstreamsnapshot", new XStreamSerializer());
    factory.configureSnapshotSerializer("snapshot", new JavaSerializer());
    return factory.create();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.