[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 11:28:38 EST 2007


"scott.stark at jboss.org" wrote : 
  | I suggest the following change to cleanup the usage and allow for true transient/non-managed attachments:
  | 
  | 1. Remove the Attachments interface from DeploymentUnit.
  | 2. Mirror the Attachments api in DeploymentUnit with an enum that indicates what bucket is being accessed. The non-enum version of getAttachment follows the existing order of accessing the PredeterminedManagedObjects, TransientManagedObjects and TransientAttachments. The non-enum version of addAttachment would populate the TransientManagedObjects contents.
  | 3. To populate a non-managed attachment, one would have to use the call that takes the enum targetting the TransientAttachments list.
  | 4. Drop the getTransientManagedObjects access from DeploymentUnit.
  | 

I don't see the need for the enum?
Better would be like the DeploymentContext, i.e.
have a getTransientManagedObjects() and getTransientAttachments();

You can leave the old methods in place (deprecate them?)
and populate the TransientManagedObjects like you suggest.

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

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



More information about the jboss-dev-forums mailing list