aspose file tools
The moose likes Java in General and the fly likes Need some guidance on how to send messages from a GSM modem on user  request. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Need some guidance on how to send messages from a GSM modem on user  request." Watch "Need some guidance on how to send messages from a GSM modem on user  request." New topic
Author

Need some guidance on how to send messages from a GSM modem on user request.

krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Hi everybody, I am Krishna, I am working on a GSM application. The aim of this project is to send messages to mobiles on request. Somewhere a user will be requesting for some details in a specified format say "RESULT ROLL_NUM" for his/her results.

As soon as the message is received the java application will read the message and save a record in the database.

Up to this I have done.

Now the thing is I need to send the reply. All details will be saved in the database. What I want to do is I want to write an entirely new application which continuously looks into the database for any new records. As soon as it finds a new entry it must build the necessary reply and text the sender.

I can write this whole code in the Reader application itself, but due to performance I want to shift it to an entirely another program.

Is this the right way? Or I should code the entire thing in one application.


Thank you all in advance. Have a nice day.


There is no rule that we all should know everything. Lets learn few things of everything here.
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Hmm an application that continuously checks the database seems a big performance problem to me. Maybe making it a timed batch job and running it once per half an hour might make more sense. But you'll have to somehow remember, what was the last record you looked up in the database.

If time is an issue, find a way for a database trigger to start your separate program on records inserted into DB.

Regards,

Martin

SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
For this I have to write something like a database listener, can anybody please tell me how to do this?

Thank you all in advance.
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
That depends on your databaes. Chack its documentation
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Hi Martin, I am using MySql database. Can you please tell me in some detailed way on how to do this.

Thank you in advance.
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
Hi Krishna,

Info about triggers can be found here. Something about invoking Java is here.

The Java part seems somewhat experimental ...

Have you given any thought of running your program in intervals? 5 minutes or so should suffice. You can set timed executions of your code in Windows or Unix/Linux enviroments.
krishna Karthikk
Ranch Hand

Joined: Mar 16, 2010
Posts: 92
Hi Martin, thanks for your help from beginning. I have refered the links you have posted. Truly speaking, I did not understand the content there.

I want to try my level best. In the worst case I am thinking to go for a timed batch job.

Anyhow thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need some guidance on how to send messages from a GSM modem on user request.
 
Similar Threads
Problem regarding sending message from a GSM modem
Need a best messaging Solution
Need help on Database TABLE Listener
Database connection
JSP to HTML on serverside