/** * When the config doesn't exist for a given name adds the value when not null * * @param name the name of the config property * @param value the value to add */ void checkActivationConfig(String name, String value) { if (value != null && properties.containsKey(name) == false) { org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData md = new org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData(); ActivationConfigPropertyMetaData metaData = new ActivationConfigPropertyMetaData(md); md.setName(name); md.setValue(value); properties.put(name, metaData); } } }
protected void addActivationSpecProperty(Map<String, ActivationConfigPropertyMetaData> result, ActivationConfigProperty property) { if (!property.propertyName().equals("messagingType")) { ActivationConfigPropertyMetaData metaData = new ActivationConfigPropertyMetaData(); metaData.setName(property.propertyName()); metaData.setValue(property.propertyValue()); result.put(property.propertyName(), metaData); } }
throw new DeploymentException("activation-config-property '" + name + "' is not a valid java identifier"); md.setName(name); md.setValue(value); if (properties.containsKey(metaData.getName()) == false) properties.put(metaData.getName(), metaData); org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData(); acpmd.setActivationConfigPropertyName("destination"); acpmd.setValue(jndiName); ActivationConfigPropertyMetaData wrapper = new ActivationConfigPropertyMetaData(acpmd); properties.put("destination", wrapper);
@Override public JBossConsumerBeanMetaData create(Class<?> beanClass) { Consumer annotation = finder.getAnnotation(beanClass, Consumer.class); if(annotation == null) return null; JBossConsumerBeanMetaData metaData = new JBossConsumerBeanMetaData(); metaData.setEjbClass(beanClass.getName()); if(annotation.name().length() > 0) metaData.setEjbName(annotation.name()); else metaData.setEjbName(beanClass.getSimpleName()); ActivationConfigProperty[] props = annotation.activationConfig(); ActivationConfigMetaData config = new ActivationConfigMetaData(); ActivationConfigPropertiesMetaData configProps = new ActivationConfigPropertiesMetaData(); config.setActivationConfigProperties(configProps); for(ActivationConfigProperty prop : props) { ActivationConfigPropertyMetaData acp = new ActivationConfigPropertyMetaData(); acp.setActivationConfigPropertyName(prop.propertyName()); acp.setValue(prop.propertyValue()); configProps.add(acp); } metaData.setActivationConfig(config); return metaData; }
acp.setValue(prop.propertyValue()); configProps.add(acp);
acp.setValue(prop.propertyValue()); configProps.add(acp);
acp.setValue(prop.propertyValue()); configProps.add(acp);