I'll give you some tips on the dev@ list -- should be easy to do with the swizzle-stream apis.

-David

On Aug 4, 2009, at 3:25 PM, Jonathan Gallimore wrote:

I was thinking that as I was adding the new setting to the documentation. I
think that's a neat idea - I'll see if I can code that up.

Jon

On Tue, Aug 4, 2009 at 11:18 PM, David Blevins <[email protected]>wrote:

Maybe we should take all the entries we have and automatically make both ".lc" and ".uc" versions of them? (possibly even ".cc" for camel case). Or maybe smarten up our formatting so that they are only created on demand.




On Aug 4, 2009, at 2:26 PM, Jonathan Gallimore wrote:

Hi Mark,

I've just committed this for you.

Cheers

Jon

On Tue, Aug 4, 2009 at 2:16 PM, Jonathan Gallimore <
[email protected]> wrote:

Hi Mark,

This seems like a good addition to me, I'm more than happy to get this in
(should be able to do it this evening).

Cheers

Jon


On Mon, Aug 3, 2009 at 4:35 PM, Mark Taylor <[email protected]> wrote:

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);
    }






Reply via email to