Simultaneous Execution in Java

I am working on a project which involves simultaneous execution for simulation.
A brief description about the project:
==============================
Consider a network with 'n' nodes in it. In this network each node sends data to the other nodes that it can reach. Assume that nodes in this network can send to data to nodes which are distance 'd' from it.
Now, if node 1 has two nodes node2 and node3 in its reach, it sends its data to those nodes. Not node 2 and node3 start sending data to those nodes that it can reach.
(Note: Node2 and Node3 has to send data simultaneously to the nodes that they can reach)
You can visulize this execution as a tree.
I have never worked in Java Java Concurrent Programming. Could any one please suggest me any kind of framework that i can use for this problem.

Can you do the following?
      1       (Time 0)
   2      3   (Time 1)
4   5  6   7 (Time 2)At Time 0, you process 1-2 and 1-3, sequentially. Then, the time becomes Time 1.
At Time 1, you process 2-4, 2-5, 3-6, and 3-7, sequentially. Then, the time becomes Time 2.
And continue the process as needed.

Similar Messages

  • Simultaneous execution of JREs

    Good morning,
    I am trying to see under which conditions do I receive the error message "Java was started but returned exit code=1".
    Sometimes I receive this error code when trying to execute more than one Java virtual machine. Also this happens when trying to set the Xmx, Xms and MaxPERMsize parameters to a GB-order size.
    Can somebody tell me where could I find which conditions are evaluated by the virtual machine in order to launch such error messages? So I could know under which circumstances could my java software be executed over Windows 32 and 64 bits.
    Or at least, does somebody know how could I contact the Java personell and ask them directly (by means of money, of course).
    Kind regards.

    Thanks for the response.  I implemented the notifiers and it seems to have partially fixed the problem.  Now when I run the VI it updates the amplitude on every iteration of the for loop.  The only problem that I have now is that the while loop that houses the "simulate signal" block stops execution immediately after the amplitude has been updated.  My goal is to get the signal to continuously run while updating the amplitude in real time so that I can watch the waveform change.  Currently it will update the amplitude, then freeze the waveform with the updated amplitude and subsequently wait for a new amplitude to be passed before updating again.  I'm assuming this occurs because of the "wait on notification" block that is used to receive the notification from the for loop.  Is there any way to either modify these notifiers to allow for a real time passage of data and simultaneous execution of the while loop, or is there some other type of data passing method that would work better to achieve that end?  I have attached my updated VI as a VI snippet like you suggested.  Thanks for the help!
    Attachments:
    Amplitude Stepping.png ‏99 KB

  • Help needed for building report with execution method Java Concurrent prog

    Hi,
    I have saw a report like this:
    The report has executable "XML Publisher Data Template Executable", short name as "XDODTEXE", application "XML Publisher",execution method "Java Concurrent program". Also the report has a XML publisher Data Template and Data definition and in the data definition a .xml file is attached.
    I could not understand what is the data source?
    Could anyone help me on how to build or update this type of report?
    Is there any link or help docs which has proper step by step procedure to build this type of xml publisher report?
    Please help.
    Thanks.

    The xml file which is attached to the data definition is the data source and it has sql queries and structure of xml file.
    Check this out for step-by-step guidance.
    http://www.oracle.com/technetwork/middleware/bi-publisher/overview/xmlebsrep-132947.pdf
    http://apps2fusion.com/at/ps/51-prabhakar/262-xml-publisher-and-data-template-sql-query-to-develop-bi-publisher-reports
    For more on data templates refer user guide
    http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e12187/T421739T434255.htm

  • Creation Of Custom Queries of Execution Type Java.

    Hi All ,
    I want to know if I can create Custom queries of Execution type java which have Query Executor class.
    I got this requirement because I got to customize "Search Master Agreements and Agreements".
    It seems like it's not possible as Query Executor Class is uneditable so no chance of deploying any class file in server and trying out the ways...
    Any approach exists to customize these type of queries.?
    Regards,
    Uday

    Hi
    I understand your requirement is to customize Search Master Agreements and Agreements query and display the new custom report in the Contract Management dropdown on workbench along with other queries.
    This could be achieved by duplicating original query  i.e.Search Master Agreements and Agreements, customize and save it, go to Query Group in set up, identify  and open the query group containing the original query and add the new customized query as query reference.Also don't forget to remove the original query from the query list.
    Regards
    Mudit Saini

  • The system variables in java, NEEDED ONLY at CLI execution of java programs

    The system variables in java, NEEDED ONLY at CLI execution of java programs, and NOT needed at all[essentially] if I install bundle(14+6.7)?
    if I install bundle(14+6.7) to run-test a web app with netbeans 6.7 what I must press, then opens the default browser? I have to be online,...? How I test browse my project?

    Probably a complete tutorial on all possible environment variables in addition to a tutorial on netbeans configuration.

  • How to use Save Point in Batch Execution of  java transaction updates .

    HI.. ALL
    This is going to be very important to all and if needed history should be rewritten...
    Does any one.... Any one has ever thought of Execution of a Batch - jdbc using Save Points Concept ???
    If this has been ever implemented than I am sorry for my comments..
    If NOT---
    Then any one has idea or code or any thoughts or alternatives for this... This goes like this-->
    If we have a batch file which has All Inserts , Updates and delete statements and we are reading that file in java program and executing the file in a batch execution.. Now java provides only 2 option 'START AND END' for batch execution. But ever dreamed about having Save Points in execution of a batch ?
    You might be thinking why Save points needed in batch? if any one wants to have save points then they can go with normat step by step execution of the jdbc calls Why in batch ?
    Trust me this is very important in various areas of development which will bring an ease of writing the program efficently..
    Does any one have any idea in this regard of having SavePoints in batch execution is highly welcome.
    Thanks
    wahed
    Edited by: wahed on Aug 8, 2008 12:53 AM

    If your database supports SAVEPOINT savepoint_name sql and ROLLBACK [WORK] [ TO [ SAVEPOINT ] savepoint_name] sql, you can try to add those sqls into your sql batch.

  • Probleme execution class java in the process flow

    when i try to execute a simple process flow contain process java i have this message error can somme one help please
    RPE-02229 : Les informations de débogage suivantes ont été collectées :
    RPE-02230 : Informations de débogage : os.name = Windows XP
    RPE-02230 : Informations de débogage : os.version = 5.1
    RPE-02230 : Informations de débogage : os.arch = x86
    RPE-02230 : Informations de débogage : user.name = younes
    RPE-02230 : Informations de débogage : user.dir = D:\app\younes\product\11.2.0\dbhome_1\owb\bin\win32
    RPE-02230 : Informations de débogage : argv.cwd = E:\JavaApplication1.jar
    RPE-02230 : Informations de débogage : argv.arg0 = java
    RPE-02230 : Informations de débogage : argv.arg1 = -classpath
    RPE-02230 : Informations de débogage : argv.arg2 = E:/JavaApplication1.jar
    RPE-02230 : Informations de débogage : argv.arg3 = main
    RPE-02230 : Informations de débogage : HOMEDRIVE = E:
    RPE-02230 : Informations de débogage : DISCOVERER_ALLOW_DB_CONNECT_STRING = YES
    RPE-02230 : Informations de débogage : SERVICE = axadw
    RPE-02230 : Informations de débogage : TMP = E:\DOCUME~1\younes\LOCALS~1\Temp
    RPE-02230 : Informations de débogage : MODE = -startup
    RPE-02230 : Informations de débogage : OWBCC_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : SystemDrive = E:
    RPE-02230 : Informations de débogage : RTHOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    RPE-02230 : Informations de débogage : CommonProgramFiles = E:\Program Files\Fichiers communs
    RPE-02230 : Informations de débogage : OWB_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : USERDOMAIN = KAIOUCHE-YOUNES
    RPE-02230 : Informations de débogage : ALLUSERSPROFILE = E:\Documents and Settings\All Users
    RPE-02230 : Informations de débogage : RTUSER = OWBSYS
    RPE-02230 : Informations de débogage : ORA_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : SystemRoot = E:\WINDOWS
    RPE-02230 : Informations de débogage : APPDATA = E:\Documents and Settings\younes\Application Data
    RPE-02230 : Informations de débogage : SADATADIR = D:\OracleBIData
    RPE-02230 : Informations de débogage : Path = D:\app\younes\product\11.2.0\dbhome_1\bin;D:\app\younes\product\11.2.0\dbhome_1\jre\1.4.2\bin\client;D:\app\younes\product\11.2.0\dbhome_1\jre\1.4.2\bin;D:\app\younes\product\11.2.0\dbhome_1\owb\bin\admin
    RPE-02230 : Informations de débogage : PROMPT = $P$G
    RPE-02230 : Informations de débogage : FP_NO_HOST_CHECK = NO
    RPE-02230 : Informations de débogage : SAROOTDIR = D:\OracleBI
    RPE-02230 : Informations de débogage : HOST = localhost
    RPE-02230 : Informations de débogage : PROCESSOR_ARCHITECTURE = x86
    RPE-02230 : Informations de débogage : LOGONSERVER =
    KAIOUCHE-YOUNES
    RPE-02230 : Informations de débogage : CLASSPATH_LAUNCHER = -classpath Personalities.jar;;;..\admin\;..\admin\launcher.jar -DOWB_HOME=D:\app\younes\product\11.2.0\dbhome_1 -DJDK_HOME=..\..\..\jdk -DORA_HOME=D:\app\younes\product\11.2.0\dbhome_1 -DOEM_HOME=D:\app\younes\product\11.2.0\dbhome_1 -DIAS_HOME=D:\app\younes\product\11.2.0\dbhome_1 -Doracle.net.tns_admin=D:\app\younes\product\11.2.0\dbhome_1\network\admin Launcher ..\admin\owb.classpath
    RPE-02230 : Informations de débogage : JAVAPATH = D:\app\younes\product\11.2.0\dbhome_1\jdk
    RPE-02230 : Informations de débogage : PORT = 1521
    RPE-02230 : Informations de débogage : SESSIONNAME = Console
    RPE-02230 : Informations de débogage : HOMEPATH = \Documents and Settings\younes
    RPE-02230 : Informations de débogage : OCM_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : CLASSPATH = Personalities.jar;;
    RPE-02230 : Informations de débogage : PROCESSOR_IDENTIFIER = x86 Family 6 Model 23 Stepping 10, GenuineIntel
    RPE-02230 : Informations de débogage : USERPROFILE = E:\Documents and Settings\younes
    RPE-02230 : Informations de débogage : SATEMPDIR = D:\OracleBIData\tmp
    RPE-02230 : Informations de débogage : ORACLE_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : NUMBER_OF_PROCESSORS = 2
    RPE-02230 : Informations de débogage : COMPUTERNAME = KAIOUCHE-YOUNES
    RPE-02230 : Informations de débogage : ComSpec = E:\WINDOWS\system32\cmd.exe
    RPE-02230 : Informations de débogage : OS = Windows_NT
    RPE-02230 : Informations de débogage : OEM_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : IAS_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : USERNAME = younes
    RPE-02230 : Informations de débogage : CLIENTNAME = Console
    RPE-02230 : Informations de débogage : TEMP = E:\DOCUME~1\younes\LOCALS~1\Temp
    RPE-02230 : Informations de débogage : PROCESSOR_LEVEL = 6
    RPE-02230 : Informations de débogage : OCM_ORACLE_HOME = D:\app\younes\product\11.2.0\dbhome_1
    RPE-02230 : Informations de débogage : JDK_HOME = D:\app\younes\product\11.2.0\dbhome_1\jdk
    RPE-02230 : Informations de débogage : PROCESSOR_REVISION = 170a
    RPE-02230 : Informations de débogage : ProgramFiles = E:\Program Files
    RPE-02235 : Le système d'exploitation a signalé qu'il ne pouvait pas exécuter la commande demandée. Ce peut être parce que la commande ou les paramètres ne sont pas valides ou parce qu'il s'agit d'une commande shell. Tout code retour résultant est spécifique du système d'exploitation. Des informations de débogage ont été produites.
    CreateProcess: java -classpath E:/JavaApplication1.jar main error=267
    Le fichier journal est disponible. Cliquez sur le bouton Informations pour le visualiser.

    Nikolai,
    I have created a simple process flow which only calls the external process. The script is on the same host as the process flow is deployed to.
    I have used two diffent values for the command parameter.
    1. I placed the full path of the file in the command parameter and left the script parameter blank:
    COMMAND: /edwftp/ppas/scripts/ClearPPAS.sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT:
    2.I placed the bash command in the command parameter and the full path in the script parameter.
    COMMAND: /usr/bin/sh
    PARAMETER_LIST:
    SUCCESS_THRESHOLD: 0
    SCRIPT: /edwftp/ppas/scripts/ClearPPAS.sh
    Both of these appear to work as they print out the statements inside the script but the files that are supposed to be removed still remain.
    Starting Execution EXTER_FILE
    Starting Task EXTER_FILE
    Starting Task EXTER_FILE:EXTERNALPROCESS
    Removing ActivatedAudit.dat...
    Removing ActivatedCustomers.dat...
    Removing ActiveAudit.dat...
    Removing ActiveCustomers.dat...
    Done!
    Create the Activated Customers data file...
    Create the Active Customers data file...
    Done!
    WARNING: Log file truncated - see RAB for further information.
    /edwftp/ppas/scripts/ActivatedCustomers.sh: /edwftp/ppas/log/ActivatedCustomers.log: cannot create
    /edwftp/ppas/scripts/ActiveCustomers.sh: /edwftp/ppas/log/ActiveCustomers.log: cannot create
    WARNING: Log file truncated - see RAB for further information.
    Completing Task EXTER_FILE:EXTERNALPROCESS
    Completing Task EXTER_FILE
    Completing Execution EXTER_FILE
    The permissions on the /log direcotry are 775. The user I register the file location with owns this directory.
    Can't think of anything else I have missed. I really appreciate your help :)
    Ryan

  • Mysqldump command execution in java

    public class SqlDum
    public static void main(String args[])
    try
    String str="mysqldump -u root -p threadpool > test.sql";
    Process p=Runtime.getRuntime().exec(str);
    p.waitFor();
    catch(Exception e)
    System.out.println(e);
    }The above code executed sucessfully but there is no generation of sql file.If iam run the command mysqldump -u root -p threadpool > test.sql its executes sucessfully and backup file created.... Command execution takes place in linux platform...?how can i execute in java?

    hi friends,can anyone tell me the way to do backup of
    my database in MySql.Iam already shown my program....
    anyone tell me the changes what i do in that
    program?iam using that program in linux
    platform...?can anyone tell me the solution or
    suggestion... thanks in advanceCome on man! Wake up!
    READ THIS this -> http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    AND NOTE WHAT "it says there about output redirection"
    Okey buddy?

  • How Can we stop the execution of java program which contain infinite loop

    Dear All,
    I create one .bat file which which execute the simple java program
    I write one java program which execute above .bat file using instance of Runtime Class of java
    It's work fine if java program which is executed by .bat file is simple(Which has normal termination)
    But if that program contain inifinte loop then that file will goes on executing untill I close it manually
    So i want a solution in java which close that bat file (command window ) which is in running condtion
    If there any solution please replay me
    I try to close that .bat file using destroy() ,stop() method of Process and Runtime , Thread Class
    but it did not give me correct output
    .bat file still running !!!!!!!!!
    Thanks in advance

    Why not use javaw.exe to make the app run so you don't need the dos window (which is presumably what you are actually talking about when you say bat file).

  • Error occurred during execution of java concurrent program in R12.2 instance

    Hi All,
    The R12.2 instance is a cloned instance. I am getting the below error while compiling the java concurrent program in R12.2 instance.
    Has anybody had this error before?
    Any help or advice will be really appreciated.
    Thanks in advance.
    Kind regards,
    Ranjan

    Hi,
    The error could be because of the XSD attributes.
    In the Source message CustomerDetails, check the XSD attributes of the DataType CustNumber in the 'Detail' column in the IR. For example, it may have a pattern or whiteSpace or some other attribute.
    Then check the input file contents for the CustNumber node. One of those values may not match these attributes.
    Hope this helps,
    Bhanu

  • How prevent simultaneous execution of multiple button threads?

    My AS 3 program has multiple buttons. Users can select one and then immediately select another and this causes 2 threads that collide.  Once one button is executing, I want the other buttons to ignore clicks.
    I've tried using a lock:Boolean to indicate a button is being processed.  Each button checks lock.  My logic is such that when the AS 3 processor detects a locked condition, it abandons execution of that button.  However, surprisingly, it abandons execution only termporarily ... once the the boolean is unlocked, AS 3 comes back and executes the button.
    The problems are twofold:  1)  the first time the 2nd button attempts to execute (by checking lock), when it returns (from checking lock) and attempts to pick up processing where it left off, it seems to forget where it was and does not utlimately complete its task(s); possibly variables have been altered, it is difficult to say.  That is, AS 3 is unable to successfully pickup where it left off on the first button.
    2) the second problem is that AS 3 incorrectly returns to button 2 after the lock condition is cleared.  It persists and will execute that button.
    Can anyone tell me how once one button is selected, the others can be locked out and won't execute??  Multiple threads from these buttons is a problem.
    Thanks in advance.
    Steve @ U Iowa

    dmennenoh - OK.  The downside to that type of solution is that each button has to "know" which other buttons are on the stage at that time, but, yes, that should work.  Do you think turning their visibility off would or would not be as effective as removing the event listeners?  I'm thinking turning visiblity on or off is simpler and simpler to manage.  Thanks for your help.

  • How to restrict simultaneous execution of two programs?

    Hi Experts,
    Need inputs for the situation described below:
    We have two programs prog A and prog B. These are independent executable programs and have no dependency on each other. I want to restrict execution of prog B if prog A is running in any session by any user. Is there any system/basis table which stores runtime status of all the programs? There should be some table where all the currently executing programs get stored and once program is completed, entry is cleared from the table.
    One way can be:
    When prog A has started execution, add an entry in any Z table and at the time of finishing delete the particular entry. In prog B check that the table has any entry for prog A. If yes that means prog A is still running.
    Issue with this approach is, if program A has some error or cancelled while execution, it will not delete its own entry and hence even if prog A is finished, prog B will find entry in Ztable. 
    Any other way to achieve this functionality?
    This is very urgent.Please help!
    TIA
    Abhishek

    Hi,
    Although I don't understand why you need to serialized two programs
    that have no dependency on each other, maybe the following code can help provided the programs are executed using specific tcodes.
      DATA: BEGIN OF USR_TABL OCCURS 10.
              INCLUDE STRUCTURE UINFO.
      DATA: END OF USR_TABL.
    CONSTANTS: OPCODE_LIST LIKE TH_OPCODE VALUE 2.
      refresh USR_TABL.
      CALL 'ThUsrInfo' ID 'OPCODE' field OPCODE_LIST
        ID 'TAB' FIELD USR_TABL-SYS.
      sort usr_tabl by mandt bname.
    You can check wheter the other program(tcode) is being run from itab USR_TABL, good luck.
    Jeffrey Satriadi

  • Newbie Question -- Simultaneous Execution for Labview/DAQ

    Hey, I am an undergrad student who is fairly new to labview and control systems and I am working on a senior project. I am wanting to use labview to simultaneously control two separate machines. Both machines would send back data to be saved to a file. They would both be connected to a NI DAQ(SC-2345). Is this reasonably attainable? Will labview and/or the DAQ have problems running two machines simultaneously? I would love any suggestions. Thanks

    Let me see if I have your setup pictured correctly.  You have 1 PC, 1 DAQ card that is connected to the SC-2345 signal conditioning carrier.  Do those modules, you have two different physical machines you want to control.  Am I correct?
    Do you want to have one LabVIEW application controlling both machines independently?  Or two different LabVIEW applications each controlling one machine?
    Your one constraint is that since there is only one DAQ card, all DAQ functions have to be handled at a single point of code otherwise you'll get errors about resource conflicts.  In other words, you can't have two separate programs eaching trying to work with a single DAQ card.
    So you can have a single point of interface with the DAQ card and use architectures such as Producer/Consumer to pass messages back and forth from your other parts of the code.  The other parts of the code can be two independent loops that handle the machine control logic for each machine.
    The easiest to program would be to have on application that handles both machines.  It would have 3 loops, two loops where each loop is for logic for each machine, and one loop that handles the DAQ communication.
    If you want to have two separate applications, you can do that as well where each application handles the machine logic and a third background application handles the DAQ communication.  It just needs a little bit more sophisticated communication scheme to pass data between the different applications.

  • Simultaneous Execution with image capture

    Hi I'm writing a program that I want to simultaneously run two loops.
    One moves an actuator a given amount then saves the current image,
    we'll call it the actuator loop. The other loop would provide a live
    view of our images from our camera.
    The problem is that I need the live preview image to run before the
    other loop so I can change exposure, etc. I also need it to run after I
    start the moving actuator loop. While both are running I will need to
    be able to send the images from the live view loop to the moving
    actuator loop. Is this possible and what kind of design pattern would
    you recommend?
    I can explain more if this made no sense.
    Thanks,
    -Shane

    Hi Shane,
    The LabVIEW Application Design Patterns presentation would be a good place to start, but with the information you have given it seems pretty clear you're looking for a Producer/Consumer architecture. In LabVIEW, there is a VI template for Producer/Consumer, so most of the work is done for you.
    Producer/Consumer allows you to pass information between loops using queues without losing any data. In this case, the data queued is going to be an image from a camera.
    Let me know if you have any further questions/comments/concerns. Cheers.
    | Michael K | Project Manager | LabVIEW R&D | National Instruments |

  • Execution of Java Native Process slow in Mac OS X

    Hi,
    I'm having some performance issues when executing an java native process on Mac OS X. I am developping an application in AIR that searches for people in the ldap of our organisation. It has to be usable both on Mac as on Windows. When I execute my app on windows, the search process takes about 2-3 seconds. However, when I try to execute it on mac, the search process takes about 6-8 seconds. This is a bit to long to make it usable.
    Has anybody encountered this problem as well and does anyone know what the problem can be?
    Thanks in advance
    Ronald Kamp
    Junior Flex/Java/LiveCycle Consultant at iDA MediaFoundry

    Hi Ronald,
    Have you tried benchmarking your java process without the inclusion of AIR?  If so, did you find a difference which points to AIR being a culprit for the performance hit?
    I'd be very interested in trying this out.  If you could provide me with a sample project that illustrates the slow down on Mac, I'll take a look right away.  Please feel free to contact me via private message on the forum or at [email protected] if you'd like to take this offline.
    Thanks,
    Chris

Maybe you are looking for

  • Is there a way to view old floppy disks running Maverick?

    Is there a way to view old floppy disks when running Maverick?

  • Java.rmi.MarshalException is thrown when we run JUnit TestCase

    Hi, We wrote a JUnit TestCase to test our EJBs of our J2EE project. When we run the JUnit TestCase, we are facing Marshalling Exception. Our application development IDE is WSAD5.0 and it's JUnit jar's version is 3.8.1 But the application is running f

  • Faulty Wi-Fi Access

    I have a problem with my wifi, which is that once I turn on my macbook pro, the wifi connects to the wifi but says it doesn't have internet connection. After 10 mins though, that prob disappears and i got full wifi access. Another 30 or so mins later

  • Setting Up A Password for Mac Mini

    Hello Due to Lion causing an issue with my wifi I had to downgrade to Snow Leopard which meant all my settings  etc were changed.  How do I set up a password for changing things on my computer and locking up  after changes Thank you rachealfromva

  • Best Practices or Project Template for Rep/Version

    I have installed the Repository 6i (3) and created the users successfully, even though it has taken a lot of effort to make sure each step is correct. However, on setting up the workareas and importing the project files, I have been trying back and f