This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public BasicCacheContainer basicCacheContainer() throws Throwable { | |
| GlobalConfiguration glob = new GlobalConfigurationBuilder().nonClusteredDefault().build(); | |
| Configuration loc = new ConfigurationBuilder() | |
| .transaction().transactionMode(TransactionMode.TRANSACTIONAL) | |
| .transactionManagerLookup(new TransactionManagerLookup() { | |
| @Override | |
| public TransactionManager getTransactionManager() throws Exception { | |
| return jtaTransactionManager.getTransactionManager(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public AtomikosDataSourceBean atomikosDataSourceBean() throws Exception { | |
| EmbeddedXADataSource ds = new EmbeddedXADataSource(); | |
| ds.setCreateDatabase("create"); | |
| ds.setDatabaseName("target/testdb"); | |
| ds.setUser(""); | |
| ds.setPassword(""); | |
| AtomikosDataSourceBean xaDataSource = new AtomikosDataSourceBean(); | |
| xaDataSource.setXaDataSource(ds); | |
| xaDataSource.setUniqueResourceName("xaDerby"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <bean id="userTransaction" class="com.atomikos.icatch.jta.UserTransactionImp"/> | |
| <bean id="userTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager"/> | |
| <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"> | |
| <constructor-arg ref="userTransaction"/> | |
| <constructor-arg ref="userTransactionManager"/> | |
| </bean> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <route> | |
| <from uri="infinispan://localhost?cacheContainer=#cacheContainer&caseName=orders&eventTypes=CACHE_ENTRY_CREATED"/> | |
| <filter> | |
| <simple>${out.header.CamelInfinispanIsPre} == true</simple> | |
| <to uri="log:com.mycompany.order?showHeaders=true"/> | |
| </filter> | |
| </route> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <route> | |
| <from uri="direct:orderCache"/> | |
| <setHeader headerName="CamelInfinispanKey"> | |
| <simple>${in.header.orderId}</simple> | |
| </setHeader> | |
| <setHeader headerName="CamelInfinispanValue"> | |
| <simple>${in.header.orderTotal}</simple> | |
| </setHeader> | |
| <setHeader headerName="CamelInfinispanOperation"> | |
| <simple>CamelInfinispanOperationPut</simple> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <route> | |
| <from uri="restlet:/persons?restletMethod=POST"/> | |
| <transacted/> | |
| <!-- PERSIST TO DB --> | |
| <to uri="sql:insert into person(firstName, lastName) values(:#firstName,:#lastName)?dataSource=#dataSource"/> | |
| <!-- DAMN EXCEPTION THROWER--> | |
| <filter> | |
| <simple>${in.header.lastName} == "damn"</simple> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> | |
| <route startupOrder="1"> | |
| <from uri="redis://localhost:6379?command=SUBSCRIBE&channels=testChannel"/> | |
| <to uri="mock:result"/> | |
| </route> | |
| <route startupOrder="2"> | |
| <from uri="direct:start"/> | |
| <setHeader headerName="CamelRedis.Command"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <bean id="idempotentRepository" class="org.apache.camel.component.redis.processor.idempotent.RedisIdempotentRepository"> | |
| <constructor-arg value="test-repo"/> | |
| </bean> | |
| <route> | |
| <from uri="direct:start"/> | |
| <idempotentConsumer messageIdRepositoryRef="idempotentRepository"> | |
| <simple>${in.body.id}</simple> | |
| <to uri="mock:result"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <route> | |
| <from uri="direct:start"/> | |
| <setHeader headerName="CamelRedis.Command"> | |
| <constant>SET</constant> | |
| </setHeader> | |
| <setHeader headerName="CamelRedis.Key"> | |
| <constant>keyOne</constant> | |
| </setHeader> | |
| <setHeader headerName="CamelRedis.Value"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <route> | |
| <from uri="timer://jmxMonitoringTimer?fixedRate=true&period=10000"/> | |
| <process ref="jmxMetricReader" /> | |
| <camel:to uri="aws-cw://www.livephotostream.com/context?accessKey=XXX&secretKey=XXX"/> | |
| </route> |