How to communicate between applications

Is it possible to have one java application cause another java applicalion to go into/out of a sleep or wait state. Both application are on the same machine.
What I am trying to do is have a program which will wait/sleep (using little on no processing power)
untill a database trigger(oracle) or another java program wakes it up.
Regards
Sam

A simple way will be to use communication through sockets. The sleeping aplication will listen to a specific port and when it receives a signal will "wake up".

Similar Messages

  • How to move between applications in Mission Control using non-english keyboard?

    I have recently started using MC and really like it. I prefer doing as much navigation as possible from the keyboard.
    I can do most of the things I want to with MC but I have not been able to find out how to switch between open applcations on the selected Desktop while in MC.
    I have tried searching for a solution online without success. To begin with it would be great if it is at all possible but preferably, it would be something that could be configured by me in System Preferences/Keyboard.
    I would think that other people would want to do somehting similar so hopefully there is a solution.
    Thanks in advance,
    Thor

    Hold down the cmd (⌘) key and briefly press the tab key (⇥) then use the left/right arrow keys to select the application you wish to switch to.  When done release the cmd key.

  • How to communicate between UNI ports?

    Hi
    I have a new  ME3400 series switch with IOS (me340x-metrobase-mz.122-37.SE1), it has 24 fastethernet and 2 gig fiber uplinks
    Now all the ports except fiber uplinks are uni ports by default.
    So can't communicate with each other. Now i wishes to make them communicate while remaining in uni port-type.
    On forums the solution is to declare them as member of community vlan.
    My questions are
    1) can i no shut the secondry vlan interface?
    2) From which pool i have to give ip to my system either from primary vlan pool or secondry vlan pool?
    3) In both cases i can't communicate with the default gateway i.e: the ip of vlan even the port is member of community vlan. so how to communicate them while being in uni ports?
    The sh run of switch is below
    Switch#sh run
    Building configuration...
    Current configuration : 2088 bytes
    version 12.2
    no service pad
    service timestamps debug uptime
    service timestamps log uptime
    no service password-encryption
    hostname Switch
    no aaa new-model
    system mtu routing 1500
    ip subnet-zero
    no file verify auto
    spanning-tree mode rapid-pvst
    spanning-tree extend system-id
    vlan internal allocation policy ascending
    vlan 100
      private-vlan primary
      private-vlan association 101-102
    vlan 101
      private-vlan isolated
    vlan 102
      private-vlan community
    interface FastEthernet0/1
    switchport private-vlan host-association 100 101
    switchport mode private-vlan host
    interface FastEthernet0/2
    switchport access vlan 102
    switchport private-vlan host-association 100 102
    switchport mode private-vlan host
    interface FastEthernet0/3
    switchport private-vlan host-association 100 102
    switchport mode private-vlan host
    interface FastEthernet0/4
    shutdown
    interface FastEthernet0/5
    interface FastEthernet0/6
    shutdown
    interface FastEthernet0/7
    shutdown
    interface FastEthernet0/8
    shutdown
    interface FastEthernet0/9
    shutdown
    interface FastEthernet0/10
    shutdown
    interface FastEthernet0/11
    shutdown
    interface FastEthernet0/12
    shutdown
    interface FastEthernet0/13
    shutdown
    interface FastEthernet0/14
    shutdown
    interface FastEthernet0/15
    shutdown
    interface FastEthernet0/16
    shutdown
    interface FastEthernet0/17
    shutdown
    interface FastEthernet0/18
    shutdown
    interface FastEthernet0/19
    shutdown
    interface FastEthernet0/20
    shutdown
    interface FastEthernet0/21
    shutdown
    interface FastEthernet0/22
    shutdown
    interface FastEthernet0/23
    shutdown
    interface FastEthernet0/24
    shutdown
    interface GigabitEthernet0/1
    port-type nni
    interface GigabitEthernet0/2
    port-type nni
    interface Vlan1
    ip address 192.168.0.1 255.255.255.0
    no ip route-cache
    interface Vlan100
    ip address 10.10.100.1 255.255.255.0
    no ip route-cache
    interface Vlan101
    no ip address
    no ip route-cache
    shutdown
    interface Vlan102
    no ip address
    no ip route-cache
    shutdown
    no ip http server
    control-plane
    line con 0
    line vty 5 15
    end
    Any help will be apritiated and thanks in advance

    njb7ty wrote:
    Create two separate connection pools. Each one has its own url/userID/password to its own database. Example: If both are Oracle databases, you need the JDBC driver jar file in your classpath. You'll have to research how to create a connection pool.That is a pretty specific answer. Certainly inappropriate, for example, if the OP is attempting to just move records. Or compare records.
    Probably ony useful if the OP wants to present to a client data from two databases. But since the OP said "communicate" that seems unlikely.

  • A problem that how to communicate between PLC S7-300 and IA Server

    The PC running the OPC server is connected to PLC S7-300 via the RS232 serial port and the Siemens RS232-MPI adapter (product no. 6ES7972-0CA23-0XA0).
    But I encounter such problem when I create an object(S7_HMI)in IA Server:
    Step 1:
    links:http://www.simwe.com/forum/upload/2005/04/30/87472755.jpg
    Error message:
    Protocol error:Unexpected response from PLC
    links:http://www.simwe.com/forum/upload/2005/04/30/48471774.jpg
    When I communicate between S7-300 and PC by LOOKOUT 5.1,it works well.
    Could someone give me help? Thanks a lot.帖子被qzxin在05-08-2005 04:54 AM时编辑过了
    帖子被qzxin在05-08-2005 04:56 AM时编辑过了

    First of all, Thank You very much for Your answer.
    I'm using the TS Adapter that make the conversion from MPI to the serial bus.
    I have made yet control panels to supervisor systems with Omron PLCs and I correctly use the DataSocket with the DSC module: with Omron PLCs I've never had any problems of communications. The problems is now with Siemens. For the communication between control panel and PLC I have to use the internal modem of my computer and the OPC is S7_MPI of IA opc Server.I wondering if this OPC is ok for modem communications (inside there is a form to insert the phone number of the remote station) or if every kind of modem are compatible with S7-300 modem it has inside.I've noted that my computer modem don't do the phone number when i run the front panel!In running mode, if I take a look to the Block Diagram and I click the "Highlight Execution" button I don't see any animation on the code generated by the HMI Wizard to connect the only one tag to the DataSocket URL.
    Have You any other suggestions to solve the problem?
    Massimo Lazari

  • How to communicate between two servlet applications.

    I want to write a program that the system manager can see who is connecting the server.
    the system manager login the server via the browser with applet.
    the applet communicate with servlet .and the servlet work in the server get the customer message such as username ,Ip address etc from other servlet.
    how to realize it .?
    can you give some advice .
    I appreciate you .
    thank you

    Look at, http://forum.java.sun.com/thread.jsp?forum=54&thread=262144

  • Thread Application - how to communicate between Threads

    I have an array of Threads which will be ran. Each thread is going to be running a child process (Runtime.getRuntime().exec). Certain processes have to be complete before others.
    For instance,
    A relies on no previous steps
    B relies on A
    C relies on both A and B
    D relies on only B
    etc...
    There are about 25 of these and possibly more in the future.
    Is there a way if I have an array to say the thread #1 is done, notify thread #3?

    First of all, you don't need to start a new
    Thread to start other processes asynchronously.
    Runtime.exec() doesn't block for the process to
    finish -- you can use the returned Process object and
    invoke methods on it to wait for it to finish or to
    see if it has finished.
    So unless these threads you're creating are doing
    some other stuff concurrently as well as running new
    processes (which already run in their own threads
    because they are new processes), you're
    over-engineering it.I do not understand what you mean by "you can use the returned Process object and invoke methods on it to wait for it to finish or to
    see if it has finished."
    Can you please elaborate?
    Also, this program will read any one of about 10 configuration files containing these steps and must figure out automatically how to manage them. I can't hard-code for this one Process or Thread to do this and another to do this.
    Also, the Thread is going to do more than just running the runtime.exec thing, it has to write to some files as well.

  • How to Communicate between servers and Overwrite the file

    Hi,
    I have this application where in a config file is modified as per the data entered by the user through some jsps.
    Also, this application is also loaded on other server which may act as backup when the primary goes down.
    Now,my issue is:
    As soon as the file is modified i want to overwrite all the backup files on other backup servers, so that sync is maintained between all the files on all servers.
    i guess the communication between primary & backup servers could be done using RMI.
    I have gone through RMI tutorial & few examples on RMI but i'm not very clear where exactly the interface,impl and client program goes.
    i mean how does this actually work in a real time.
    Please could anybody shed some light on this.I would really appreciate.
    Thanks!

    Hi all can some one please give a solution ...Any suggestions would be greatly appreciated

  • How to communicate accross applications in different application domains using SWFBridge

    Hi,
    I have a Flex portal application that loads two sub-applications as siblings as such: Different application domains but same Security Domain
    var loaderContext1:LoaderContext = new LoaderContext(); 
    loaderContext1.applicationDomain = new ApplicationDomain();//new app domain
    /* sub-application 1*/
    swfLoader1 = new SWFLoader();
    swfLoader1 .loaderContext = loaderContext1;
    var loaderContext2:LoaderContext = new LoaderContext(); 
    loaderContext2.applicationDomain = new ApplicationDomain();//new app domain 
    /* sub-application 2*/ 
    swfLoader2 = new SWFLoader();swfLoader2.loaderContext = loaderContext2;
    But the host application (which is in a different application domain), needs to receive data from the first sub-application and pass it to the second sub-applicaiton.
    I heard about the SwfBridge and Shared events but I am not sure how to use it. I can't find documentation on how to implement it.
    Any direction or feedback woul be very helpful.
    thank you.
    Regards,
    /Fatima

    Hi,
    Thanks for your post. The app I want to cmd-tab to is on screen at the other desktop. I've tried again using 7 different applications and this problem persists in all of them, so I still need to use a multi-touch gesture (or ctrl-right arrow).
    Just to be clear, when I press cmd+tab to change into iTerm, for instance, I can see iTerm in the menu bar next to the apple, but Lion won't change into a different desktop or show me the iTerm windows.
    Edit: thank you captfred ! It was in front of me.

  • How to communicate between threads?

    When I create six clients, the server create six threads to match them. Five of the clients are connected to the server and one of them is waiting for connection. Later, I quit the client 4. The client 6 should be replaced the client 4 for connection. However, in the server side, how does the thread 4 send the message to tell thread 6 to replace its position when the client 4 quits? Any hints? Thanks!

    Yes I use linkedlist to store the threads. Every time a new thread is created, I assign a number to them such as client 1 assign 1, client 2 assign 2...... My server allows only five clients to connect to it. The extra clients need to wait until one of the client quits. However, I don't know how to replace the client 4 by client 6. Because all the clients are assigned a number. They can't change the number. For example, even if the client 4 is removed and the linkedlist remains 5 elements, the number of the client 6 is still 6. It does not change to 4. That means it still wait for connection. It never ever connect to the server. How can I solve this problem?
      public void runServer() {
        try {
          while (true) {
            // Step 2: Wait for a connection.
            threads = new ServerThread(this, server.accept());
            clientList.add(threads);
            client = (ServerThread) clientList.getLast();
            client.start();
        catch (EOFException eof) {
          System.out.println("Client is disconnected");
        catch (IOException err) {
          err.printStackTrace();
      }

  • Please help!! How to communicate between applet and pop up dialog box

    Hi friend,
    I have done a AWT pop up dialog box from Applet. In this pop up dialog box, I want get user name, and display on an Applet, anyone can tell me how to do? Thanks a lot!!!!
    Alva

    You need to create two methods in your applet, getName and setName as well as a name field.
    private name = "";
    public void setName(String n)
        name = n;
    public void getName()
        return name;
    }The various constructor methods for Dialog already take the owner of the Dialog (your applet) as a parameter, so in your applet's ActionEvent handler, all you have to do is call
        name = textName.getText().trim();
        owner.setName(name);Yes, it's that easy.

  • How to communicate between Flex and JSP and show the result in an Iframe

    Hi all
    I am trying to send some data from flex to one HTTPService and trying to show the same response jsp in an Iframe. But unfortunately i am unable to get the responce Jsp's url to set as a source for iframe.
    let me explain you clearly...I have a mxml where i am having a text box and a button in the left panel and in the right panel i am having an Iframe to display jsp. So once user enters some value in the text box and clicks button then HTTPservice's send method will be called with text box's content as an arguement. So i can fetch that value from request object in jsp and display the value in jsp. So the problem here is i want display that result jsp in my Iframe. I know that , we need that result jsp URL to display in Iframe . But as i am sending POST request to HTTPservice, i am not able to get the result jsp's URL in flex side.
    So i need help desperately from great minds.So anyone of you can give me some suggestions!!!!
    Regards

    Hi all can some one please give a solution ...Any suggestions would be greatly appreciated

  • How to communicate between JSPs?

    I have three JSPs say Test1.jsp, Test2.jsp and Test3.jsp. Test1.jsp does something and includes the control to Test2.jsp (jsp:include). Test2.jsp does something else and forwards Test3.jsp (jsp:forward). Now Test3.jsp wants forward back to Test1.jsp to the place from where it left not execute from start to bottom.
    Is it possible?
    Thanks in advance
    Thara

    Unfortunately, the way the processing is being done, what you are asking for is not possible. Once a request is forwarded to another resource, the current resource loses focus and control. Next time it tries to run, it will run from start to finish.
    In your scenario, why not include Test3 in Test2, which is itself included in Test1. This way, the following will happen:
    Test1.jsp
    Test1 start
    include Test2
    //once Test2 is done, it will return and continue from the next line
    more test1 code
    Test1 end
    Test2.jsp
    Test2 start
    include Test3
    //once Test3 is done, it will return and continue from the next line
    //since the next line is the end of Test2, no further processing
    //will be done and control will return to Test1 @ "more test1 code"
    Test2 end

  • Can't communicate between JS and ExtendScript

    I tried this: (according to the docs it should work)
    In JS
    var csInterface = new CSInterface();
    csInterface.evalScript('$.test()', function(r){console.log(r)})
    In JSX
    $.test = function() {
                       alert("test");
                        return 65656;
    I'm seeing the alert, but the logged statement is empty. Anyone know how to communicate between the two?

    I tried a few ways but the only way I could do it properly was pretty involved:
    1) Use Socket.io to communicate between generator and extension
    2) When you want to raise an "event" from JSX, update generator settings, use a unique id for your event
    3) Parse the event in generator
    4) Emit the event from generator to extension.

  • E4200 - Problem communicate between 2.4 & 5ghz devices

    Hi,
    i have E4200 smart wifi and this is updated to latest firmware.
    i connect satellite reciever to 2.4ghz network and connect computer by linksys AE1000 to 5ghz network ... but in this case can't communicate between computer & satellite reciever .
    also i ping satellite reciever ip address from computer but not pinged ...
    but if i connect both satellite reciever & computer to 2.4ghz network problem resolved & both device communicate between other ...
    how can communicate between 2.4ghz and 5ghz network devices connected to E4200 smart wifi ...?
    sorry for bad english.........
    THX.

    This shouldn’t be an issue. Upgrade the router’s firmware to the latest. Reset the router to factory defaults and reconfigure the router after the upgrade process.

  • How Bridge communicates with third party applications?

    Hi,
    Is it possible to communicate between Adobe Bridge and a third party application using Bridge SDK?
    I want to learn how Bridge can communicate with other application? Bridge SDK have samples that explain how Bridge communicates with other Adobe applications like Photoshop and Indesign. Can anyone guide me or provide me a sample where Bridge communicates with a third party application?
    Thanks.

    As an example, this shows one way of getting a list of selected files from Bridge via Photoshop using C#
    using System;
    using System.Collections;
    using ps = Photoshop;
    namespace getBridgeFiles
        class Program
            static void Main(string[] args)
                ps.ApplicationClass app = new ps.ApplicationClass();
                String Code = "var fileList;"+
    "if ( BridgeTalk.isRunning( 'bridge' ) ) {"+
    "var bt = new BridgeTalk();"+
    "bt.target = 'bridge';"+
    "bt.body = 'var theFiles = photoshop.getBridgeFileListForAutomateCommand();theFiles.toSource();';"+
    "bt.onResult = function( inBT ) { fileList = eval( inBT.body ); }"+
    "bt.onError = function( inBT ) { fileList = new Array(); }"+
    "bt.send(8);"+
    "bt.pump();"+
    "var timeOutAt = ( new Date() ).getTime() + 5000;"+
    "var currentTime = ( new Date() ).getTime();"+
    "while ( ( currentTime < timeOutAt ) && ( undefined == fileList ) ) {"+
    "bt.pump();"+
    "$.sleep( 100 );"+
    "currentTime = ( new Date() ).getTime();"+
    "}}"+
    "if ( undefined == fileList ) {"+
    "fileList = new Array();}"+
    "fileList = decodeURI(fileList.toString());";
                String RC =  app.DoJavaScript(Code, null, null);
                ArrayList list = new ArrayList();
                list.AddRange(RC.Split(new char[] { ',' }));
                for (int index = 0; index < list.Count; index++){
                    Console.WriteLine(list[index]);
                Console.ReadLine();

Maybe you are looking for

  • Install downloaded software other than on C: drive

    I purchased this morning and downloaded the latest 64 bit version of Elements and Premiere to my E: drive (C: drive has Windows Ultimate 7 64 bit only). I have six files downloaded - one Application file and 7zArchive file set each for Photoshop Elem

  • How do I properly set up Live Previewing (Brackets)

    I just recently came across Bracket and I am super excited about it and can't wait to dive in. My problem right out the gate is I can't for the life me configure the Live Previewing to work properly. That is why I am here. I have read Here is what I

  • Border around Label?

    Hi all! How to I draw a border around a label? I appreciate your support and insight! Best regards, -Tony

  • Portlet Screen Chaining Problem

    Hi all, I've made a PDK-java portlet that is identicle to the multipage portlet example using JDeveloper. The portlet shows up fine on the page; however when I click on the "second page" link, I get the javascript error "Object expected". Reviewing t

  • How to save Recovery Partition before RAID?

    Tomorrow I will receive from a prominent online merchant that starts with an A, my niew 2011 Mac Mini Server.  Can't wait.  I have used one at work at they are great.  Furthermore, I also put hte one at work into RAID 0, which is great too. I plan to