Guest User

Untitled

a guest
Sep 15th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. def doWithSpring = {
  2. def config = application.config.grails.plugin.routing.jms
  3.  
  4. // Transaction policy needed for transacting the Camel Routes - can be used in your XxxRoute.groovy class
  5. propagationRequired(org.apache.camel.spring.spi.SpringTransactionPolicy) {
  6. transactionManager = ref('transactionManager')
  7. }
  8.  
  9. /*
  10. * In your project that includes this plugin add the following in your Config.groovy file for each environment as appropriate:
  11. * grails.plugin.routing.jms.aq.database.url = "jdbc:oracle:thin:@{database-host}:{port}:{database.instance}"
  12. * grails.plugin.routing.jms.aq.database.username = "{username}"
  13. * grails.plugin.routing.jms.aq.database.password = "{password}"
  14. *
  15. * REMEMBER to include the appropriate Oracle driver jar either via a dependency or by placing them in your lib folder of the project.
  16. * i.e. ojdbc16-11.2.0.3.0.jar
  17. */
  18. QueueConnectionFactory connectionFactoryOracleAQQueue = AQjmsFactory.getQueueConnectionFactory(config.aq.database.url, null)
  19.  
  20. aqQueueConnectionFactory(org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter) {
  21. targetConnectionFactory = connectionFactoryOracleAQQueue
  22. username = config.aq.database.username
  23. password= config.aq.database.password
  24. }
  25.  
  26. oracleQueue(org.apache.camel.component.jms.JmsComponent) {
  27. connectionFactory = aqQueueConnectionFactory
  28. transacted = 'true'
  29. }
  30.  
  31. // original component
  32. activemq(org.apache.activemq.camel.component.ActiveMQComponent) {
  33. brokerURL = config.brokerURL ?: 'vm://LocalBroker'
  34. }
  35. }
Add Comment
Please, Sign In to add comment