google-code-export / smslib

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

Do not run NotifyQueueManager, after restarting the service. #474

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the service is stopped and restarted, NotifyQueueManager stops working.

Service.getInstance().startService(false);
.....
Service.getInstance().stopService();
.....
Service.getInstance().startService(false);
!!!! But NotifyQueueManager does not work.

Original issue reported on code.google.com by Waldemar.Klaczynski on 19 Mar 2012 at 3:39

GoogleCodeExporter commented 9 years ago
It may be:

/sms-lib/src/main/java/org/smslib/notify/NotifyQueueManager.java
sms-lib/src/main/java/org/smslib/notify/NotifyQueueManager.java
@@ -34,6 +34,9 @@
    public NotifyQueueManager()
    {
        setNotifyQueue(new LinkedBlockingQueue<Notification>());
+   }
+
+        public void start(){
        setNotifyQueueManager(new NotificationQueueManager("NotifyQueueManager", 100));
    }

/sms-lib/src/main/java/org/smslib/Service.java
/sms-lib/src/main/java/org/smslib/Service.java
@@ -219,9 +219,12 @@
     */
    public synchronized void startService(boolean startAllGateways) throws SMSLibException, TimeoutException, GatewayException, IOException, InterruptedException
    {
                if(queueManager == null){
        queueManager = new DefaultQueueManager();
                }
        try
        {
+           getNotifyQueueManager().start();
            getQueueManager().start();
            setServiceStatus(ServiceStatus.STARTING);
            setWatchDog(new WatchDog("WatchDog", (getSettings().WATCHDOG_INTERVAL * 1000)));

Original comment by Waldemar.Klaczynski on 19 Mar 2012 at 3:47

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 22 Mar 2012 at 8:56

GoogleCodeExporter commented 9 years ago
r2333

Original comment by T.Delenikas on 22 Mar 2012 at 9:05

GoogleCodeExporter commented 9 years ago
Issue 435 has been merged into this issue.

Original comment by T.Delenikas on 27 Mar 2012 at 5:32

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 31 Mar 2012 at 8:03