Package org.switchyard.quickstarts.camel.jpa.binding.domain

Examples of org.switchyard.quickstarts.camel.jpa.binding.domain.Greet


        final LinkedBlockingQueue<Exchange> receivedMessages = service.getMessages();
        assertNotNull(receivedMessages);

        final Exchange recievedExchange = receivedMessages.iterator().next();
        Greet receiver = recievedExchange.getMessage().getContent(Greet.class);

        assertEquals(SENDER, receiver.getSender());
        assertEquals(RECEIVER, receiver.getReceiver());
    }
View Full Code Here


    @Reference("StoreReference")
    private StoreService _store;

    @Override
    public void execute() {
        Greet greet = createRandomGreet();
        _logger.info("Sending " + greet + " to JPA store");
        _store.storeGreeting(greet);
    }
View Full Code Here

    }

    private Greet createRandomGreet() {
        Random random = new Random(System.currentTimeMillis());

        Greet event = new Greet();
        event.setReceiver(NAMES[random.nextInt(NAMES.length)]);
        event.setSender(NAMES[random.nextInt(NAMES.length)]);
        event.setCreatedAt(Calendar.getInstance());
        return event;
    }
View Full Code Here

    @Test
    public void storeEntity() throws Exception {
        Calendar createdAt = Calendar.getInstance();

        Greet event = new Greet();
        event.setReceiver(RECEIVER);
        event.setSender(SENDER);
        event.setCreatedAt(createdAt);

        _testKit.newInvoker("StoreReference").sendInOnly(event);

        PreparedStatement statement = connection.prepareStatement("select createdAt, sender, receiver from events");
        ResultSet resultSet = statement.executeQuery();
View Full Code Here

TOP

Related Classes of org.switchyard.quickstarts.camel.jpa.binding.domain.Greet

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.