The library's notification dispatcher already resides in a different thread. Nevertheless, its a good idea to minimize/decouple your code as much as you can. Threads on your part are a good idea.
About the OOM, please recheck your code. I believe that the OOM is not in SMSLib's application space. I would propose to search the synchronous way a bit more. Try to find where the out-of-memory errors come from, and stick with this method. On Feb 8, 9:23 am, Luis Fernandes <[email protected]> wrote: > Not so heavy as well. When it receives a new message validates the telephone > number in a database, sorts the order, produces the answer once again > consulting the database and then sends the message back. > I thought about using threads when it is dealing with the received message, > in order to release the smslib as it does the job, what do you think? this > way he will treat each request on a thread. > > I tried to call the ReadMessage within 10 seconds and worked well, but only > for two days, two days after the, application(Java machine) was generating > memory errors (OutOfMemory), and stopped working. > I need a solution that keeps the system running 24 / 7 > You do not believe that adding another modem work relieves modem that > already have? > > Greetings > > Luis > > 2010/2/8 Thanasis <[email protected]> > > > > > > > Hi, > > > I assume you are using the latest version(?) > > > Do you have any heavy processing inside your > > IInboundMessageNotification thread? If so, try to lighten this up as > > much as you can. Make your implementation as light as possible and > > move the processing elsewhere. > > If this fails to do any good, you could easily switch to synchronous > > reading for some days (that is, call the readMessages() method > > yourself periodically) and see if this make things more stable. > > > Buying a new modem or a second modem is the last option - this really > > depends on how much messages you receive (and send), your usage > > patterns, how "real-time" you want your service to be, etc. > > > On Feb 7, 11:48 pm, Luis Fernandes <[email protected]> wrote: > > > Hello all, > > > > I use smslib in a internal service, that run in a application. the idea > > is > > > to let the people send SMS to retrieve some information. > > > > i use the IInboundMessageNotification interface to alert my application > > when > > > a new sms arive, and everything works fine, the sistem receive the > > message, > > > make the job a return the message to the customer for the same modem > > > (because i only have one modem connect to this app). > > > > the problem is when many people send messages at the same time, some > > > complain that they do not receive answers, or that the answers come when > > > they try to send again (but then are duplicated, the old and the new > > > request) > > > > What could be the reasons for that ? could be a synchronous method > > problem > > > ? > > > What are the reasons that may be behind this problem? What can I do to > > make > > > to improving this senary? buy a new modem? > > > Set up a modem just for the reception and one for sending? > > > > I already have lots of customers using this service (about 1,000), and > > I'm > > > forecasting an increase of 100% for this year > > > > Best regards > > > > -- > > > Luis Claudiohttp://agentelu.blogspot.com/ > > > +244 923416616 > > > -- > > 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]<smslib%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/smslib?hl=en. > > -- > Luis Claudiohttp://agentelu.blogspot.com/ > +244 923416616 -- You received this message because you are subscribed to the Google Groups "SMSLib User Support 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.
