[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 12:46:28 EST 2007


"scott.stark at jboss.org" wrote : "adrian at jboss.org" wrote : "bill.burke at jboss.com" wrote : Good cleanup ideas.  I always avoided using DeploymentUnit interface for finding attachments as I didn't like how it merged parent and child attachment data in the lookup.
  |   | 
  |   | That's a bug we identified a while ago.
  |   | It should only be doing the merge for components.
  | What was that discussion? If I'm going to be updating this I want to get it all changed for 2.0.0.Beta3.
  | 

It was before Christmas sometime.

I looks like it might already have been fixed?


  | AbstractDeploymentUnit:
  |    public Map<String, Object> getAttachments()
  |    {
  |       DeploymentContext parent = deploymentContext.getParent();
  | 
  |       // HERE Don't look at the parent when we are not a component
  |       if (deploymentContext.isComponent() == false)
  |          parent = null;
  | 
  |       HashMap<String, Object> result = new HashMap<String, Object>();
  |       if (parent != null)
  |          result.putAll(parent.getTransientAttachments().getAttachments());
  | 

Or maybe the fix missed part of the api?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021232#4021232

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021232



More information about the jboss-dev-forums mailing list