glassfish
  1. glassfish
  2. GLASSFISH-19565

Application not undeployed if Lifecycle Listener is used

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.0_b74
    • Component/s: lifecycle_modules
    • Labels:
      None

      Description

      Our customer found an application is never undeployed if Lifecycle Listener is used on Glassfish 3.1.2.

      The steps to reproduce.
      1. Start app server
      $ asadmin start-domain

      2. Copy /dist/test.jar from TestLifecycleListener.zip to C:/test.jar. This jar file contains one class that implements com.sun.appserv.server.LifecycleListener.

      3. Register this lifecycle module
      $ asadmin create-lifecycle-module --classname "test.TestLifecycleListener" --classpath "C:/test.jar" testmodule

      This command adds relevant description in domains/domain1/config/domain.xml

      4. Deploy /dist/TestServlet.ear from TestServlet.zip to domains/domain1/autodeploy.

      If it is successful, you can see TestServlet.ear_deployed under that autodeploy directory.

      5. Undeploy TestServlet.ear.

      Remove TestServlet.ear from domains/domain1/autodeploy.

      Normally, you can see TestServlet.ear_undeployed under domains/domain1/autodeploy. If the above lifecycle module is registered, TestServlet.ear is not undeployed. You can confirm it by launching command "asadmin list-applications"

      Is this behavior correct?

        Activity

        Hide
        Hong Zhang added a comment -

        Does TestServlet.ear have dependency on the listener from test.jar? Do you see any exception in the server.log when you tried to undeploy the TestServlet.ear?

        I think the JIRA currently disables the attachment, so you can send the test case to my java.net email.

        Show
        Hong Zhang added a comment - Does TestServlet.ear have dependency on the listener from test.jar? Do you see any exception in the server.log when you tried to undeploy the TestServlet.ear? I think the JIRA currently disables the attachment, so you can send the test case to my java.net email.
        Hide
        Hong Zhang added a comment -

        I was able to reproduce this issue. For auto-undeployment, when we match the default app name with the archive name, we should only do the mathc when the default app name is not null (it
        could be null for non JavaEE application like lifecycle module).

        I have checked in the fix to the GlassFish 4.0 trunk.

        Show
        Hong Zhang added a comment - I was able to reproduce this issue. For auto-undeployment, when we match the default app name with the archive name, we should only do the mathc when the default app name is not null (it could be null for non JavaEE application like lifecycle module). I have checked in the fix to the GlassFish 4.0 trunk.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            xj
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: