private String autoAssignWsLocation(EnterpriseBeanInfo bean, PortData port, Map<String, String> contextData, StringTemplate template) { contextData.put("ejbDeploymentId", bean.ejbDeploymentId); contextData.put("ejbType", getEjbType(bean.type)); contextData.put("ejbClass", bean.ejbClass); contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1)); contextData.put("ejbName", bean.ejbName); contextData.put("portComponentName", port.getPortName().getLocalPart()); contextData.put("wsdlPort", port.getWsdlPort().getLocalPart()); contextData.put("wsdlService", port.getWsdlService().getLocalPart()); return template.apply(contextData); }
private String formatDeploymentId(EnterpriseBean bean, Map<String, String> contextData, StringTemplate template) { contextData.put("ejbType", bean.getClass().getSimpleName()); contextData.put("ejbClass", bean.getEjbClass()); // we don't have the ejb class object (only the string name) so we have // to extract the simple name from the FQN of the class int simpleNameIdx = bean.getEjbClass().lastIndexOf("."); contextData.put("ejbClass.simpleName", bean.getEjbClass().substring(simpleNameIdx + 1)); contextData.put("ejbName", bean.getEjbName()); return template.apply(contextData); } }
private String autoAssignWsLocation(final EnterpriseBeanInfo bean, final PortData port, final Map<String, String> contextData, final StringTemplate template) { if (bean.properties.containsKey(WS_FORCE_ADDRESS)) { return bean.properties.getProperty(WS_FORCE_ADDRESS); } contextData.put("ejbDeploymentId", bean.ejbDeploymentId); contextData.put("ejbType", getEjbType(bean.type)); contextData.put("ejbClass", bean.ejbClass); contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1)); contextData.put("ejbName", bean.ejbName); contextData.put("portComponentName", port.getPortName().getLocalPart()); contextData.put("wsdlPort", port.getWsdlPort().getLocalPart()); contextData.put("wsdlService", port.getWsdlService().getLocalPart()); return template.apply(contextData); }
private String autoAssignWsLocation(final EnterpriseBeanInfo bean, final PortData port, final Map<String, String> contextData, final StringTemplate template) { if (bean.properties.containsKey(WS_FORCE_ADDRESS)) { return bean.properties.getProperty(WS_FORCE_ADDRESS); } contextData.put("ejbDeploymentId", bean.ejbDeploymentId); contextData.put("ejbType", getEjbType(bean.type)); contextData.put("ejbClass", bean.ejbClass); contextData.put("ejbClass.simpleName", bean.ejbClass.substring(bean.ejbClass.lastIndexOf('.') + 1)); contextData.put("ejbName", bean.ejbName); contextData.put("portComponentName", port.getPortName().getLocalPart()); contextData.put("wsdlPort", port.getWsdlPort().getLocalPart()); contextData.put("wsdlService", port.getWsdlService().getLocalPart()); return template.apply(contextData); }
private String formatDeploymentId(final EnterpriseBean bean, final Map<String, String> contextData, final StringTemplate template) { contextData.put("ejbType", bean.getClass().getSimpleName()); contextData.put("ejbClass", bean.getEjbClass()); // we don't have the ejb class object (only the string name) so we have // to extract the simple name from the FQN of the class final int simpleNameIdx = bean.getEjbClass().lastIndexOf("."); contextData.put("ejbClass.simpleName", bean.getEjbClass().substring(simpleNameIdx + 1)); contextData.put("ejbName", bean.getEjbName()); final String name = template.apply(contextData); if (bean instanceof CompManagedBean) { // avoid conflict in ear between an ejbmodule and a war using the same name return name + System.identityHashCode(bean); } return name; } }
private String formatDeploymentId(final EnterpriseBean bean, final Map<String, String> contextData, final StringTemplate template) { contextData.put("ejbType", bean.getClass().getSimpleName()); contextData.put("ejbClass", bean.getEjbClass()); // we don't have the ejb class object (only the string name) so we have // to extract the simple name from the FQN of the class final int simpleNameIdx = bean.getEjbClass().lastIndexOf("."); contextData.put("ejbClass.simpleName", bean.getEjbClass().substring(simpleNameIdx + 1)); contextData.put("ejbName", bean.getEjbName()); final String name = template.apply(contextData); if (bean instanceof CompManagedBean) { // avoid conflict in ear between an ejbmodule and a war using the same name return name + System.identityHashCode(bean); } return name; } }
public String getName(Class interfce, Interface type) { StringTemplate template = templates.get(interfce.getName()); if (template == null) template = templates.get(type.getAnnotationName()); if (template == null) template = templates.get(""); Map<String,String> contextData = new HashMap<String,String>(beanContext); contextData.put("interfaceType", type.getAnnotationName()); contextData.put("interfaceType.annotationName", type.getAnnotationName()); contextData.put("interfaceType.annotationNameLC",type.getAnnotationName().toLowerCase()); contextData.put("interfaceType.xmlName", type.getXmlName()); contextData.put("interfaceType.xmlNameCc", type.getXmlNameCc()); contextData.put("interfaceType.openejbLegacyName", type.getOpenejbLegacy()); contextData.put("interfaceClass", interfce.getName()); contextData.put("interfaceClass.simpleName", interfce.getSimpleName()); contextData.put("interfaceClass.packageName", packageName(interfce)); return template.apply(contextData); } }
public String getName(final Class interfce, final String key, final Interface type) { Map<String, StringTemplate> template = templates.get(interfce.getName()); if (template == null) { template = templates.get(type.getAnnotationName()); } if (template == null) { template = templates.get(""); } final Map<String, String> contextData = new HashMap<String, String>(beanContext); contextData.put("interfaceType", type.getAnnotationName()); contextData.put("interfaceType.annotationName", type.getAnnotationName()); contextData.put("interfaceType.annotationNameLC", type.getAnnotationName().toLowerCase()); contextData.put("interfaceType.xmlName", type.getXmlName()); contextData.put("interfaceType.xmlNameCc", type.getXmlNameCc()); contextData.put("interfaceType.openejbLegacyName", type.getOpenejbLegacy()); contextData.put("interfaceClass", interfce.getName()); contextData.put("interfaceClass.simpleName", interfce.getSimpleName()); contextData.put("interfaceClass.packageName", packageName(interfce)); StringTemplate stringTemplate = null; if (template.containsKey(key)) { stringTemplate = template.get(key); } else { stringTemplate = template.get(DEFAULT_NAME_KEY); } if (stringTemplate == null) { stringTemplate = template.values().iterator().next(); } return stringTemplate.apply(contextData); }
public String getName(final Class interfce, final String key, final Interface type) { Map<String, StringTemplate> template = templates.get(interfce.getName()); if (template == null) { template = templates.get(type.getAnnotationName()); } if (template == null) { template = templates.get(""); } final Map<String, String> contextData = new HashMap<String, String>(beanContext); contextData.put("interfaceType", type.getAnnotationName()); contextData.put("interfaceType.annotationName", type.getAnnotationName()); contextData.put("interfaceType.annotationNameLC", type.getAnnotationName().toLowerCase()); contextData.put("interfaceType.xmlName", type.getXmlName()); contextData.put("interfaceType.xmlNameCc", type.getXmlNameCc()); contextData.put("interfaceType.openejbLegacyName", type.getOpenejbLegacy()); contextData.put("interfaceClass", interfce.getName()); contextData.put("interfaceClass.simpleName", interfce.getSimpleName()); contextData.put("interfaceClass.packageName", packageName(interfce)); StringTemplate stringTemplate = null; if (template.containsKey(key)) { stringTemplate = template.get(key); } else { stringTemplate = template.get(DEFAULT_NAME_KEY); } if (stringTemplate == null) { stringTemplate = template.values().iterator().next(); } return stringTemplate.apply(contextData); }
map.put("host", ip); map.put("bind", ip); String uriString = discoveryUriFormat.apply(map); try { uri = new URI(uriString);
final String uriString = this.discoveryUriFormat.apply(map); try { this.serviceUri = new URI(uriString);