You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jcarreira <jc...@gmail.com> on 2006/07/30 04:01:38 UTC
RFE: Make the BrokerFactoryBean use the parent app context
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.
Jason
--
View this message in context: http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5560033
Sent from the ActiveMQ - User forum at Nabble.com.
Re: RFE: Make the BrokerFactoryBean use the parent app context
Posted by James Strachan <ja...@gmail.com>.
Patch applied - thanks!
On 7/31/06, jcarreira <jc...@gmail.com> wrote:
>
> Done: https://issues.apache.org/activemq/browse/AMQ-853
>
>
> Hiram Chirino wrote:
> >
> > Please submit a patch in JIRA:
> > http://activemq.com/site/contributing.html
> >
> >
> > On 7/29/06, jcarreira <jc...@gmail.com> wrote:
> >>
> >>
> >> 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.
> >>
> >> Jason
> >> --
> >> View this message in context:
> >> http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5560033
> >> Sent from the ActiveMQ - User forum at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Regards,
> > Hiram
> >
> > Blog: http://hiramchirino.com
> >
> >
> --
> View this message in context: http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5581058
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/
Re: RFE: Make the BrokerFactoryBean use the parent app context
Posted by jcarreira <jc...@gmail.com>.
Done: https://issues.apache.org/activemq/browse/AMQ-853
Hiram Chirino wrote:
>
> Please submit a patch in JIRA:
> http://activemq.com/site/contributing.html
>
>
> On 7/29/06, jcarreira <jc...@gmail.com> wrote:
>>
>>
>> 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.
>>
>> Jason
>> --
>> View this message in context:
>> http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5560033
>> Sent from the ActiveMQ - User forum at Nabble.com.
>>
>>
>
>
> --
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>
>
--
View this message in context: http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5581058
Sent from the ActiveMQ - User forum at Nabble.com.
Re: RFE: Make the BrokerFactoryBean use the parent app context
Posted by Hiram Chirino <hi...@hiramchirino.com>.
Please submit a patch in JIRA:
http://activemq.com/site/contributing.html
On 7/29/06, jcarreira <jc...@gmail.com> wrote:
>
>
> 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.
>
> Jason
> --
> View this message in context:
> http://www.nabble.com/RFE%3A-Make-the-BrokerFactoryBean-use-the-parent-app-context-tf2022160.html#a5560033
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
Regards,
Hiram
Blog: http://hiramchirino.com