jungseung / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Sending more than 100000 push notifications #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.take token from data base as xml get token number 
2.use send method use basic devises add in device link list  
3.massage and devices link list send as pram other usefull pramater also

What is the expected output? What do you see instead?

its very slow  processing until finish more than 100000 user the target
sokect connection broken  error
What version of the product are you using? On what operating system?
javapns 2.2 Java Spring MVC Web Application Backend for Iphone application

Please provide any additional information below.
i need salution how to send notification more than 100000 user at same time 

Original issue reported on code.google.com by abhimany...@gmail.com on 23 Feb 2012 at 4:40

GoogleCodeExporter commented 8 years ago
Please ans me asp

Original comment by abhimany...@gmail.com on 23 Feb 2012 at 4:41

GoogleCodeExporter commented 8 years ago
More details are needed to understand what the problem is...

You are mentioning a socket connection error, but also implying that the 
process finishes.  When you try to push 100,000 notifications, does it succeed 
(even though you mention it is slow)?  If the process is halted, do you get 
exceptions? (please provide stack traces and log output).

Also, how reliable is your list of 100,000 device tokens?  Is it possible that 
many are invalid?  That would explain why the process appears to be slow, 
because in fact the library needs to deal with APNS' way of ignoring all 
notifications pushed after an invalid one on the same connection, thus 
requiring a retransmission of all following notifications..  If your list 
contains many invalid tokens, the process might take a lot of time to complete. 
 Of course, this wouldn't have anything to do directly with the library...

More questions:

1) What exactly seems to be slow?  100,000 notifications would of course take 
some time to process, but what gives you the impression that the process is 
"unusually" slow?

2) Have you tried using the notification threads in JavaPNS to make the process 
more efficient?  See the Advanced Push Notification wiki page for more 
information.

Original comment by sype...@gmail.com on 23 Feb 2012 at 5:05

GoogleCodeExporter commented 8 years ago
Hi thanks for uor responce

i used simple java threads  to be send notification can you explain how to use 
notification threads....

i am getting all token from database after that i used deviceList.add(new 
BasicDevice(tokenToUse)); to all device token is registerd so i am getting size 
of deviceList 100000  after that i am calling send() method to send 
notification after 1000  record send notification error com on log socket 
connection error. i am using oracle 10 data base and Java Spring MVC 
Application  for sending notification please example me how to send bulk number 
of user to send notification
monday i will attach file thanks....

Original comment by abhimany...@gmail.com on 25 Feb 2012 at 9:33

GoogleCodeExporter commented 8 years ago
As I mentioned, see the "Advanced Push Notification" wiki page on this web site 
to learn how to use notification threads.

Original comment by sype...@gmail.com on 25 Feb 2012 at 3:41

GoogleCodeExporter commented 8 years ago
Yes i used  "Advanced Push Notification" Only i used below Method to Send 
Notification

public void send (List<Device> devices, String keystore, String password, 
boolean production,String msg,String appleHost,int applePort ) {

        log.info("In Send ");

        /* Gather communication details for your custom server */
        AppleNotificationServer customServer = null;
        try {
            customServer = new AppleNotificationServerBasicImpl(keystore, password, ConnectionToAppleServer.KEYSTORE_TYPE_PKCS12, appleHost, applePort);
        } catch (KeystoreException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

      /* Prepare a simple payload to push */
        PushNotificationPayload payload = PushNotificationPayload.alert(msg);

      /* Create a push notification manager */
        PushNotificationManager pushManager = new PushNotificationManager();

      /* Initialize the push manager's connection to the custom server */
        try {
            pushManager.initializeConnection(customServer);

            List<PushedNotification> notifications = pushManager.sendNotifications(payload, devices);
            log.info("Notifications Sent = "+notifications.size());
        } catch (CommunicationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (KeystoreException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }

befor that i am collect all Deviices Token 
   device = new BasicDevice(tokenName.replace(" ", ""));
   devices.add(device);

and call send method .

2012-02-23 04:34:23 GMT+03:00 INFO 
[javapns.notification.PushNotificationManager.sendNotification()]:Attempt 
failed (Software caused connection abort: socket write error)... trying again

Original comment by abhimany...@gmail.com on 27 Feb 2012 at 6:23

GoogleCodeExporter commented 8 years ago
You are not using the notification threads at all.  The code you used was 
provided as an example for having more control over default settings (which is 
the title of the section you took the code from).  However that code does not 
use notification threads.  See the "Sending large amounts of notifications 
(multi-threading)" section of the Advanced Push Notification wiki page instead.

Original comment by sype...@gmail.com on 27 Feb 2012 at 6:11

GoogleCodeExporter commented 8 years ago
hi thanks your responce

i am already use Java  new Thread() to run and start my send method call inside 
of thread  moring i will send code of thread ... 

 the multithread payload method above will return only once all threads have finished pushing notifications. If you do not want to wait for them to complete, run the code above inside a separate Thread (example: new Thread() {public void run() {...}}.start();). 

one more question 
i have only 3 device if i want test my application i have to deploy in live 
server
this is not good our client  how i will test my code to 3 device to make 100000 
device and test please help me .......

i will send code  asp............
thanks....... 

Original comment by abhimany...@gmail.com on 27 Feb 2012 at 10:27

GoogleCodeExporter commented 8 years ago
public void send (List<Device> devices, Object keystore, String password, 
boolean production) {
         /* Prepare a simple payload to push */    

      PushNotificationPayload payload = PushNotificationPayload.alert("Hello World!");         /* Decide how many threads you want to create and use */          int threads = 30;         /* Start threads, wait for them, and get a list of all pushed notifications */          List<PushedNotification> notifications =Push.payload(payload, keystore, password, production, threads, devices);  

}

in this method

these line are not 

customServer = new AppleNotificationServerBasicImpl(keystore, password, 
ConnectionToAppleServer.KEYSTORE_TYPE_PKCS12, appleHost, applePort);
        } catch (KeystoreException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

      /* Prepare a simple payload to push */
        PushNotificationPayload payload = PushNotificationPayload.alert(msg);

      /* Create a push notification manager */
        PushNotificationManager pushManager = new PushNotificationManager();

      /* Initialize the push manager's connection to the custom server */
        try {
            pushManager.initializeConnection(customServer);

 here now AppleNotificationServerBasicImpl and no notification manager and not initialize server also can yo give me example from code how to use thread 

.....

Original comment by abhimany...@gmail.com on 27 Feb 2012 at 10:33

GoogleCodeExporter commented 8 years ago
public void send (List<Device> devices, Object keystore, String password, 
boolean production) {         /* Prepare a simple payload to push */          
PushNotificationPayload payload = PushNotificationPayload.alert("Hello 
World!");         /* Decide how many threads you want to create and use */      
    int threads = 30;         /* Start threads, wait for them, and get a list 
of all pushed notifications */          List<PushedNotification> notifications 
= Push.payload(payload, keystore, password, production, threads, devices);  }

in this method no host and no port taken as prameter than how to make 
connection to the apple server??????????

Original comment by abhimany...@gmail.com on 27 Feb 2012 at 10:59

GoogleCodeExporter commented 8 years ago
public void send (List<Device> devices, Object keystore, String password, 
boolean production) {         /* Prepare a simple payload to push */          
PushNotificationPayload payload = PushNotificationPayload.alert("Hello 
World!");         /* Decide how many threads you want to create and use */      
    int threads = 30;         /* Start threads, wait for them, and get a list 
of all pushed notifications */          List<PushedNotification> notifications 
= Push.payload(payload, keystore, password, production, threads, devices);  }

this method is not complied give UNHANDELEXCEPTION  ERROR Plese Tell Which 
Exception i shoud handel

Original comment by abhimany...@gmail.com on 28 Feb 2012 at 10:35

GoogleCodeExporter commented 8 years ago
Above Method is Multi thread method ........ 

Original comment by abhimany...@gmail.com on 28 Feb 2012 at 10:36

GoogleCodeExporter commented 8 years ago
hi,

i am using the below method to send my push notification, i have around 107791 
clients.
if i send it for less amount of tokens say around 100, its working fine. But 
for this bulk quantity

it's returing the below error.

    public void send (List<Device> devices, Object keystore, String password, boolean production ,String msg) throws Exception{

         log.info("In Send "+devices.size());

         /* Prepare a simple payload to push */       
         PushNotificationPayload payload = PushNotificationPayload.alert(msg);  
         /* Decide how many threads you want to create and use */
          int  length=0;
          int threads = 0;
          if ( devices.size() > 1000) {
              length= (int) Math.ceil(devices.size()/1000); 
              log.info("length of Devices"+length);
              threads = (int) Math.ceil(devices.size()/length);
              log.info("length of threads"+threads);
          } else {
              length= devices.size(); 
              log.info("length of Devices"+length);
              threads = (int) Math.ceil(devices.size()/length);
              log.info("length of threads"+threads);

          }

         /* Start threads, wait for them, and get a list of all pushed notifications */     
         try{
           List<PushedNotification> notifications = Push.payload(payload, keystore, password, production, threads, devices);
           log.info("Notifications Sent = "+notifications.size());
         }catch(Exception ex){
             ex.printStackTrace(); 
         }

    }

Error :
[javapns.notification.PushNotificationManager.sendNotification()]:

Attempt failed (Software caused connection abort: socket write error)... trying 
again

please guide me regarding this.

Original comment by abhimany...@gmail.com on 29 Feb 2012 at 12:26

GoogleCodeExporter commented 8 years ago
Ok, the code in your very last comment is finally using notification threads, 
as documented in the "Sending large amounts of notifications" section of the 
Advanced Push Notification wiki page.

Now, how many threads does that code actually chooses to use?  I see you log a 
"length of threads" line, so what does it say?

Also, the line "Attempt failed (Software caused connection abort: socket write 
error)... trying again" is saying it will try again...  does it?  Surely this 
is not the final error you are getting, as the library should be trying again.

Please ATTACH (do not copy-paste) a full copy of the library's log output so it 
can be examined further.

Original comment by sype...@gmail.com on 29 Feb 2012 at 3:37

GoogleCodeExporter commented 8 years ago
Hi , 
 log information i don't have today but i remeber i have 107791 clients or Token 

i create 107 Thread ...

Original comment by abhimany...@gmail.com on 1 Mar 2012 at 6:47

GoogleCodeExporter commented 8 years ago
Hi May be its working .........

I want to know how to calcultae number of thread  according to device number  
suppose i have 10,000 Devices then how many thread to be needed can you give me 
some idea to calculate number of thread as per devices thanks for your guide 
line.....

Original comment by sabinkum...@gmail.com on 1 Mar 2012 at 8:33

GoogleCodeExporter commented 8 years ago
2012-03-01 05:08:35 GMT+03:00 INFO 
[javapns.notification.PushNotificationManager.sendNotification()]:Attempt 
failed (Read timed out)... trying again
2012-03-01 05:08:42 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:08:43 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:08:44 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:08:44 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:08:45 GMT+03:00 INFO 
[javapns.notification.PushNotificationManager.sendNotification()]:Attempt 
failed (Remote host closed connection during handshake)... trying again

Original comment by abhimany...@gmail.com on 1 Mar 2012 at 2:19

Attachments:

GoogleCodeExporter commented 8 years ago
This is Starting Line of Log Device Number :-32281 

2012-03-01 05:06:50 GMT+03:00 INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.ge
tNotificationCustomersXML()]:cnt........32283
2012-03-01 05:06:50 GMT+03:00 INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.ge
tNotificationCustomersXML()]:All Devices = 32283
2012-03-01 05:06:50 GMT+03:00 INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.se
nd()]:In Send 32283
2012-03-01 05:06:51 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:06:51 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:06:51 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:06:51 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:06:52 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:06:52 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:02 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:02 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:10 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:10 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:11 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:11 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:15 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:16 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:17 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:19 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:22 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:22 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:27 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:27 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:28 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:31 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:31 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:31 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:31 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:34 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:34 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:38 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:38 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:38 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:39 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:42 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:45 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:45 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:45 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:47 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:47 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:48 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:48 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:49 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:50 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:50 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:51 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:54 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:54 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:59 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:07:59 GMT+03:00 INFO 
[com.shci.shms.common.filter.TCSesseionListener.sessionCreated()]:Session 
Created.......................................................................
2012-03-01 05:08:02 GMT+03:00 INFO 
[javapns.notification.PushNotificationManager.sendNotification()]:Attempt 
failed (Read timed out)... trying again

Original comment by abhimany...@gmail.com on 1 Mar 2012 at 2:22

GoogleCodeExporter commented 8 years ago
hi,
    pleas give me salution......................

Original comment by abhimany...@gmail.com on 1 Mar 2012 at 5:01

GoogleCodeExporter commented 8 years ago
Regarding the number of threads required, there is no exact formula for this. 
You need to figure out what is best for you in your own project.  Doing tests 
with various numbers (1, 5, 10, 20, 50 threads) and comparing the time it takes 
to process your entire list of devices should help you determine how many 
threads you should be using.

Regarding the logs you provided, I'm sorry to say they are pretty much 
useless...  Out of all the log lines you provided, only 2 or 3 are actually 
related to JavaPNS!  The others are completely unrelated (com.shci.shms.* has 
nothing to do with JavaPNS).  Further more, your log configuration seems to 
print out only the INFO level.  JavaPNS outputs a LOT more details than that.  
Please enable full logging for JavaPNS, try again, and please, ATTACH your log 
file instead of copy-pasting long lists of lines that are difficult to read 
through here.  

Original comment by sype...@gmail.com on 2 Mar 2012 at 3:35

GoogleCodeExporter commented 8 years ago
notifications.size() i am not getting rather than notification sent sucsess 
full .

And how to Enabled JavaPns Log what ever error comming and Exception i am 
Printing Please Advise Me i am calling this method

if(tokenName.length() > 60){
 log.info("tokenName.;"+tokenName.replaceAll(" ","").length()); 
  device = new BasicDevice(tokenName.replaceAll(" ",""));
  devices.add(device);
}
                    }
if(msg1.length()>0 && devices.size()>0)
          {
            send(devices, certificate, passwd, true,msg1);
 }

public void send (List<Device> devices, Object keystore, String password, 
boolean production ,String msg) throws Exception{

         log.info("In Send "+devices.size());

         /* Prepare a simple payload to push */       
         PushNotificationPayload payload = PushNotificationPayload.alert(msg);  
         /* Decide how many threads you want to create and use */

          int threads = 30;

          log.info("threads Sent = "+threads);

         /* Start threads, wait for them, and get a list of all pushed notifications */     
         try{
              List<PushedNotification> notifications = Push.payload(payload, keystore, password, production, threads, devices);
              log.info("Notifications Sent = "+notifications.size());

         }catch(Exception ex){
             ex.printStackTrace(); 
         }

    }

 log.info("Notifications Sent = "+notifications.size());
This Is Not Printing....

Original comment by abhimany...@gmail.com on 4 Mar 2012 at 9:27

GoogleCodeExporter commented 8 years ago
2012-03-04 12:38:30 AST INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.se
nd()]:In Send 3
2012-03-04 12:38:30 AST INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.se
nd()]:threads Sent = 30
2012-03-04 12:38:30 AST INFO 

 log.info("Notifications Sent = "+notifications.size());

Above Info Is Not Printing For After Sending Notification Today Only this thing 
happen Last Time Same Code is Working Fine its Printing notification size today 
is Not Printing but notification sent all Devices For Local Chaeck.

Original comment by abhimany...@gmail.com on 4 Mar 2012 at 9:42

GoogleCodeExporter commented 8 years ago
Again, the log lines you are copying are not produced by JavaPNS, so they are 
not useful at all here.

How to enable logging is well documented in the wiki (Troubleshooting page).

Original comment by sype...@gmail.com on 5 Mar 2012 at 5:44

GoogleCodeExporter commented 8 years ago
Devices = 20748
2012-03-18 12:14:47 GMT+03:00 INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.se
nd()]:In Send 20748
2012-03-18 12:14:47 GMT+03:00 INFO 
[com.shci.shms.hijricalendarmaintenance.business.TCGeneralNotificationService.se
nd()]:threads Sent = 30
2012-03-18 12:15:05 GMT+03:00 INFO 
[javapns.notification.PushNotificationManager.sendNotification()]:Attempt 
failed (Software caused connection abort: socket write error)... trying again

Why This Error is Comming while we r using multitharding  using....

Original comment by abhimany...@gmail.com on 18 Mar 2012 at 9:22

GoogleCodeExporter commented 8 years ago
I'm really trying to help you, but evidently you are not cooperating.  For the 
last time before I close this issue, you need to provide full debug logs 
generated by JavaPNS.  You keep providing idle log lines which are out of 
context.  Please attach a text file containing a full debug output, or I will 
close this issue for lack of useful feedback.  Thank you for your understanding.

Original comment by sype...@gmail.com on 19 Mar 2012 at 2:24

GoogleCodeExporter commented 8 years ago
I Dounload JavaPNS_2.2_complete add JavaPns Jar File after That i use this 
method 

public void send (List<Device> devices, Object keystore, String password, 
boolean production ,String msg) throws Exception{

         log.info("In Send "+devices.size());
         PushNotificationPayload payload = PushNotificationPayload.alert(msg);  
          int threads = 30;

while i am sending notification to token number 

i am getting this error

2012-03-22 16:05:56,948 ERROR [STDERR] java.lang.NoClassDefFoundError: 
org/bouncycastle/jce/provider/BouncyCastleProvider
2012-03-22 16:05:56,948 ERROR [STDERR]  at 
javapns.notification.PushNotificationManager.initializeConnection(PushNotificati
onManager.java:105)
2012-03-22 16:05:56,948 ERROR [STDERR]  at 
javapns.notification.transmission.NotificationThread.runList(NotificationThread.
java:215)
2012-03-22 16:05:56,948 ERROR [STDERR]  at 
javapns.notification.transmission.NotificationThread.run(NotificationThread.java
:199)
2012-03-22 16:05:56,948 ERROR [STDERR]  at java.lang.Thread.run(Thread.java:595)

Original comment by abhimany...@gmail.com on 22 Mar 2012 at 1:24

GoogleCodeExporter commented 8 years ago
This is my Method 

public void send (List<Device> devices, Object keystore, String password, 
boolean production ,String msg) throws Exception{

         log.info("In Send "+devices.size());
         PushNotificationPayload payload = PushNotificationPayload.alert(msg);  
          int threads = 30;
          List<PushedNotification> notifications ;
         try{
              log.info("Inside Try Block");
             notifications = Push.payload(payload, keystore, password, production, threads, devices);
              log.info("Notifications Sent = "+notifications.size());

         }catch(Exception ex){
             log.info("Exception Try Block"+ex);
             ex.printStackTrace(); 
         }

    }

Original comment by abhimany...@gmail.com on 22 Mar 2012 at 1:26

GoogleCodeExporter commented 8 years ago
Have you included the dependencies into the classpath?

Original comment by sype...@gmail.com on 22 Mar 2012 at 2:19

GoogleCodeExporter commented 8 years ago
Hi I got it now its working thanks ...........

Original comment by abhimany...@gmail.com on 25 Mar 2012 at 8:12

GoogleCodeExporter commented 8 years ago

Original comment by sype...@gmail.com on 25 Mar 2012 at 10:16

GoogleCodeExporter commented 8 years ago
What is BADGE and what is used

Original comment by abhimany...@gmail.com on 28 Mar 2012 at 11:35

GoogleCodeExporter commented 8 years ago
Please refer to Apple documentation on APNS for general questions that are not 
specific to JavaPNS. Thank you.

Original comment by sype...@gmail.com on 28 Mar 2012 at 5:18

GoogleCodeExporter commented 8 years ago
By JavaPns  How many times sent Notification in Same Token Number Notification 
Message also Same............ 

Original comment by abhimany...@gmail.com on 29 Mar 2012 at 2:03

GoogleCodeExporter commented 8 years ago
How many times can you send an identical message to the same token?  JavaPNS 
doesn't impose a limit on that.

Original comment by sype...@gmail.com on 30 Mar 2012 at 2:50

GoogleCodeExporter commented 8 years ago
@abhimany...@gmail.com 
HI 
CAN U SHARE ME THE CODE DAT WORKED FOR YOU FINAALY FOR SENDING PUSH TO MULTIPLE 
USERS I AM FACING SAME PROBLEM AS YOU.
asap please
MY EMAIL ID IS:  vimalpant777@gmail.com

Original comment by vimalpan...@gmail.com on 24 Feb 2013 at 11:20

GoogleCodeExporter commented 8 years ago
Hello abhimany...@gmail.com

I am facing the same issue with my push application, could you please tell me 
how you resolved it ?

Thanks

Original comment by sajikum...@gmail.com on 15 May 2013 at 12:15

GoogleCodeExporter commented 8 years ago
Hello abhimany...@gmail.com

i will use this libary, but can u share what your fixing your issue?

please sent to me yadi.mulyadi86@gmail.com

thanq

Original comment by yadi.mul...@gmail.com on 7 Aug 2015 at 10:04