Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1260

Add ability to alias OpenEJB components in JNDI

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 3.1.x
    • configuration
    • 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");

      Attachments

        1. patch.txt
          4 kB
          Matthew B. Jones

        Activity

          People

            Unassigned Unassigned
            matthewbjones Matthew B. Jones
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: