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


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

        

Reply via email to