Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1652

ImportPackages in flowscript causes a useless session to be created

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.7
    • None
    • - Flowscript
    • None
    • Operating System: other
      Platform: Other
    • 37158

    Description

      In flowscript, writing this

      importPackage(Packages.org.apache.cocoon.components.modules.input);

      function f() {
        var module = cocoon.getComponent(InputModule.ROLE +
      "Selector").select("someXmlFileModule");
      ...

      causes a session to be created, apparently when InputModule.ROLE is accessed.

      This is unexpected as no "user-level" modification is made to the global scope.

      If importPackage is not used as below, no session is created:

      function f() {
        var module =
      cocoon.getComponent(Packages.org.apache.cocoon.components.modules.input.InputModule.ROLE
      + "Selector").select("someXmlFileModule");


      I don't know if the fix is easy, to avoid a session being created in the first
      case, but we should at least create some tests to check exactly when sessions
      are created.

      I hope to do that soon, but I shouldn't write "I hope to do that soon here" as I
      don't know when soon will be ;-)

      Attachments

        Activity

          People

            Unassigned Unassigned
            bdelacretaz Bertrand Delacretaz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: