Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
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");