"alesj" wrote : 
  | 
  | Your #3 deployer is not a component deployer.
  | 
That's correct.

"alesj" wrote : 
  | Your #2 puts attachment into component,
  | hence it's only component deployers that can see that.
  | 

Any specific reason for this special treatment? Because after all that is a 
simple attachment (and not a component) and hence i was considering that it 
would be visible to non-component deployers.

"alesj" wrote : 
  | Component deployers should mostly consume attachments
  | not creating them - hence the name "component". ;-)
And i thought the name "component" was because they work on components rather 
than what output they generate :)

So would that mean, the attachment generated by a component deployer is of no 
pratical use to non-component deployers?

So would this be a clean way of doing things in a component deployer:


  | public void deploy(DeploymentUnit unit) throws DeploymentException
  |    {
  |       logger.info("Deploying unit : " + unit);
  | 
  |     // Am i deploying a component?
  |     if (unit.isComponent())
  |     {
  |             // yes, i am deploying a component
  |             ...
  |             // should my attachments be visible to non-component deployers?
  |             if (shouldMyAttachmentsBeVisibleToAll())
  |             {
  |                     // should be visible to all, so add to parent
  |                     
unit.getParent().addAttachment(something,someotherthing);
  |             } 
  |             else
  |             {
  |                     // only to component deployers
  |                     unit.addAttachment(something,someotherthing);
  |             }               
  | 
  |     }
  | 
  |    }



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

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215160
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to