[ 
https://issues.apache.org/jira/browse/OPENEJB-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Matthew B. Jones updated OPENEJB-1260:
--------------------------------------

    Attachment: patch.txt

I've posted the patch.txt here for the implementation of this feature. I've 
tested locally with my current project and I have not created an JUnit tests 
that test this feature yet.

Also included in this patch is a potential bug-fix in logUnusedProperties() 
that may potentially break out of a loop instead of skipping over the property 
as originally intended by dblevins.

> 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
>
>         Attachments: patch.txt
>
>
> 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