[ https://issues.apache.org/activemq/browse/AMQ-853?page=all ]
james strachan resolved AMQ-853. -------------------------------- Resolution: Fixed Patch applied with thanks. With more complex patches its better to actually supply a patch file - see the [creating patches|http://incubator.apache.org/activemq/contributing.html]. This patch was so simple I think I've not messed it up :) > Make BrokerFactoryBean use pre-existing app context as parent > ------------------------------------------------------------- > > Key: AMQ-853 > URL: https://issues.apache.org/activemq/browse/AMQ-853 > Project: ActiveMQ > Issue Type: Improvement > Components: Broker > Affects Versions: 4.1 > Reporter: Jason Carreira > Fix For: 4.1 > > Original Estimate: 15 minutes > Remaining Estimate: 15 minutes > > I've made a local enhancement to the BrokerFactoryBean to make it where your > activeMQ XML configuration files refer to beans configured in your Spring > application context. Basically I just made the BrokerFactoryBean implement > ApplicationContextAware so the ApplicationContext will be set, then in > afterPropertiesSet() when it's creating the context for the config resource > location, it does this: > context = new ResourceXmlApplicationContext(config, applicationContext) > passing in the Spring application context as the parent application context > for the ResourceXmlApplicationContext. > I did this for myself so I could use the same DataSource as the backing > DataSource for JDBC persistence. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira