First, thanks for a great project and I have a feature request.
It seems like the default JBoss JNDI name is: {beanName}/{lowercase
annotation type} (ie local or remote). Hence I have an application
full of @EJB mapped-names such as: "MyStatelessBean/local". From the
document
http://openejb.apache.org/3.0/jndi-names.html.
It appears we can only use interfaceType.annotationName to get Local
or Remote (ie uppercase). Would it be possible to add:
interfaceType.annotationNameLowerCase to the JNDI Name formatting
options?
It could go in org.apache.openejb.assembler.classic.JndiBuilder:
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>();
contextData.put("moduleId", deploymentInfo.getModuleID());
contextData.put("ejbType",
deploymentInfo.getComponentType().name());
contextData.put("ejbClass",
deploymentInfo.getBeanClass().getName());
contextData.put("ejbClass.simpleName",
deploymentInfo.getBeanClass().getSimpleName());
contextData.put("ejbClass.packageName",
packageName(deploymentInfo.getBeanClass()));
contextData.put("ejbName", deploymentInfo.getEjbName());
contextData.put("deploymentId",
deploymentInfo.getDeploymentID().toString());
contextData.put("interfaceType", type.getAnnotationName());
contextData.put("interfaceType.annotationName",
type.getAnnotationName());
//***********************************************
//
contextData.put("interfaceType.annotationNameLC",
type.getAnnotationName().toLower());
//
//***********************************************
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);
}