Uploaded image for project: 'MyFaces CODI'
  1. MyFaces CODI
  2. EXTCDI-71

ClassDeactivator configuration via JNDI

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.9.0
    • Core
    • None

    Description

      Currently it is only possible to set the ClassDeactivator via a system property, but this can be a problem in some scenarios (webapps, test cases, ...). Thus there should be another way to define the ClassDeactivator.

      The problem is that this information needs to be available very early in the application lifecycle, even before CDI initializes, thus it could be solved via a web.xml init parameter. However this introduces another problem: how to get the reference to the ServletContext to get the init parameter in the first place.

      This means we must use some other type of configuration, a custom xml config file or JNDI. Because of the fact that all major containers provide JNDI and it can also be set via web.xml (env-entry), we agreed to use JNDI for this.

      Example:

      <env-entry>
      <env-entry-name>myfaces-codi/ClassDeactivator</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>org.apache.myfaces.extensions.cdi.test.webapp.scopemapping.deactivator.ScopeMappingDeactivator</env-entry-value>
      </env-entry>

      Attachments

        Issue Links

          Activity

            People

              jakobkorherr Jakob Korherr
              jakobkorherr Jakob Korherr
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: