sailfin
  1. sailfin
  2. SAILFIN-2002

SipBundleDescriptor.isConverged() always false?

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: b31d
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      2,002

      Description

      As part of the fix for 1982, we need to know if the app is a Converged app or not.

      Bhavni wrote a small snippet of code that returned false even when the app has
      http servlets. More specifically, ((SipBundleDescriptor)o).isConverged()
      returns 'false'.

      We need a fix for this in order to complete the fix for 1982.

      I am setting the subcomponent to deployment. Please reassign appropriately.

        Issue Links

          Activity

          Hide
          Mahesh Kannan added a comment -

          A new patch for 1982 has been tested successfully. In order to limit the patch
          only to converged apps, we need this issue to be resolved

          Show
          Mahesh Kannan added a comment - A new patch for 1982 has been tested successfully. In order to limit the patch only to converged apps, we need this issue to be resolved
          Hide
          Mahesh Kannan added a comment -

          Changed the platform

          Show
          Mahesh Kannan added a comment - Changed the platform
          Hide
          Bhavanishankar added a comment -

          SIpBundleDescriptor.isConverged() seems to works correctly.

          The reason why I was seeing it not working is because I was trying to check it
          from ConvergedContextImpl#configureSessionManager method. But Prasad explained
          to me that when this when configureSessionManager method is called,
          sipApplication is not set in the ConvergedContextImpl.

          But when the manager starts up (during preStart), sipApplication gets set in the
          ConvergedContextImpl, and once the sipApplication is available, the following
          code works correctly.

          SipApplication sa = context.getSipApplication();
          if (sa != null) { // sa would be null until manager.start() is
          called, so isConverged was false during configureSessionManager();
          Object o = sa.getReferringDescriptor();
          if (o instanceof SipBundleDescriptor)

          { isConverged = ((SipBundleDescriptor)o).isConverged(); }

          }

          Since the isConverged() is working as expected, Prasad will be providing a new
          method called SipBundleDescriptor#containsHttpServlets() which would return
          'true' if the app has at least one http servlet, false otherwise.

          Show
          Bhavanishankar added a comment - SIpBundleDescriptor.isConverged() seems to works correctly. The reason why I was seeing it not working is because I was trying to check it from ConvergedContextImpl#configureSessionManager method. But Prasad explained to me that when this when configureSessionManager method is called, sipApplication is not set in the ConvergedContextImpl. But when the manager starts up (during preStart), sipApplication gets set in the ConvergedContextImpl, and once the sipApplication is available, the following code works correctly. SipApplication sa = context.getSipApplication(); if (sa != null) { // sa would be null until manager.start() is called, so isConverged was false during configureSessionManager(); Object o = sa.getReferringDescriptor(); if (o instanceof SipBundleDescriptor) { isConverged = ((SipBundleDescriptor)o).isConverged(); } } Since the isConverged() is working as expected, Prasad will be providing a new method called SipBundleDescriptor#containsHttpServlets() which would return 'true' if the app has at least one http servlet, false otherwise.
          Hide
          prasads added a comment -

          Checking in
          src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java;
          /cvs/sailfin/deployment/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java,v
          <-- SipArchiveDeployer.java
          new revision: 1.40.2.2; previous revision: 1.40.2.1

          Show
          prasads added a comment - Checking in src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java; /cvs/sailfin/deployment/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java,v <-- SipArchiveDeployer.java new revision: 1.40.2.2; previous revision: 1.40.2.1
          Hide
          prasads added a comment -

          Checking in
          src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java;
          /cvs/sailfin/deployment/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java,v
          <-- SipArchiveDeployer.java
          new revision: 1.40.2.2; previous revision: 1.40.2.1

          https://sailfin.dev.java.net/source/browse/sailfin/common/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipBundleDescriptor.java?r1=1.6&r2=1.6.8.1

          Show
          prasads added a comment - Checking in src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java; /cvs/sailfin/deployment/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipArchiveDeployer.java,v <-- SipArchiveDeployer.java new revision: 1.40.2.2; previous revision: 1.40.2.1 https://sailfin.dev.java.net/source/browse/sailfin/common/src/main/java/org/jvnet/glassfish/comms/deployment/backend/SipBundleDescriptor.java?r1=1.6&r2=1.6.8.1
          Hide
          prasads added a comment -

          The issue has been fixed by providing a new variable in SipBundleDescriptor to
          determine if there are HTTP Servlets in a converged application or not.

          boolean sipBundleDescriptor.containsHTTPServlets() is the method to be used.

          Show
          prasads added a comment - The issue has been fixed by providing a new variable in SipBundleDescriptor to determine if there are HTTP Servlets in a converged application or not. boolean sipBundleDescriptor.containsHTTPServlets() is the method to be used.

            People

            • Assignee:
              Bhavanishankar
              Reporter:
              Mahesh Kannan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: