Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8227

Allow to specify Groovysh (and GroovyShell) class loader different from TCCL

    XMLWordPrintableJSON

Details

    • Important

    Description

      Allthough the Groovy API seem to allow one to specify the class loader when instanciating a Groovysh or GroovyShell, internally in some places Groovy will silently use the TCCL (thread context class loader) and there is no way to avoid that without hacking Groovy and chasing all the places where getThreadContextClassLoader() is used.

      This is problematic, especially in OSGi environement, since the TCCL is not compatible with OSGi principles (i.e. every bundle has its own class loader), and also with some modern modular containers similar to OSGi. When a class loader is specified in the GroovyShell or Groovysh creation, Groovy should propagate that class loader correctly (or instanciate children class loader of that specified class loader), and in no way use the TCCL.

      This may be a dupplicate of Groovy 4895

      Attachments

        Activity

          People

            Unassigned Unassigned
            djouvin Denis Jouvin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified