[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Need cleanup of the attachments api
adrian@jboss.org
do-not-reply at jboss.com
Fri Feb 23 13:54:50 EST 2007
In most cases, the Component just overrides one piece of metadata
(and usually it is not an override)
e.g. the MC components "overrides" the BeanMetaData.
I think it would be pretty annoying if the deployer needs to always code
| Blah result = unit.getAttachment(Blah.class);
| if (result == null && unit.isComponent())
| result = unit.getParent().getAtttachment(Blah.class);
|
IIRC. The case where Bill came across it originally was because he got an invocation
of his deployer for every component when he just wanted to do it once
per deployment (it was after the component deployers).
I told him to add a check:
| if (unit.isComponent())
| return;
|
We might want to add better support for deployers that aren't interested in components?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021261#4021261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021261
More information about the jboss-dev-forums
mailing list