ICEpush
  1. ICEpush
  2. PUSH-388

Include the uri of a cloud push notification in the public API

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-4.0.0.GA, 4.1
    • Fix Version/s: EE-4.2.0.GA
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEfaces, ICEpush
    • Assignee Priority:
      P1

      Description

      When issuing a request for a push eligible for cloud push, a subject, detail and uri can be specified. Currently the ICEfaces' PushMessage and the ICEpush' PushNotification only exposes the subject and detail. We should improve this APIs to expose them more clearly and naming the uri something more sensible like targetURI or destinationURI. The fact that they are part of either PushMessage and PushNotification should make its intend clear.

        Issue Links

          Activity

          Hide
          Liana Munroe added a comment - - edited

          Tested QA cloudPush application using Jenkins ICEfaces EE 4 trunk Nightly build 433. Tested locally and on Labs1 server instance. I left the application running on Labs1 for Jack to view.
          In the QA application I added the URI as per the new API. Now native notifications are no longer received and a server warning is seen when using priority push. This warning appeared with or without the modifications to web.xml.

          Apr 06, 2016 7:56:43 PM org.icepush.ConfirmationTimeout execute
          WARNING: Exception caught on confirmationTimeout TimerTask.
          java.lang.UnsupportedOperationException
                  at java.util.Collections$UnmodifiableMap.remove(Collections.java:1460)
                  at org.icepush.ConfirmationTimeout.execute(ConfirmationTimeout.java:204)
                  at org.icepush.ConfirmationTimeout.execute(ConfirmationTimeout.java:102)
                  at org.icepush.ConfirmationTimeout$1.run(ConfirmationTimeout.java:56)
                  at java.util.TimerThread.mainLoop(Timer.java:555)
                  at java.util.TimerThread.run(Timer.java:505)
          

          Also there was a server warning upon deployment. I ended up manually adding these Jackson jars to my .war file as they were not added during the build. I eventually commented out the email references in the web.xml file on the Labs 1 server.

          Task.run E-mail Notification Provider is disabled by configuration.
          Exception in thread "APNS Notification Provider set-up thread" java.lang.NoClass
          DefFoundError: com/fasterxml/jackson/core/JsonGenerator
                  at com.icesoft.notify.cloud.core.APNSNotificationProvider$AutoRegistrati
          on$RegistrationTask.run(APNSNotificationProvider.java:445)
                  at java.lang.Thread.run(Thread.java:745)
          Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonGene
          rator
                  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClas
          sLoaderBase.java:1295)
                  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClas
          sLoaderBase.java:1147)
                  ... 2 more
          

          The QA test app can be found at http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/cloudPush.
          Use the CloudPush Persistence page

          Show
          Liana Munroe added a comment - - edited Tested QA cloudPush application using Jenkins ICEfaces EE 4 trunk Nightly build 433. Tested locally and on Labs1 server instance. I left the application running on Labs1 for Jack to view. In the QA application I added the URI as per the new API. Now native notifications are no longer received and a server warning is seen when using priority push. This warning appeared with or without the modifications to web.xml. Apr 06, 2016 7:56:43 PM org.icepush.ConfirmationTimeout execute WARNING: Exception caught on confirmationTimeout TimerTask. java.lang.UnsupportedOperationException at java.util.Collections$UnmodifiableMap.remove(Collections.java:1460) at org.icepush.ConfirmationTimeout.execute(ConfirmationTimeout.java:204) at org.icepush.ConfirmationTimeout.execute(ConfirmationTimeout.java:102) at org.icepush.ConfirmationTimeout$1.run(ConfirmationTimeout.java:56) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) Also there was a server warning upon deployment. I ended up manually adding these Jackson jars to my .war file as they were not added during the build. I eventually commented out the email references in the web.xml file on the Labs 1 server. Task.run E-mail Notification Provider is disabled by configuration. Exception in thread "APNS Notification Provider set-up thread" java.lang.NoClass DefFoundError: com/fasterxml/jackson/core/JsonGenerator at com.icesoft.notify.cloud.core.APNSNotificationProvider$AutoRegistrati on$RegistrationTask.run(APNSNotificationProvider.java:445) at java.lang. Thread .run( Thread .java:745) Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonGene rator at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClas sLoaderBase.java:1295) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClas sLoaderBase.java:1147) ... 2 more The QA test app can be found at http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Manual/cloudPush . Use the CloudPush Persistence page
          Hide
          Jack Van Ooststroom added a comment -

          Sending icepush/core/src/main/java/org/icepush/ConfirmationTimeout.java
          Transmitting file data .
          Committed revision 48616.

          Show
          Jack Van Ooststroom added a comment - Sending icepush/core/src/main/java/org/icepush/ConfirmationTimeout.java Transmitting file data . Committed revision 48616.
          Hide
          Jack Van Ooststroom added a comment -

          The UnsupportedOperationException should be fixed as instead of changing references of the propertyMap the class member propertyMap is now cleared and the parameter propertyMap is then added in its entirety to the class member propertyMap. As the class member propertyMap is under its own control and used by the execute(...) method the UnsupportedOperationException should no longer be thrown.

          Show
          Jack Van Ooststroom added a comment - The UnsupportedOperationException should be fixed as instead of changing references of the propertyMap the class member propertyMap is now cleared and the parameter propertyMap is then added in its entirety to the class member propertyMap . As the class member propertyMap is under its own control and used by the execute(...) method the UnsupportedOperationException should no longer be thrown.
          Hide
          Jack Van Ooststroom added a comment -

          The targetURI is now part of the various public APIs, namely at the Java-side for ICEfaces (using the PushMessage class) and ICEpush (using the PushNotification class), and at the JavaScript-side for ICEpush (using the notify function). At the server-side the new targetURI eventually translates to the url property for the ICEnotify, ICEnotify-EE and/or Cloud Notification Service. Marking this one as FIXED.

          Show
          Jack Van Ooststroom added a comment - The targetURI is now part of the various public APIs, namely at the Java-side for ICEfaces (using the PushMessage class) and ICEpush (using the PushNotification class), and at the JavaScript-side for ICEpush (using the notify function). At the server-side the new targetURI eventually translates to the url property for the ICEnotify, ICEnotify-EE and/or Cloud Notification Service. Marking this one as FIXED.
          Hide
          Carmen Cristurean added a comment -

          EE4 trunk r45002, verified cloudPush priority notifications on Labs1 on iPad/IOS9:

          • the UnspportedOperationException can no longer be reproduced. - VERIFIED/CONFIRMED.
          • the notifications work partially only on iPad/iOS9. - NOTIFICATIONS WORK CONSISTENTLY; ONE EXCEPTION WOULD BE IF SENDING NOTIFICATIONS "IN A QUEUE" FROM DIFFERENT PAGES, WHEN ONLY THE FIRST NOTIFICATION IS RECEIVED.
          • the notifications appear to work on iPad/iOS9 only if there is no other device that previously registered for cloudPush using the same application. If another device registered first for cloudPush from the same app, in order for the notifications to start working again on iPad, the browser on iPad should be cleared, and must register again for cloudPush from the iPad. - THIS WORKS CORRECTLY NOW.
          • the received notifications contain the name of the color-coded page, and the subject line. - VERIFIED/PASS.
          • clicking on the notification opens up the browser window displaying two tabs: the default opened tab is the second tab with the main registration page, and the first tab has the color-coded page that generated the notification. - this is expected and correct behavior – CLICKING ON THE NATIVE NOTIFICATION OPENS UP NOW ONLY THE CORRESPONDING COLOR-CODED PAGE.
          Show
          Carmen Cristurean added a comment - EE4 trunk r45002, verified cloudPush priority notifications on Labs1 on iPad/IOS9: the UnspportedOperationException can no longer be reproduced. - VERIFIED/CONFIRMED. the notifications work partially only on iPad/iOS9. - NOTIFICATIONS WORK CONSISTENTLY; ONE EXCEPTION WOULD BE IF SENDING NOTIFICATIONS "IN A QUEUE" FROM DIFFERENT PAGES, WHEN ONLY THE FIRST NOTIFICATION IS RECEIVED. the notifications appear to work on iPad/iOS9 only if there is no other device that previously registered for cloudPush using the same application. If another device registered first for cloudPush from the same app, in order for the notifications to start working again on iPad, the browser on iPad should be cleared, and must register again for cloudPush from the iPad. - THIS WORKS CORRECTLY NOW. the received notifications contain the name of the color-coded page, and the subject line. - VERIFIED/PASS. clicking on the notification opens up the browser window displaying two tabs: the default opened tab is the second tab with the main registration page, and the first tab has the color-coded page that generated the notification. - this is expected and correct behavior – CLICKING ON THE NATIVE NOTIFICATION OPENS UP NOW ONLY THE CORRESPONDING COLOR-CODED PAGE.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: