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

        Jack Van Ooststroom created issue -
        Jack Van Ooststroom made changes -
        Field Original Value New Value
        Fix Version/s EE-3.3.0.GA [ 10575 ]
        Fix Version/s 3.4 [ 10971 ]
        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.
        Jack Van Ooststroom made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #35583 Fri May 24 07:58:53 MDT 2013 jack.van.ooststroom Fixed JIRA PUSH-242 : PushContext's public constructor should be made private and getInstance() should create a new instance
        Files Changed
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/servlet/MainServlet.java
        Commit graph MODIFY /icepush/trunk/icepush/core/src/main/java/org/icepush/PushContext.java
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11383 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: