[jboss-dev-forums] [Design of JCA on JBoss] - DeploymentInfo/Template MCF
weston.price@jboss.com
do-not-reply at jboss.com
Wed Oct 10 10:47:43 EDT 2007
In working on this, I just want to make sure there is something I am not missing.
Currently what I consider to be a simple mapping from the DeploymentTemplateInfo to the ManagedConnectionFactoryDeploymentGroup (the group of JCA deployments) involves simply reading the available managed properties and mapping them onto the relevant JCA MetaData
Example:
|
| public ManagedConnectionFactoryDeploymentGroup buildDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group, DeploymentTemplateInfo info)
| {
|
| Map<String, ManagedProperty> props = info.getProperties();
| ManagedConnectionFactoryDeploymentMetaData md = new ManagedConnectionFactoryDeploymentMetaData();
|
| Set<String> names = props.keySet();
|
| for (String string : names)
| {
| ManagedProperty prop = props.get(string);
|
| if(prop.getName().equals("jndi-name"))
| {
| md.setJndiName((String)prop.getValue());
| }
| }
|
| group.addManagedConnectionFactoryDeployment(md);
| return group;
|
|
What I am wondering is if this is something I should be doing, or are we working towards an automapping of the TemplateInfo to the relevant MetaData based on the annotation model. I am fine with doing this as described above and then refactoring later, but it would seem that this should be a core component that handles this for the deployer/metadata developer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093527#4093527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093527
More information about the jboss-dev-forums
mailing list