/* */
/* */ public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup group)
/* */ throws DeploymentException
/* */ {
/* 149 */ List deployments = group.getDeployments();
/* 150 */ ServiceDeployment serviceDeployment = new ServiceDeployment();
/* 151 */ List componentServices = new ArrayList();
/* 152 */ List serviceDefintion = group.getServices();
/* */
/* 154 */ serviceDeployment.setName(unit.getName() + " services");
/* */
/* 156 */ for (ServiceMetaData data : serviceDefintion)
/* */ {
/* 158 */ componentServices.add(data);
/* */ }
/* */
/* 161 */ ComponentType type = null;
/* 162 */ for (Iterator i$ = deployments.iterator(); i$.hasNext(); ) { data = (ManagedConnectionFactoryDeploymentMetaData)i$.next();
/* */
/* 165 */ if (type == null)
/* */ {
/* 167 */ if ((data instanceof LocalDataSourceDeploymentMetaData))
/* 168 */ type = KnownComponentTypes.DataSourceTypes.LocalTx.getType();
/* 169 */ if ((data instanceof NoTxDataSourceDeploymentMetaData))
/* 170 */ type = KnownComponentTypes.DataSourceTypes.NoTx.getType();
/* 171 */ if ((data instanceof XADataSourceDeploymentMetaData)) {
/* 172 */ type = KnownComponentTypes.DataSourceTypes.XA.getType();
/* */ }
/* */ }
/* 175 */ for (AbstractBuilder builder : this.builders)
/* */ {
/* 177 */ ServiceMetaData candidate = builder.build(data);
/* */
/* 179 */ if (candidate != null)
/* */ {
/* 181 */ componentServices.add(candidate);
/* */ }
/* */ }
/* */ }
/* */ ManagedConnectionFactoryDeploymentMetaData data;
/* 186 */ serviceDeployment.setServices(componentServices);
/* 187 */ unit.addAttachment(ServiceDeployment.class, serviceDeployment);
/* 188 */ if (type != null)
/* 189 */ unit.addAttachment(ComponentType.class, type);
/* */ }