3 Replies Latest reply on Apr 1, 2004 1:37 PM by jae

    Hot deployment problem

    srinivasbv_gowda Newbie

      Hi All,

      In our application we are having few threads which will listen at certain port. Now if we make any changes to ear file and try to hot deploy, we will see previous threads still exist.
      Is there any way where we can remove existing threads when doing hot deploy.

      Thanks
      Srinivas

        • 1. Re: Hot deployment problem
          jae Master

          i'm not sure if there is a "simpler" solution, but one options is a custom mbean that registers itself w/ the EARDeployer to listen for deployment notifications.

          when your mbean gets notified that a deployment occurred, you could do whatever is necessary to clean up those connections/threads.

          • 2. Re: Hot deployment problem
            srinivasbv_gowda Newbie

            Hi ,

            Can we configure the existing Mbean to do that. I don't have any idea about which Mbean it is and where the configure to be done.Could you give some information on it.

            Thanks
            Srinivas

            • 3. Re: Hot deployment problem
              jae Master

              what do you mean by "existing" mbean? you can't modify the EARDeployer to handle this, you need to write your own mbean to handle this.

              basically you create an mbean and register it w/ the EARDeployer w/ a filter so you only get the events you want. when the EARDeployer sends a notification, it will determine if you should get the message (via the filter) and if yes, your mbean will be notified.

              once your mbean is notified, it can invoke whatever methods are necessary to do the cleanup work.

              i've did some experimentation w/ this the other day to solve a problem i was having, but just opted for a custom deployer - so if you ask me more "specific" questions, i can continue to provide some support.