integration-patterns

joinTransaction has been called on a resource-local EntityManager in ApacheCamel

﹥>﹥吖頭↗ 提交于 2020-01-16 11:20:29
问题 I am new to apache camel and I am testing camel-jpa to poll from table and display records Following is main class EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("LoanServicePU"); CamelContext camelContext = new DefaultCamelContext(); JpaComponent jpa = new JpaComponent(); jpa.setEntityManagerFactory(entityManagerFactory); JpaTransactionManager myTM=new JpaTransactionManager(); myTM.setEntityManagerFactory(entityManagerFactory); jpa.setTransactionManager(

How to “copy” a JMS message to 2 destinations?

允我心安 提交于 2019-12-08 09:12:55
问题 I have a requirement that a single JMS message sent by a client must be delivered reliably (exactly-once) to two systems. These 2 systems are not HA-enabled, so the best suggestion that I came up with is to: create single queue where client posts to set up two "intermediate" queues use a custom "DuplicatorMDB" that will read messages from the client queue and post them to two queues within the same transaction. client->JMSDQ->DuplicatorMDB->Q1->MDB->System1 \->Q2->MDB->System2 Is there any