Starting a thread from a modem message

I would like to start a thread that parses an incoming text message from a GSM modem when the message arrives. Ideally the arrival of the message should trigger the process to start... Anyone got any tips on triggering the start of a thread from a modem event and/or how to read incoming data directly from a modem?
Just some initial pointers to the right kind of classes would be great to prevent me chasing down too many blind alleys...
Dave

Hi David,
Are you able to do what you intended to do ??. If so can you shed some light to me ??. I have a similar requirement same as like you had.
thanks,
---sen.

Similar Messages

  • Starting new threads from a servlet

    Hi
    I read somewhere that starting new threads from a servlet is not supported in the future releases of J2EE .
    Any one aware of this.
    I have a listener program started as a new thread from the init method of a servlet which is set to load on startup.
    I have to think about another way to do this if this is not suppported in the future releases
    any comments

    Dr clap
    Actually I was getting some warning messages in my websphere server console when I tried to make JDBC connections from the thread I opened in the servlet.
    Everthing works fine but with the warning messages,
    Then someone from IBM answered me in one of the forums quote
    Cause: These messages are being produced due to an
    "unsupported" environment. When application is
    spinning its own threads from an EJB, spinning a
    thread and accessing a database is not supported (per
    the J2EE specification). One exception to this rule is
    if a Servlet is spinning its own threads and accessing
    a database. The J2EE specification is not clear on
    this, so WebSphere Application Server 5.0 must allow
    for it at this time. IBM is working with Sun to
    clarify this in the specification, so eventually (i.e.
    J2EE 1.4) spun threads from a Servlet accessing a
    database outside of a transaction will not be
    supported either.
    Since we don't want to promote the usage of these
    "naked" threads accessing databases, we are producing
    the warning messages. Although they may be filling up
    the logs, we feel that these are necessary to warn the
    user that they are doing something not in-line with
    the intended usage. Customer should consider changing
    their application to comply with the
    J2EE specification.
    """

  • Starting new threads from within shutdown hooks

    I'd like to discuss this statement from the java 6 API:
    "A shutdown hook is simply an initialized but unstarted thread. When the virtual machine begins its shutdown sequence it will start all registered shutdown hooks in some unspecified order and let them run concurrently. *When all the hooks have finished it will then run all uninvoked finalizers if finalization-on-exit has been enabled. Finally, the virtual machine will halt*. Note that daemon threads will continue to run during the shutdown sequence, as will non-daemon threads if shutdown was initiated by invoking the exit method. "
    Now, my question is this: If I have a hook that starts a new non-daemon thread and then goes on to complete it's run() method, will the JVM finalize and halt? Or will it wait for my new thread to complete as well?
    I trust the specification, and believe that the JVM will either not allow me to create the thread or will finalize and shutdown even if it is running. However it's not explicitly stated anywhere, and I think that it's a hole in the documentation.
    I'm going to write a test case for this now. But chime in if you have thoughts.

    This is what happens if you start a new thread from a shutdown hook and do not wait for it to finish:
    public class ShutdownTest {
        private static class Shutdownhook extends Thread{
            public void run() {
                System.out.println("Shutdownhook starting");
                Thread t = new Thread(){
                    public void run(){
                        System.out.println("Thread successfully started");
                        try{ Thread.sleep(5000); }
                        catch(Throwable e){ System.out.println("Throwable from sleep: "+e); }
                        System.out.println("Thread successfully finished");
                t.start();
                //try {t.join();} catch (InterruptedException e) {}
                System.out.println("Shutdownhook completing");
        public static void main(String[] args) {
            Runtime.getRuntime().addShutdownHook(new Shutdownhook());
            System.out.println("Exiting from main()");
            Runtime.getRuntime().exit(0);
    Exiting from main()
    Shutdownhook starting
    Shutdownhook completing
    Thread successfully startedHowever, as you might expect, if you join() or wait for the thread's isAlive() to return false, you will be able to complete the thread.
    I'll leave someone else to figure out if that new thread gets finalized and if finalizers on exit is on, what happens. Mostly because it doesn't matter for my purposes.
    Enjoy

  • TS4268 Missing Phone Number at "Start new conversations from"

    How come there is missing of the phone number at the "Start new conversations from:" inside Settings -> Messages -> Send & Receive" and only have the e-mail address but both of the phone number and e-mail address under "You can be reached by iMessage at:", please advise how to add it back ?

    Yes, I have solved it.  You could try to go from Settings -> Messages, turn the iMessage from ON to OFF, then you switch off your iphone and turn it on; go back to Settings -> Messages, change the iMessage from OFF to ON, then switch off your iphone and turn it back on, go to check whether you could see or add back the phone number assoicated with the iMessage.   Good Luck !

  • Threads from threads

    hi,
    just wondering if it's ok to start a thread from within another thread?
    e.g. mythread extends runnable
    run{
    mySubThread sub = mySubThread();
    sub.start();
    }

    Everything in java is running in a thread. Therefore the answer to your question is YES.
    matfud

  • Multiple message threads from same person

    I have multiple message threads from the same person in messages on my iPhone and iPad. One comes from their phone number and one from their email. Here are all the details, I would love to be able to combine them into one thread.
    This other person and myself each have a new MacBook Pro, iPad Air 2, I have an iPhone 6 and they have an iPhone 5S. They are all updated with the most recent system software.
    On my MacBook Pro, the conversations that are split on my iPhone and iPad are not split. On the MacBook Pro, all of the texts from both conversations are appearing in one. In my contacts which are syncing with iCloud I have both the phone number and email address of this other person.
    I have messages set up on all of my devices to send and receive from my phone number and my email, start new conversations is from my phone number. This other person has it set up the exact same way on all of their devices.
    So why when I text this person from one conversation thread and they respond it comes through to the other conversation thread?
    Why can't I seem to join these two conversations when everything is set up the way it should be and they ARE joined on my MacBook Pro but not my iPhone and iPad?

    She kept the same number on her new phone, but now there are 2 conversation threads. A new one started with messages sent from the new phone, the old phone should be out of service now. Why didn''t  messages sent by the new phone resume in the same conversation? I assume because it's a different IMEI.  But now whenever I use her  phone number to create a new message, it goes in the old IMEI*'s conversation thread and is therefore not delivered. It's in green so it thinks it's an SMS also not a iMessage device.
    If I want to send a message correctly  to the new phone, I have to make sure I  go into the correct newer thread and enter it there,
    For your second answer, the person is receiving the message but the thread now says "email address", not the person's name in the contact list. The sender is sending to the person's phone number, not her email address.

  • Hi Friends... I'm trying to delete a back-up file on mu TC but I get the message "The operation could not be completed because the item "bands" is in use. I'd like to start the Back from scratch, could help me out with deleting the current file?

    Hi Friends...
    I’m trying to delete a back-up file on mu TC but I get the message “The operation could not be completed because the item “bands” is in use. I’d like to start the Back from scratch, could help me out with deleting the current file?

    Sorry, I am very confused. I asked the following question....
    Is this the only backup file on your Mac, or do you have other backup files and data on the Time Capsule disk?
    The answer that you gave was....
    This is the only one
    Now you are saying that....
    But I have lots of other files on Time Capsule! The back up file is only one of them.
    Can you clarify, please?

  • I keep getting the message, "Windows cannot find 'c:\Program Files (x86)\Mozilla Firefox\firefox.exe'. Make sure you typed the name correctly, and then try again." I get it when I either try to open it from the Start menu or from the desktop icon.

    I've just installed Firefox on my laptop and keep getting the message, "Windows cannot find 'c:\Program Files (x86)\Mozilla Firefox\firefox.exe'. Make sure you typed the name correctly, and then try again." I get this message whenever I either try to open it from the Start menu or from the desktop icon. I've never gotten it to work and even uninstalled it and then redownloaded it and still cannot get it to open. Any help would be greatly appreciated!!!!

    Are you installing from the official site? http://www.mozilla.com/firefox
    If you use Windows Explorer (My Computer) to check that path, is the Mozilla Firefox folder there? That is the normal installation location, but I think it's worth checking.
    If the folder isn't there or firefox.exe is not in it, I wonder whether some other software might be interfering. You might want to run some supplemental security scans. These two tools are highly regarded:
    Malwarebytes Anti-malware : http://www.malwarebytes.org/products/malwarebytes_free
    SUPERAntiSpyware : http://www.superantispyware.com/

  • Is there a way two start a new thread from a BLS to do some background work

    Hi all-
    I am thinking about creative ways to do offline processing...  Our MII app loads a list of current orders for the user's browser.  The user selects an order and requests back to MII for running the SAP transactions.  Then their browser is reloaded with the up to date list again.  When SAP is down they cannot process.
    Certainly a traditional store and forward where all data is loaded to MII and transaction requests are queued up to be processed by MII/SAP in the background is possible. Con: Data synch issues are very complex however.  Pro: It does provide excellent response time to the user.
    I am just noodling about options... 
    >>Is there a way to start a thread that could take the XML output going to the web page and store that in the database in the background?  I.E.  release the data to the irpt and terminate the user's BLS while a background BLS is saving a copy of the XML/orders to the database.
    Then when offline, the user can work from the last current list of orders they had.  When SAP comes back up the system goes back to online operation.  Thus the data sync would only be temporary.  It does not have the response time benefit however.  Maybe some more thinking, ...But I really want to know if there is a way to multi-thread this app.
    Thanks,
    --Amy Smith
    --Haworth

    I assume you're still running 12.0?  12.1 introduces a new action block for transaction calls, which allows for async threads to nested transaction calls.
    I don't know how using query caching would work on the XacuteQuery template for your list of orders - especially when it would attempt to renew the cache when SAP was unavailable.
    An XML file periodically saved to the web tab of your project would also provide you with a cache approach to servicing the user screen - a simple point of abstraction.

  • HT201210 trying to download an instal ios 7 on my iphone 4s, after half an hour into the download it came up with a message saying failed and everytime i try again the download doesnt start. tried downloading from itunes aswel but not working. anyone know

    trying to download an instal ios 7 on my iphone 4s, after half an hour into the download it came up with a message saying failed and everytime i try again the download doesnt start. tried downloading from itunes aswel but not working. anyone know why?

    The servers are overloaded. There are a hundred million people all trying to download iOS 7 at one time. Try again later

  • Messages - missing 'Start New Conversations From'

    Have an iPhone 4 that I am attempting to use without cellular service.
    Am able to use Facetime but am having a problem with Messages.
    In the Settings > Messages > Send & Receive the phone does not display the 'Start New Conversations From' section.
    I am unable to send from Messages. I assume these two items are related.
    I've tried resetting the phone, using a different apple id / icloud account, all to no avail.
    Any ideas?
    TIA

    This worked for me.  Turn off iMessage in Settings---> Messages. Then turn off iPhone. Restart iPhone then turn iMessage back on.   The phone number should reappear.

  • Recently my iPhone 4 has started to delete the content of messages as soon as I open them and also is changing the names of some of my contacts from the name that I give them to their email addresses and all of this is without any input from me help!

    My iPhone 4 has started to delete the content of messages automatically as soon as I open them and is also changing some of my contact names from their names to their email addresses. Help!

    I've had the same problem with the names being changed to email addresses.Did you ever find out how to stop this ?

  • Can't start Thread from modal JDialog.

    Hi,
    this is a part of my code. I can't start the scanThread from the object WaitingDl. But if i close the modal JDialog (WaitingDl) the scanThread starts, please help:
    Thread scanThread = new Thread() {
    public void run() {                       
    // do something ....
    WaitingDl waitFrame = new WaitingDl("Waiting process", parent, scanThread, "Please wait ...");
    class WaitingDl extends JDialog {
    public WaitingDl(String title, JFrame parent, Thread thread, String waitingText) {  
    // a modal Dialog
    super(parent,true);
    // This command doesn't work!
    scanThread.start();
    Thanks!

    Hi,
    As suggestion :
    I think your JDialog is modal and visible by default, so
    when you invoke the contructor :
    WaitingDL d=new ......
    you enter to "modal state" so the Event thread is blocked and this append when you invoke super at
    contructor level.
    If you set your dialog not visible you can do :
    WaitingDL d=new .........
    // at this moment the contructor is invoked but the event thread is not blocked so your thread is started
    d.setVisible(true);
    // at this point the dialog is visible you enter at a modal state but your thread is running
    Hope this help
    Bye

  • Start a new thread from JSP ???

    suppose my JSP code is like this,
    <%
    Obj.heavyProcess();
    %>
    How can I start a new thread to do
    out.println(" ");
    out.flush("");
    while the heavyProcess is going on? I need to do this because my ISP will cut any Idle connection after certain time and my heavyProcess takes a long time to finish.
    for certain reasons, I can not do waiting page, refreshing, etc.

    The same way as you would from a normal java application. Write your thread class
    package com.yourpkg;
    public class YourHeavyProcess implements Runnable{
       private YourObject obj;
       public YourHeavyProcess(YourObject obj){
                this.obj = obj;
       public void run(){
           obj.heavyProcess();
    }and create and invoke this thread from your jsp.
    <%
            YourObject obj = new YourObject();
            Thread t = new Thread(new YourHeavyProcess(obj));
            t.start();
    %>
    out.println()..;
    out.flush()....;Note that the thread cannot write anything to the output stream as the response is over and done with. It can only perform backend tasks (like data archival for instance)
    You could consider using a Timer and a TimerTask class which provides a slightly higher abstraction layer over threads . Look at [url http://forum.java.sun.com/thread.jspa?threadID=758874]this  post (reply 48) for an example.
    And finally you wouldnt want a large number of threads to be generated and competing for cpu time on your web server (whose primary responsibility is to receive http requests and send responses). You can use a thread pool to manage the number of threads spawned by your application. If you use java5, take a look at the [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executors.html]java.util.concurrent.Executor class for thread pool implementations that you can use off the shelf.
    cheers,
    ram.

  • Imessage sends messages from email despite selecting phone number for "start new conversations from"

    On both my phone and my computer I have selected to start new conversations from my phone number, but just now I continued a conversation from my macbook and it sent it from my email address instead of my phone number! All the other answers I found for this question were outdated, I couldn't find "Caller ID" in settings for iOS 8 or Yosemite.

    If this is a continuing conversation, I don't believe the device looks at it as a new conversation, which is what that setting is for, from what I understand. If there is a checkmark by the phone number on all devices, then it should start there, but if the conversation was originally started from the email, I believe it will continue until you start a new conversation.

Maybe you are looking for

  • Ipod continuously turns on then off and makes clicking sound

    Just today, after plugging my ipod into my computer and transferring voice memos, I unplugged my ipod and as soon as I did that, it shut down and began its continuous loop of turning on and off. It never fully boots up. Can anyone help me out with wh

  • Problems with battery life post reset and 12070 wi...

    Hi I have been trying to get my Lumia 800 battery life to decent levels but even with a hard reset and the 12070 update my battery with 3g turned on struggles to last 12 hours even without use. I have tried just about everything but when I turn 3G of

  • Cd burn volume

    Hello all! my iTunes has all of a sudden 'remarked' that it can't find certain songs from my library after synchronizing my ipod - they were all the last songs in 15 different albums. after that while trying to re-copy those songs it begun to copy au

  • S. O. S.

    I am builiding this tiny interactive program. All of the background is .swf animations, so the idea is that you are in a menu (Flash scene) and when you push a button it is referenced to the transtion (another Flash scene) and then the end action of

  • MSI Install - Service Startup Causing a Boot Loop?

    Windows 7 I created a service executable in C++ and made an MSI with InstallShield 2014. I added the needed runtimes for the service and go through the MSI install process. Service starts fine, works great, everything is behaving as expected. I initi