What is the use of the concurrency?

what is the use and how they can be implemented in the program

The use of concurrency is that you can do several things at the same time.
How to implement it?
http://java.sun.com/docs/books/tutorial/essential/concurrency/
Beware, you can accomplish great results with it, but if you don't know what you're doing it can cause you headaches!

Similar Messages

  • What are the concurrent programs or query for safe purge to claim  space

    I am using Apps R12.1.3 and database 11g Enterprise Edition(11.1.0.7.0) .Due to excess increase in the tablespace sizes,i want to know
    What are the application tables which contains logs and unwanted information which we can purge safely without affecting user data.
    And how to purge them (any query or concurrent program)?

    Hi,
    We discussed this many times before.
    Please use the following link where you will get many (all) refereces
    https://forums.oracle.com/forums/search.jspa?threadID=&q=Purge&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks

  • What is the concurrency mechanism in a JVM?

    Is there a maximum number of threads for a JVM? Can I change the limited number?

    No there is no fixed number, the number threads an application can create is dependent on options given when JVM is launched and memory usage profile of your application
    Maximum number of threads that can be created per JVM is limited by the maximum heap size that is allocated to JVM process. Each Thread launched by JVM is also given a stack of fixed size.
    Hence you can only create a certain number threads before JVM throws outofmemory.
    In Sun's JDK the maximum heap size and thread's stack size can be controlled at the launch time via non-standard options as documented here.
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
    -Xmx : controls the max heap size a JVM can grow upto
    -Xss : Thread's stack size

  • What is the best way to submit a Concurrent Request over a DB Link?

    Hi,
    We have a requirement to submit a Concurrent Request over a DB Link. What is the best way to do this?
    What I've done so far is I've created a function in the EBS instance that executes FND_GLOBAl.APPS_INITIALIZE and submits the Concurrent Request. I then call this function remotely from our NON-EBS database. It seems to work fine but I found out from metalink article id 466800.1 that this is not recommended.
    Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=11129815723825&type=DOCUMENT&id=466800.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=17dodl8lyp_108
    Can anyone suggest a better approach?
    Thanks,
    Allen

    What I've done so far is I've created a function in the EBS instance that executes FND_GLOBAl.APPS_INITIALIZE and submits the Concurrent Request. I then call this function remotely from our NON-EBS database. It seems to work fine but I found out from metalink article id 466800.1 that this is not recommended.
    Why are Concurrent Programs Calling FND_GLOBAL.APPS_INITIALIZE Using DBLinks Failing? [ID 466800.1]
    https://support.oracle.com/epmos/faces/ui/km/SearchDocDisplay.jspx?_afrLoop=11129815723825&type=DOCUMENT&id=466800.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=17dodl8lyp_108
    Can anyone suggest a better approach?Please log a SR and ask Oracle support for any better (alternative) approach. You can mention in the SR that your approach works properly and ask what would be the implications of using it (even though it is not recommended).
    Thanks,
    Hussein

  • How to use "the concurrent employment" in HR_SAP.

    Dear Experts,
    I'm having the problem that: in our customer's company,  their employee can be assigned to more than one positions in the different companies.
    It means the EE just has one Personnel number, but they have personnel assignments.
    And I found the solution for this case is using "The concurrent employment" of SAP_HR. But I still have some questions about this function:
    1. Is it possible to use it in the other country (not in US or CAN)?
    2. Could you provide me some guide about how to configure it? There is not too much guide material about it in the internet. I already active the CE by IMG, but don't know what to do next.
    Any suggestion or advice will be appreciated,
    Thanks and best regards!
    Khiem.

    Hi Khiem,
    Please check note 662136, it provided some information to activate CE (specially if it's for a different country than US).
    Hope this help
    Best regards
    Sarah

  • What are the uses of Void wrapper class?

    Hi,
    Similar to other Wrappers, Void is a wrapper class for the primitive ' void ' . We all know that Void is a final class , we can't instantiate it.
    My Question is what are the uses of Void?
    thanks,

    kajbj wrote:
    I have at times used it in reflection and jmx.I have used them with SwingWorker if I didn't have anything interesting to return. There is also an example in the tutorial: [http://java.sun.com/docs/books/tutorial/uiswing/concurrency/simple.html]

  • The concurrent io problem when using RandomAccessFile

    Hi:
    In my application,I have to export the tomcat log(the log file like "localhost_access_log.2010-10-13") to database and the do some analisis.
    My way:
    start to export log at 00:05:00 every day,at this moment just read the log whose date before yesterday.
    For example,at 2010-12-12 00:05:00,the log of 2010-12-11... 2010-12-01 ..2010-11-12...(just check the nearest 30 days).
    All of these data are put into one table named "log".
    If log of one day is exported successfully,insert one record to another table named 'logrecord'.
    //main code fragment:
         public void start() {
              //start the push export work once the server startup.
              run();
              //start the schedule work
              new ScheduledThreadPoolExecutor(5).scheduleAtFixedRate(this, getStartTime(), 24 * 3600,
                        TimeUnit.SECONDS);
         //return the left time(from now to 00:05:00 of tomorrow)
         private long getStartTime() {
              Date d = new Date();
              long t = (DateUtil.getNextDayAtMiddleTime(d).getTime() - d.getTime()) / 1000 + 300;
              return t;
         @Override
         public void run() {
              Date days[] = DateUtil.getSeveralDayRangeByTime(30); //just the nearest 30 days.
              for (Date d : days) {
                   if (exist(d)) {
                        continue;
                   exportLogByDate(d);
    It works for now expect we can not anlyzer data of today.
    However we need it now.
    As far as I thought,I want to create a new table which owns the same structure of the former table "log" used to hold the log of "today" only.
    At 00:05:00 of every day,after the normal log exporting(export the nearest 30 days'log but today),export the log of today.
    It sounds easy,read the content,parser,filter,insert,just like what I did.
    But,the tomcat log file is saved by day.So in my normal log exporting,the log file(nearest 30 days) are not be used by tomcat,I can open/close it as I like.
    However if I tried to read the log of today,since the log file maybe used by tomcat for inserting log.
    I prefer to use the RandomAccessFile to read the log of today:
    But I am coufused by the concurrent io problem:what is going on if I am reading a line while tomcat is writing the line?
    Here is my test exmaple:
    package com.test;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    import org.junit.BeforeClass;
    import org.junit.Test;
    public class TestMain {
         private static File          file;
         private static long          pos; //record the position of last time
         private static Thread     writterThread;
         @BeforeClass
         public static void init() {
              file = new File("D:/random.txt");
              // build the thread for simulating the tomcat write log
              writterThread = new Thread(new Runnable() {
                   @Override
                   public void run() {
                        FileWriter fw;
                        try {
                             fw = new FileWriter(file);
                             BufferedWriter bw = new BufferedWriter(fw);
                             int i = 0;
                             while (true) {
                                  i++;
                                  bw.append(i + " added to line...");
                                  bw.append("\r\n");
                                  bw.flush();
                                  Thread.sleep(5000);
                        } catch (IOException e) {
                             e.printStackTrace();
                        } catch (InterruptedException e) {
                             e.printStackTrace();
         @Test
         public void testRandomRead() throws IOException, InterruptedException {
              writterThread.start();
              try {
                   RandomAccessFile raf = new RandomAccessFile(file, "r");
                   String line;
                   while ((line = raf.readLine()) != null) {
                        System.out.println(line);
                   pos = raf.getFilePointer();
                   raf.close();
                   // read the file by 30 seconds within 2 min,just for test)
                   for (long m = 0; m < 1000 * 60 * 2; m += 30000) {
                        raf = new RandomAccessFile(file, "r");
                        raf.seek(pos);
                        while ((line = raf.readLine()) != null) {
                             System.out.println(line);
                        pos = raf.getFilePointer();
                        raf.close();
                        Thread.sleep(30000);
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
    The normal output is something like:
    1 added to line...
    2 added to line...
    3 added to line...
    4 added to line...
    5 added to line...
    However I always get the following output:
    1
    added to line...
    2 added to line...
    3 added to line...
    4 added to line...
    5
    added to line...
    That's to say,the RandomAccessFile is reading the line which has not been completed by tomcat.
    So,I have two questions now:
    1) How about my normal log exporting? Is there anything can be improved?
    2) How to slove the concurrent io problem when export log of today?

    Peter Lawrey wrote:
    You can;
    - check the length to see if it has grown since the last time it was written to. If it has shrunk, start from the start of the file.
    - if longer, open the file from the last point read.
    - read the text up to the last newline in the file. (might be no new lines)
    - close the file and remember where you were up to. (the start of the last incomplete line.
    - wait a bit and repeat.But how to decide if one line is completed?
    Also,how about if the randomaccessfile can not stop?
    For example,start the work at 02:00,it read the tomcat log file line by line and export them to db,and during this time,the tomcat keep writing log to the same file(user request the server all the time), and then the randomaccessfile will keeping reading accordingly,when it is 03:00,the last task is not completed,but a new task should start,how to control this?

  • What are the AM Tuning parameters need to be set for 500 concurrent users

    Hi All,
    We are using JDEVADF_11.1.1.5.0.
    What are the exact AM parameters(Pooling and Scalability tab) to be set when we planned for 500+ concurrent users?
    Along with this do we need to set any parameters at weblogic server level, if any please give inputs.
    Any input's would be appreciated.
    Thanks in advance.
    Regards,
    Dinesh

    We can?t give you exact numbers as there are many factors influencing the performance. In hte end you have to make a load test to find the right set of parameters. A good starting point is Andrejus's blog Andrejus Baranovskis's Blog: Stress Testing Oracle ADF BC Applications - Internal Connections and  Andrejus Baranovskis's Blog: Stress Testing Oracle ADF BC Applications - Do Connection Pooling and TXN Disconnect Level
    Timo

  • Can someone clarify what are the advantages of using a EBS Adapter?

    Hi,
    I'm a little confused on what the EBS Adapter is all about. We have Integrated SOA Gateway(ISG) and SOA Suie 11g installed. I have a few questions:
    Why would I need to use a EBS Adapter in my composite?
    Why can't I use a web service adapter to call a service from ISG instead of using a EBS adapter?
    Why can't or use a Database adpater(which I can run PL/SQL) instead of using a EBS adapater?
    What is the security setup like with the EBS adapter?
    Thanks! I can't really seem to find any good documentation on this anywhere.

    You can find lots of information here.
    http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/intro.htm#BHCECCFE
    Regarding the security, as this falls under JCA adapter, it will carry all the security that JCA can support.
    With the help of EBusiness adapter you talk to concurrent program, business events and much more. Database adapter wont let you to talk with businessevent and concurrent programs.
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    Thanks,
    Vijay

  • What is the function of the Service Manager, in Concurrent Managers?

    Greetings to All,
    When looking at the concurrent managers, our internal manager is down and we also have the Service Manager being down. I understand the process of the Internal Manager.
    But like to know what the Service Manager does and what it is used for.
    Thanks in advance for any helpful information.

    Hi,
    Please refer to the following documents.
    Note: 210062.1 - Generic Service Management (GSM) in Oracle Applications 11i
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=210062.1
    Oracle® Applications System Administrator’s Guide Maintenance/Configuration manuals
    http://www.oracle.com/technology/documentation/applications.html
    Regards,
    Hussein

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • What's the simplest way to edit the audio on a DVD using a Mac?

    I appreciate you taking the time to read/respond to this post.
    Here's the deal:
    My church records its service on DVDs to pass out to members.  This past weekend an annoying, high-pitch hum found it's way on to our DVD.  We also record audio versions of our service to pass out on CDs, and (scratching my head) this week's CD turned out just fine, no hum.
    Is there an easy way to detach the "bad" audio from the DVD and replace it with the good "audio" from the CD?  I know I could do what I want using iMovie, but every time I do something like this using that program, the picture quality on my new DVD looks worst than the original, plus it takes a ton of time converting and reauthoring.
    Your help and suggestions are most appreciated.

    I've never really used IMovie cause I have Final Cut, but I'm surprised its degrading your video , This makes me wonder what format your movies are in , are they .dv ( digital video ) ?
    You may even take a look at your burn settings in IDVD , I cant think of anything else outside of video editing software that will do what you are trying to do, in short its your only real option..  

  • Data Recover From Formatted Drive? What is the best program to use to get back Logic Projects and any other file type?

    I was in the process of reorganising my hard drives so I could RAID them however I managed to corrupt one drive and had to format it which meant I lost all my Logic Files and some other files. I managed to save a lot of files (mainly video files) before I had to format the drive but I need a Data Recovery service that will not alter anything on the hard drive and will put all the formatted files (regardless of the type) back for me so I can get the rest of the ones I need.
    Thanks in advance.

    What about folders and such?
    No. FS doesn't reconstruct folders. However, Data Rescue does, depending on how you use it. About the only thing in Data Rescue a Quick Scan ever seems to show you are files that are already live.
    So that leaves you with a Deep Scan, or a Deleted Files scan. The first pass of a Deep Scan will attempt to retrieve folders and files, along with their original names. The second pass only looks for file patterns. Like recognizing a Photoshop .psd file. It will recover it, but give it a nonsense name. A Deleted Files scan only results in nonsense names of recognized file types; no folders.
    What were you using File Salvage on? A hard drive?
    Yes, though you can use it on a flash drive, or any other mounted drive.
    At the moment it is estimating 289 hours remaining on a 1TB drive. Can it not go faster?
    No, both of the software mentioned are slower than molasses in January. When you delete anything in Windows, its file table entry simply tagged as deleted. So to unerase them, the tag is removed. That's why it works to quickly and easily (assuming you haven't already overwritten the data to be recovered).
    In OS X though, the whole idea of the underlying UNIX structure is all about security. It's not supposed to be easy to retrieve deleted items. When you delete items, their file table entries are erased. So the only way to find deleted items is to scour the entire drive for BOF (Beginning Of File) markers that don't have a matching starting block to anything that is in the file table.
    Another question, half the drive was empty. Will it fly over that empty space or will it sieve through it incase there was some files stored on it?
    If you use the Expert mode is FS, you can choose to do that:

  • HT201250 I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was?

    I use Time Machine to back up my entire computer with my external hard drive. I am getting a brand new iMac this month and was wondering what is the process of using this back up to restore my new computer exactly how my old computer was? I want to make sure I will still have various important files on my new computer, like my songs in iTunes, my photos in iPhoto, etc, etc. Thanks so much in advance!

    Welcome to the Apple Support Communities
    When you turn on the new iMac for the first time, Setup Assistant will ask you to restore a backup, so connect the external disk and follow steps to restore all your files to your new iMac. Your new Mac will have the same settings and programs as your old computer.
    In other cases, I would recommend to restore the whole backup without using Migration Assistant or Setup Assistant, but a Late 2012 iMac uses a special OS X build, so the OS X version that you're using on your old Mac won't work on the new one. For more information, see > http://pondini.org/OSX/Home.html

  • What is the Tcodes for Uploading of data using BDC & CATT

    PP members:
    I was going through the <b>cutover activities</b> ,  and what I understood is  we transfer all the legacy system data into SAP before going live
    The data upload follows certain steps (depends on the organizational design load strategies)
    First we upload all the master data ( material master, BOM, W/C's & Routings)
    Then the transaction data ( Ideally speaking, there should no open orders i.e. WIP as on the day of cutoff )
    If the WIP (Work in Process) is unavoidable then the materials consumed shall be treated as <b>materials of the previous stage</b> and necessary adjustments shall be made after cutover day
    At this point, I could not able to understand what does the author mean <b>materials of the previous stage</b>
    Now comming to the uploading of data into SAP from legacy system, we use tools like LSMW, CATT & BDC
    Is it a must to use <b>only LSMW tool</b> to upload master data or any other upload tools are fine
    Lastly,. I am not sure about the Tcode of CATT & BDC
    Summary of the questions:
    1.What does the author mean  <b>material of previous stage</b>, for WIP materials during cutover activities
    2. Is it mandatory to use only LSMW tool for uploading for master data
    3. What are the Tcodes for upload tools CATT & BDC ?
    Thanks for your time
    Suren R

    Dear,
    1.What does the author mean material of previous stage, for WIP materials during cutover activities - as i understood, what is the stage of material..like it must have gone through 2 work centers and other 2 is left. i.e. you need to create Production order with only 2 operation as other 2 is already over. - usually it is done in such a way that we will create Production order and confirm till 2 operations and WIp is calculated so thatb FI will tally the books in SAP and lagacy.
    2. Is it mandatory to use only LSMW tool for uploading for master data - no you can use any tool as required and suits yr requirement
    3. What are the Tcodes for upload tools CATT & BDC- BDC through a prog in SE38. CATT through - SCEM.

Maybe you are looking for

  • Mavericks permission issues with Windows Server deduplicated shares.

    We have a number of 10.9-10.9.3 - Mavericks - machines installed throughout our facility. Much of the user content is pulled from shares stored on our Windows Server 2012 fileservers with deduplication enabled. I have found that files newly written o

  • After upgrade to 10.6.5, I get forcibly logged out

    Twice, so far. Every application I'm in is immediately terminated - no save! - and I am presented with the Login window. The first time, I went into Time Machine. I clicked at a spot on the screen and bam! Time to log in. The second time I was in Itu

  • How do I get the color wheel to stop spinning?

    how do I get the color wheel to stop spinning?

  • Spacing after paragraph?

    I'd like to use spacing after paragraphs which would stay fixed to an even number of lines (typically: one or two lines). Is this possible? How? I'd also like that this spacing would keep its value (number of lines) when I change the font size. Is th

  • Constructing / Updating a message in Loop of BizTalk Orchestration

    Hi, I have case where i need to to iterate a message received by Orchestration and validate each individual record of that message. Based on result of validation I need to mark a <STATUS> in the same message as Valid or Invalid. Later I need to use t