Package org.springframework.orm.jpa

Examples of org.springframework.orm.jpa.JpaTemplate


        this.transactionTemplate = transactionTemplate;
    }

    public static JpaMessageIdRepository jpaMessageIdRepository(String persistenceUnit, String processorName) {
        EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(persistenceUnit);
        return jpaMessageIdRepository(new JpaTemplate(entityManagerFactory), processorName);
    }
View Full Code Here


        overdueEndpoint = resolveMandatoryEndpoint("mock:overdue", MockEndpoint.class);
        overdueEndpoint.setDefaulResultWaitMillis(8000);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        JpaTemplate jpaTemplate = getMandatoryBean(JpaTemplate.class, "jpaTemplate");
        TransactionTemplate transactionTemplate = getMandatoryBean(TransactionTemplate.class, "transactionTemplate");

        // START SNIPPET: example
        return new ProcessBuilder(jpaTemplate, transactionTemplate) {
            public void configure() throws Exception {
View Full Code Here

    /**
     * Creates a new implementation from the given JPA factory
     */
    public static JpaTemplateTransactionStrategy newInstance(EntityManagerFactory emf) {
        JpaTemplate template = new JpaTemplate(emf);
        return newInstance(emf, template);
    }
View Full Code Here

    }

    // Implementation methods
    // -------------------------------------------------------------------------
    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

    /**
     * Creates a new implementation from the given JPA factory
     */
    public static JpaTemplateTransactionStrategy newInstance(EntityManagerFactory emf) {
        JpaTemplate template = new JpaTemplate(emf);
        return newInstance(emf, template);
    }
View Full Code Here

        this.transactionTemplate = transactionTemplate;
    }

    public static JpaMessageIdRepository jpaMessageIdRepository(String persistenceUnit, String processorName) {
        EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(persistenceUnit);
        return jpaMessageIdRepository(new JpaTemplate(entityManagerFactory), processorName);
    }
View Full Code Here

    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory property");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

        overdueEndpoint = getMockEndpoint("mock:overdue");
        overdueEndpoint.setResultWaitTime(8000);
    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        JpaTemplate jpaTemplate = getMandatoryBean(JpaTemplate.class, "jpaTemplate");
        TransactionTemplate transactionTemplate = getMandatoryBean(TransactionTemplate.class, "transactionTemplate");

        // START SNIPPET: example
        return new ProcessBuilder(jpaTemplate, transactionTemplate) {
            public void configure() throws Exception {
View Full Code Here

    protected void validate() {
        ObjectHelper.notNull(getEntityManagerFactory(), "entityManagerFactory");
    }

    protected JpaTemplate createTemplate() {
        return new JpaTemplate(getEntityManagerFactory());
    }
View Full Code Here

        consumer = endpoint.createConsumer(new Processor() {
            public void process(Exchange e) {
                LOG.info("Received exchange: " + e.getIn());
                receivedExchange = e;
                // should have a JpaTemplate
                JpaTemplate template = e.getIn().getHeader(JpaConstants.JPA_TEMPLATE, JpaTemplate.class);
                assertNotNull("Should have a JpaTemplate as header", template);
                latch.countDown();
            }
        });
        consumer.start();
View Full Code Here

TOP

Related Classes of org.springframework.orm.jpa.JpaTemplate

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.