[activemq-dev] Abstract Beans and JCAContainer fix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[activemq-dev] Abstract Beans and JCAContainer fix

Patrick Burleson
I wanted to bring some attention back to the following issue:

http://jira.logicblaze.com/jira/browse/AMQ-206

I've posted a patch there that fixes the problem at least in our use cases.

The problem being that JCAContainer blindly calls
BeanFactory.getBean(name) for every bean in the factory without
checking to see if that bean has been declared abstract or not. This
causes much pain if you do use abstract beans.

I've changed the code to check the bean definition to see if it is
declared Abstract, and if so, don't try and get a reference to it.

There still is probably a cleaner way to deal with the problem, but
this change would probably at least get things working for everyone.

For now we're running a patched version of 3.1 at head. It would be
nice to not have to do that for long.

Thanks,
Patrick
Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Abstract Beans and JCAContainer fix

jstrachan

On 7 Jul 2005, at 16:32, Patrick Burleson wrote:
> I wanted to bring some attention back to the following issue:
>
> http://jira.logicblaze.com/jira/browse/AMQ-206
>
> I've posted a patch there that fixes the problem at least in our  
> use cases.

Sorry we'd missed that. I wish there was an easy way to find patches  
in JIRA...

> The problem being that JCAContainer blindly calls
> BeanFactory.getBean(name) for every bean in the factory without
> checking to see if that bean has been declared abstract or not. This
> causes much pain if you do use abstract beans.
>
> I've changed the code to check the bean definition to see if it is
> declared Abstract, and if so, don't try and get a reference to it.
>
> There still is probably a cleaner way to deal with the problem, but
> this change would probably at least get things working for everyone.
>
> For now we're running a patched version of 3.1 at head. It would be
> nice to not have to do that for long.

Many thanks for your patch Patrick! Its applied now in SVN HEAD and  
should make it into our next milestone release and snapshot build.

James
-------
http://radio.weblogs.com/0112098/

Reply | Threaded
Open this post in threaded view
|

Re: [activemq-dev] Abstract Beans and JCAContainer fix

Patrick Burleson
On 7/7/05, [hidden email] <[hidden email]> wrote:

>
> On 7 Jul 2005, at 16:32, Patrick Burleson wrote:
> > I wanted to bring some attention back to the following issue:
> >
> > http://jira.logicblaze.com/jira/browse/AMQ-206
> >
> > I've posted a patch there that fixes the problem at least in our
> > use cases.
>
> Sorry we'd missed that. I wish there was an easy way to find patches
> in JIRA...
>
> > The problem being that JCAContainer blindly calls
> > BeanFactory.getBean(name) for every bean in the factory without
> > checking to see if that bean has been declared abstract or not. This
> > causes much pain if you do use abstract beans.
> >
> > I've changed the code to check the bean definition to see if it is
> > declared Abstract, and if so, don't try and get a reference to it.
> >
> > There still is probably a cleaner way to deal with the problem, but
> > this change would probably at least get things working for everyone.
> >
> > For now we're running a patched version of 3.1 at head. It would be
> > nice to not have to do that for long.
>
> Many thanks for your patch Patrick! Its applied now in SVN HEAD and
> should make it into our next milestone release and snapshot build.
>

Great, thanks! That will make my life much easier since now I don't
have to add my changes into our source control system and deal with
tracking changes from ActiveMQ's SVN HEAD.

Patric