Good to hear :)
2009/10/29 lionkng123 <[email protected]>
>
> Hi Thanasis,
> I got the solution to stop the SMS server..
> I downloaded the Source Code of SMSLib instead of jar file.
> Edit Service Class sendMessage(OutboundMessage msg) commit the
> gateway.setStatus(GatewayStatuses.RESTART); and src\java\org\smslib
> \notify\NotifyQueueManager.java in cancel() method :-
> while (getNotifyQueue().size() != 0)
> {
> try
> {
> Thread.sleep(200);
> }
> catch (Exception e)
> {
> // Swallow this... its an artificial delay to drain queue of
> events...
> }
> }
> commit the while loop.. now in any exception server wont restart or
> retry....
>
>
> thanks friend for your help..
>
> On Oct 29, 5:13 pm, lionkng123 <[email protected]> wrote:
> > Is there any other solution to stop the server?
> >
> > On Oct 29, 5:04 pm, Thanasis <[email protected]> wrote:
> >
> >
> >
> > > You can't. I don't even remember if this class was there in 3.4.1
> > > Best thing to do is to upgrade to the latest version.
> >
> > > 2009/10/29 lionkng123 <[email protected]>
> >
> > > > Hi Thanasis,
> > > > Actually, ma using SMSLib 3.4.1 jar file. So, how can i interact with
> > > > org/smslib/notify/NotifyQueueManager.java ??
> >
> > > > On Oct 29, 12:04 pm, Thanasis <[email protected]> wrote:
> > > > > Ok, in this case and until an official fix is in place, do the
> following:
> >
> > > > > Edit org/smslib/notify/NotifyQueueManager.java
> > > > > Locate the "cancel()" method near the top. You will see a while
> statement
> > > > > there - remark the *entire* while structure and just leave the last
> > > > > statement. Recompile and try once more.
> >
> > > > > 2009/10/29 lionkng123 <[email protected]>
> >
> > > > > > yeh, that's right. Am talking for that situation... in that
> situation
> > > > > > how to stop that server .. I cant find out any way.
> > > > > > When GatewayException happend, at that time
> service.startService();
> > > > > > wont execute.
> >
> > > > > > On Oct 29, 1:34 am, Thanasis <[email protected]> wrote:
> > > > > > > Hi again,
> >
> > > > > > > I've just played around with the code trying to reproduce your
> case.
> > > > I
> > > > > > think
> > > > > > > I've found something, but I am not sure...
> >
> > > > > > > First of all, whenever an error occurs during initialization
> (i.e.
> > > > > > > Service.startService()), SMSLib calls the stopService() by
> itself. I
> > > > > > cannot
> > > > > > > understand why you say that the Service instance remains null.
> Unless
> > > > > > you've
> > > > > > > found something, somewhere else.
> >
> > > > > > > However, I've found a case when a fatal error during the
> > > > initialization
> > > > > > of
> > > > > > > the Service (i.e. all gateways) leads to a system halt. That
> is, you
> > > > get
> > > > > > no
> > > > > > > errors or anything and your final call to stopService() remains
> > > > halted
> > > > > > for
> > > > > > > ever. Is this the situation you are talking about?
> >
> > > > > > > 2009/10/28 lionkng123 <[email protected]>
> >
> > > > > > > > custom web-app with SMSLib.
> >
> > > > > > > > On Oct 28, 6:08 pm, Thanasis <[email protected]> wrote:
> > > > > > > > > Are you using SMSServer or you are developing a custom app
> with
> > > > > > > > > SMSLib?
> >
> > > > > > > > > On Oct 28, 9:14 am, lionkng123 <[email protected]>
> wrote:
> >
> > > > > > > > > > When GatewayException occured at that time Service can't
> be
> > > > > > > > > > initialized. So,
> > > > > > > > > > Service instance remains null, service.startService()
> can't
> > > > able to
> > > > > > > > > > intialize. We can stop the service by
> service.stopService()
> > > > method.
> > > > > > If
> > > > > > > > > > service is not being started then we cant call
> stopService()
> > > > > > method,
> > > > > > > > > > it will
> > > > > > > > > > return NullPointerException. We can avoid
> NullPointerException,
> > > > but
> > > > > > > > > > that's
> > > > > > > > > > not the solution to stop the SMS server. Internally it's
> > > > running
> > > > > > and
> > > > > > > > > > keep
> > > > > > > > > > retying...
> >
> > > > > > > > > > On Oct 28, 11:31 am, Thanasis <[email protected]> wrote:
> >
> > > > > > > > > > > There is a "stopService" method - doesn't it do any
> good?
> >
> > > > > > > > > > > 2009/10/27 lionkng123 <[email protected]>
> >
> > > > > > > > > > > > whenever, some gateway exception happened, the
> internal sms
> > > > > > > > (gateway)
> > > > > > > > > > > > server keep running to retry.. how to stop that
> server
> > > > whenever
> > > > > > > > > > > > GatewayException will be occured? Am using
> > > > > > > > > > > > SerialModemGateway gateway = new SerialModemGateway
> > > > > > > > > > > > ("SMS",port,"default","default");
> > > > > > > > > > > > at the time of GatewayException instnce of Serevice
> remain
> > > > > > null...
> > > > > > > > > > > > so, how can i stop the gateway server....??
> >
> > > > > > > > > > > > Thanks.- Hide quoted text -
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SMSLib for Java User Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/smslib?hl=en
-~----------~----~----~----~------~----~------~--~---