Tried to get this working in 2.3.8.
create-route doesn't work, so I added MyMessageRoute to grails-app/routes, but after starting app and sending test message, route is never triggered. Checked camelContext.getRoutes(), no routes registered! So I registered manually in BootStrap...
def init = { servletContext ->
def _camelCtx =
grailsApplication.mainContext.getBean('camelContext')
_camelCtx.addRoutes(new MyMessageRoute())
Now it works!
Looking at plugin file, appears route classes should auto register, but application.routeClasses is empty list just before routeClasses.each { routeClass ->, I suspect this is the problem, but how is routeClasses populated?
My BuildConfig
dependencies {
//for jms issue
compile('org.springframework:spring-jms:3.2.6.RELEASE'){
export = false
}
//from routing-jms, could not get that plugin to work, had to manually add dependencies
runtime('commons-logging:commons-logging:1.1.1')
runtime('org.apache.activemq:activemq-core:5.7.0')
runtime('org.apache.activemq:activemq-camel:5.9.0')
runtime('org.apache.activemq:activemq-pool:5.9.0')
runtime('org.apache.camel:camel-jms:2.13.0') {
excludes 'spring-aop', 'spring-beans', 'spring-core', 'spring-expression', 'spring-asm', 'spring-tx', 'spring-context'
}
}
plugins {
build ":tomcat:7.0.52.1"
compile ":scaffolding:2.0.2"
compile ":routing:1.3.2"
}
Tried to get this working in 2.3.8.
create-routedoesn't work, so I addedMyMessageRoutetograils-app/routes, but after starting app and sending test message, route is never triggered. CheckedcamelContext.getRoutes(), no routes registered! So I registered manually inBootStrap...Now it works!
Looking at plugin file, appears route classes should auto register, but
application.routeClassesis empty list just beforerouteClasses.each { routeClass ->, I suspect this is the problem, but how isrouteClassespopulated?My BuildConfig
dependencies { //for jms issue compile('org.springframework:spring-jms:3.2.6.RELEASE'){ export = false } //from routing-jms, could not get that plugin to work, had to manually add dependencies runtime('commons-logging:commons-logging:1.1.1') runtime('org.apache.activemq:activemq-core:5.7.0') runtime('org.apache.activemq:activemq-camel:5.9.0') runtime('org.apache.activemq:activemq-pool:5.9.0') runtime('org.apache.camel:camel-jms:2.13.0') { excludes 'spring-aop', 'spring-beans', 'spring-core', 'spring-expression', 'spring-asm', 'spring-tx', 'spring-context' } } plugins { build ":tomcat:7.0.52.1" compile ":scaffolding:2.0.2" compile ":routing:1.3.2" }