Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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.
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.