Add ability to alias OpenEJB components in JNDI
-----------------------------------------------

                 Key: OPENEJB-1260
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1260
             Project: OpenEJB
          Issue Type: New Feature
    Affects Versions: 3.1.3
            Reporter: Matthew B. Jones
            Priority: Minor
             Fix For: 3.1.3


The desire behavior is to be able to bind an OpenEJB Resource to one or more 
additional names in JNDI. There is a direct benefit for me to have this 
feature. I'm currently in the process of integrating JBoss Cache into OpenEJB, 
and JBoss places its cache manager at "java:CacheManager". To avoid having two 
different sets of JNDI locations (in persistence.xml, for lookups in beans, 
etc.) it is ideal to get OpenEJB to allow the "java:CacheManager" in its JNDI 
to point to the real Resource at "openejb:/Resource/..."

Example:
p.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");
p.put("myCacheManager", 
"new://Resource?type=CacheManager&provider=com.foo.bar");
p.put("myCacheManager.alias", "java:CacheManager");

It may be desirable to have more than one alias for a Resource, so the alias 
property can be a comma-separated list:
p.put("myCacheManager.alias", "java:CacheManager,java:SomeOtherAlias");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to