[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Annotation Tests in deployers-vfs

adrian@jboss.org do-not-reply at jboss.com
Fri May 30 12:42:37 EDT 2008


"alesj" wrote : "adrian at jboss.org" wrote : 
  |   | In deploy direction it's easy --> component by that name already exists.
  |   | How do you determine that on undeploy w/o any additional info?
  |   | Attaching additional flag into attachments for that component name?
  | 
  | Simple Set theory :-)
  | 
  | Created Annotation components = All Possible Annotation Components - Components created via metadata
  | 
  | You can't use "does it already exist" in a symmetrical way on the undeploy, 
  | but you can use "does it still exist if I remove the metadata components first".
  | 
  | In fact for the component deployers all you're really interested in is coming up
  | with a single set of component names to remove.
  | 
  | So you could in principle change (optimize) the component deployers undeploy protocol
  | to just be something like:
  | 
  | 
  |   | Set names = new HashSet();
  |   | names.addAll(metadataNames);
  |   | names.addAll(annotationNames);
  |   | removeComponents(names);
  |   | 
  | 
  | But that's a bit restrictive in the unlikely case that the component deployer/visitor
  | wants to do something else besides removing the component. ;-)

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

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



More information about the jboss-dev-forums mailing list