Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-823

Cope with badly written ObjectFactorys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • JNDI
    • None

    Description

      I keep coming across badly written ObjectFactory classes which assume that the first parameter is a Reference and therefore always cast to this without doing an instance of check first. These are badly behaved and crummy, but it seems quite pervasive in the world of JNDI, which might have something to do with the lack of understanding people have of JNDI given it is poorly documented.

      So far I've managed to get the poorly written ObjectFactories fixed, but this is such a common pattern I've raised a spec bug in the OSGi alliance to provide a way to "opt-out" of the phase that causes most problems. I'm raising this to prototype a fix.

      I'm proposing (well about to commit) a fix that means an ObjectFactory with a property called aries.object.factory.requires.refernece set to Boolean.TRUE will not be called if the first parameter is not a Reference.

      Attachments

        Activity

          People

            not Alasdair Nottingham
            not Alasdair Nottingham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: