"[EMAIL PROTECTED]" wrote : I think what I really want to do is to just provide 
a way to specify the various I/O beans, because that's all my 
(incorrectly-named) "deployments" really are for the most part.  So I guess 
what I need to do is to figure out a way to "merge" in my metadata with the 
regular BeanMetaData - should just be a question of some JAXB research I hope...
You already done that. ;-)

e.g. you now have

  | <dml:deployment>
  |   <dml:io someattrib="foobar" />
  |   <dml:remote otherattrib="barfoo" />
  | </dml:deployment>
  | 

And you can simply do this

  | <mc:deployment>
  |   <dml:deployment>
  |     <dml:io someattrib="foobar" />
  |     <dml:remote otherattrib="barfoo" />
  |   </dml:deployment>
  | </mc:deployment>
  | 

But I would still leave your deployer.
And I would now add some generic deployer that takes custom metadata which 
implements BeanMetaDataFactory and turns it into component beans

  | public class CustomMD2BMD<T extends BeanMetaDataFactory> extends 
SomeHandyHelperDeployer
  | {
  |    public CustomMD2BMD(Class<T> metadata)
  |    {
  |        super(metadata);
  |    }
  | 
  |    public void deploy(DeploymentUnit unit, T deployment)
  |    {
  |        List<BMD> beans = deployment.getBeans();
  |        for(BMD bean : beans)
  |           putBMDtoComponent(bean);
  |    }
  |    
  |    ...
  | }
  | 

And then adding such deployer would be 1line of xml/code:

  | <bean name="DML2BMD" class="CustomMD2BMD">
  |  <constructor><parameter>io.DeploymentMetaData</parameter></constructor>
  | </bean>
  | 
Or/and I might even do similar shortcut xml element (as I did with SRD). 

Simple enough now? ;-)

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

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

Reply via email to