ICEpush
  1. ICEpush
  2. PUSH-242

PushContext's public constructor should be made private and getInstance() should create a new instance

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.2.0.GA, 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEpush

      Description

      Currently you must invoke PushContext's public PushContext(ServletContext) constructor before ensuring PushContext's static public getInstance(ServletContext) returns the actual PushContext instance associated with the specified ServletContext. If not the latter returns null. In addition, multiple invocations of the PushContext's constructor results in PushContext instances to be overwritten in the specified ServletContext. The getInstance(ServletContext) should serve more as a Singleton function. In order to achieve this the PushContext's constructor should be private and the PushContext's getInstance(...) method should handle the creation of a PushContext if the ServletContext doesn't already contain an instance of PushContext, ensuring an invocation of the getInstance(...) method always returns an instance of PushContext. Please note that the getInstance(...) method is already declared to be synchronized.

        Activity

        Hide
        Jack Van Ooststroom added a comment -

        Sending core/src/main/java/org/icepush/PushContext.java
        Sending core/src/main/java/org/icepush/servlet/MainServlet.java
        Transmitting file data ..
        Committed revision 35583.

        Show
        Jack Van Ooststroom added a comment - Sending core/src/main/java/org/icepush/PushContext.java Sending core/src/main/java/org/icepush/servlet/MainServlet.java Transmitting file data .. Committed revision 35583.
        Hide
        Jack Van Ooststroom added a comment -

        The changes as described have been done and committed. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - The changes as described have been done and committed. Marking this one as FIXED.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jack Van Ooststroom
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: