Package org.axonframework.serializer.xml

Examples of org.axonframework.serializer.xml.XStreamSerializer


    }

    @Override
    protected void prepareEventStore() {
        EmbeddedCassandra.start();
        eventStore = new CassandraEventStore(new XStreamSerializer(),
                                             EmbeddedCassandra.CLUSTER_NAME,
                                             EmbeddedCassandra.KEYSPACE_NAME,
                                             EmbeddedCassandra.CF_NAME,
                                             EmbeddedCassandra.HOSTS);
    }
View Full Code Here


        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

     * 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

     *
     * @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

        eventStore.appendEvents("test", stream2);
    }

    @Test
    public void testReadEventsWithIllegalSnapshot() {
        final XStreamSerializer serializer = spy(new XStreamSerializer());
        FileSystemEventStore eventStore = new FileSystemEventStore(serializer,
                                                                   new SimpleEventFileResolver(eventFileBaseDir));

        GenericDomainEventMessage<StubDomainEvent> event1 = new GenericDomainEventMessage<StubDomainEvent>(
                aggregateIdentifier,
View Full Code Here

    @Before
    public void setUp() {
        jedis = new Jedis("localhost");
        testSubject = new RedisEventStore();
        testSubject.setEventSerializer(new XStreamSerializer());
        testSubject.setRedisConnectionProvider(new RedisConnectionProvider() {
            @Override
            public Jedis newConnection() {
                return new Jedis("localhost");
            }
View Full Code Here

        channel1 = createChannel();
        channel2 = createChannel();
        mockCommandBus1 = spy(new SimpleCommandBus());
        mockCommandBus2 = spy(new SimpleCommandBus());
        clusterName = "test-" + new Random().nextInt(Integer.MAX_VALUE);
        connector1 = new JGroupsConnector(channel1, clusterName, mockCommandBus1, new XStreamSerializer());
        connector2 = new JGroupsConnector(channel2, clusterName, mockCommandBus2, new XStreamSerializer());
    }
View Full Code Here

        channel1 = createChannel();
        channel2 = createChannel();
        mockCommandBus1 = spy(new SimpleCommandBus());
        mockCommandBus2 = spy(new SimpleCommandBus());
        clusterName = "test-" + new Random().nextInt(Integer.MAX_VALUE);
        serializer = spy(new XStreamSerializer());
        connector1 = new JGroupsConnector(channel1, clusterName, mockCommandBus1, serializer);
        connector2 = new JGroupsConnector(channel2, clusterName, mockCommandBus2, serializer);
        gossipRouter = new GossipRouter(12001, "127.0.0.1");
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        mockApplicationContext = mock(ApplicationContext.class);
        mockChannel = mock(JChannel.class);
        mockConnector = mock(JGroupsConnector.class);
        when(mockApplicationContext.getBean(Serializer.class)).thenReturn(new XStreamSerializer());
        whenNew(JChannel.class).withParameterTypes(String.class).withArguments(isA(String.class))
                .thenReturn(mockChannel);
        whenNew(JGroupsConnector.class)
                .withArguments(isA(JChannel.class), isA(String.class), isA(CommandBus.class), isA(Serializer.class))
                .thenReturn(mockConnector);
View Full Code Here

    @Test
    public void testCreateWithSpecifiedValues() throws Exception {
        testSubject.setClusterName("ClusterName");
        testSubject.setConfiguration("custom.xml");
        testSubject.setLoadFactor(200);
        XStreamSerializer serializer = new XStreamSerializer();
        testSubject.setSerializer(serializer);
        SimpleCommandBus localSegment = new SimpleCommandBus();
        testSubject.setLocalSegment(localSegment);
        testSubject.setChannelName("localname");
        testSubject.afterPropertiesSet();
View Full Code Here

TOP

Related Classes of org.axonframework.serializer.xml.XStreamSerializer

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.