Need info regarding tasks in ThreadPool, Executor and ExecutorService

Hi all,
I would like to know the answers for the following questions regarding tasks:
1.How do you create a self-starting task.(the task that starts executing as soon as we create runnable object)
2. how do we create a task which is executed outside the runnableObject
3. If we are executing one task in a program, how many tasks are actually running in the JVM
4. how do we know whether a task is active or not
5. what happens when a task in in wait but no one signals it
6. what happens when a task does not release the lock
7. which method is used to pause a task
8. how do we stop and restart a task
9. if three instances of a runnable class start executing in parallel, which one terminates first.
I was looking for the answers for the above question in java doc and few other sites, but was of no help.
It would be great if anyone can answer these questions. That would be lot of help.
Thanks!!

I see nothing in your questions relating to ThreadPool or Executors.
Sounds like a "homework" assignment.
First thing you need to be clearer on is what is a "task". There is no pre-defined notion of "task" in Java.
Any introductory text of multi-threading in Java will answer those questions as they apply to threads. See the FAQ for some references.
David Holmes

Similar Messages

  • Need info regarding Oracle UCM Accounts and Security Groups behaviour

    Need information regarding Oracle UCM Accounts and Security Groups behaviour.
    Oracle UCM version: 11.1.1.5.0
    Steps:
    1. Log in with "weblogic" user and created a content with id "content1"
    2. Applied "@acc1(R)" and "TestGroup1" to the cotent created in step 1
    3. Log out
    4. Log in as "acc1user1", the user is not able to see the "content1"
    5. Log out
    6. Log in as "role1user1", the user is not able to see the "content1"
    Account and Group information:
    1. User "acc1user1" is part of "@acc1(R)"
    2. User "role1user1" is part of "role1(R)" and is mapped to "TestGroup1" in UCM
    Expected:
    Both "acc1user1" and "role1user1" should be able to see "content1" as they have at least Read permission.
    Please help me understand why the users are not able to see the content.

    ACLs, like Accounts, are optional security setting which may add on some extra functionality to mandatory security groups. Likewise, the resulting permission is taken as an intersection of SG and ACLs.
    But in the second part the number of set of users is huge (approx say 600)I don't get this completely. Does this mean that those "sets of users" (users who see the same data) are distinct and that there is 600 of such groups?
    If you read thoroughly the manual I sent earlier, there is a recommendation that there should be maximum 50 security groups, and you should use accounts, should this number be exceeded. This means you could have all the documents in one security group (and have one common role with Read permission), but combine it with accounts. ACLs are not a good choice here - their performance and manageability is much worse than of accounts. ACLs are primarily used if you expect security settings to change during the lifetime (e.g. a project manager adds temporarily rights to access an item to another user, and revokes it when the user finishes his or her work).
    Note that accounts as well as permissions of users within accounts can also be mapped externally (from LDAP/AD) and it usually follows some kind of org chart.
    I'd feel more comfortable not to speak about users, security groups, roles, etc., but about some real-life objects and scenarios.

  • I need information regarding the creation of Workbook and WAD.

    Hi,
    I need information regarding the How to create the Workbook and WAD.
    Can any one help me to get the information..
    Regards,
    Suman
    Edited by: Suman Reddy Vuyyuru on May 19, 2009 8:22 AM

    Hi,
    for workbook:
    [Queries in Workbook|http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm]
    for WAD:
    [WAD for Beginners|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/749a4622-0a01-0010-36bf-b6b30a2a3a22]
    thnks.

  • Need info regarding infotype 0017.

    Dear Experts,
    I am new to Travel Management.
    In infotype 0017, I need information regarding RGrp M/A Statutory, RGrp M/A Enterprise,EE Grp Expense Type and EE Group Travel Mgt fields.
    I verified few config documents of Travel Management but could not understood the applicability of the above fields. Please help me in this regard.
    Points could be awarded accordingly.
    Regards,
    Dolly

    Hi,
    RGrp M/A Statutory->  Identifies a reimbursement group for meals/accommodations for which the same statutory or pay scale trip provisions for meals and accommodations are valid
    A reimbursement group is a grouping of employees for whom the same trip provisions are valid. The reimbursement group is specialized by the trip expense category.
    A reimbursement group for meals/accommodations is a reimbursement group for which the same trip provisions for meals/accommodations are valid.
    The reimbursement group for meals/accommodations is specialized as to whether it is needed to represent statutory/pay scale or enterprise- specific trip provisions.
    Example
    Trip costs levels A, B, C according to German Travel Expense Statutes
    Grouping of employees according to pay scale groups
    RGrp M/A Enterprise-> Identifies a reimbursement group for meals/accommodations for which the same enterprise-specific trip provisions for meals and accommodations are valid
    A reimbursement group is a grouping of employees for whom the same trip provisions are valid. The reimbursement group is specialized by the trip expense category.
    A reimbursement group for meals/accommodations is a reimbursement group for which the same trip provisions for meals/accommodations are valid.
    The reimbursement group for meals/accommodations is specialized as to whether it is needed to represent statutory/pay scale or enterprise- specific trip provisions.
    Example
    Members of the Executive Board
    Managers
    Salaried employees
    Industrial workers
    EE Grp Expense Type -> An employee grouping for trip expense type is a classification of employees for whom these trip expense types are permissible.
    Example
    - Executive Board
    - executive employee
    EE Group Travel Mgt fields-> An employee grouping for Business Trip Management is a classification of employees designed to fulfill the purposes of Business Trip Management.
    Example
    - employee
    - mailman
    - other
    Regards,
    Pramitha.

  • Need help regarding image scanning from scanner and resizing it...

    Hi,
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!
    Thanks,
    Avinash.
    Edited by: Kalakonda on Jul 24, 2009 8:08 AM

    Kalakonda wrote:
    I need help regarding scanning of image directly from scanner. Here is the scenario when the person clicks scan button on the webpage should scan the image and resize it and store it in some temp location. Is there any way i can do this. Any Help regarding this would be great!!!So what you are doing is you have a Scanner (hardware: like an HP flatbed scanner) attached to a server that you want to use as a scanning station? Is this the senario that you are talking about?

  • Need Info regarding versions in XI

    Hi experts,
      How many versions are there in SAP XI..
      currently i am working on SAP XI 3.0.
      what is the difference between new 3.0 and new versions...
    Thanks,
    Swetha reddy

    Now the latest version is PI7.1 which contains below features,
    JDBC and RFC Lookup possible through Graphical design. so no need to write java coding for jdbc and rfc lookup.
    PI 7.1 consists of advanced adapter engine   which bypasses  to process messages & hence improves performance.
    Integration Repository (IR) is called Enterprise Service Repository(ESR)
    Introduced feature called Direct Connections, if you want to send some message with out mapping to some receiver.
    Introduced Function Library to reuse Java objects in other namespaces.
    Introduced MDM adapter with new features.
    etc.
    thanks,
    madhu

  • Very important and urgent - i need info regarding a function module

    hi all,
    can any one suggest me a function module which calculate the
    difference in two dates and give answer in days.
    some one suggest me the following function m odule
      CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS'
           EXPORTING
                beg_da     = wpv_dati
                end_da     = wpv_datf
           IMPORTING
                no_cal_day = wpv_days
    Please suggest any other function module.
    or i can use this Function module only

    Hi,
      U can use the following function  module.
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        I_DATUM_BIS                   = date1
        I_DATUM_VON                 = date2
      I_KZ_EXCL_VON              = '0'
      I_KZ_INCL_BIS                 = '0'
      I_KZ_ULT_BIS                  = ' '
      I_KZ_ULT_VON                = ' '
      I_STGMETH                     = '0'
      I_SZBMETH                     = '1'
    IMPORTING
        E_TAGE                        = days
    EXCEPTIONS
      DAYS_METHOD_NOT_DEFINED       = 1
      OTHERS                        = 2
    Reward if useful.
    Regards,
    Rajesh Akarte

  • Variant to data: Need info regarding type of data

    Hello,
    What I want to do is very basic. I will acquire the image using CCD camera. The
    image is a raw data type: 2D array of type long (4 bytes per element) or integer (2 bytes per element). I can save the image even as .tiff file. Using Variant To Data, I am converting the image so that labview can handle it (I am not sure whether I really need this) before I write that data to some file and save it. I have to define data type for Variant To Data. I tried to define the data type. However, I am confused. Would anybody give me some suggestion?
    Thanks a lot,
    Dushyant

    Hrm, you'll need to be more specific about your actual question in order for us to give you a good answer, but, without more information, I'd say you should just define the type as a 2-d array of either longs or words. (i.e. get an array constant, place a numeric constant inside of it, right click the numeric constant, and select Representation->Long or Representation->Word then wire the constant to the Type input of the Variant to Data).
    If you're dealing with variants, I'd guess you are probably calling an ActiveX control or server to communicate with your camera?
    Regards,
    Ryan K.

  • Need info regarding light weight AP 1042 registration

    hi ,
    I ordered controller 2504 and will arive soon. I want to know that after configure the initial setup of 2504 (i.e. AP manager , Managment IPs etc) and defining the DHCP for AP. Will the 1042 lightweight AP will register with the controller automatically or i need to manually define the AP (MAC address) on WLC. and also whether the Option 43 and 60 are correctly defined?
    Management Interface: 10.10.22.15
    AP Manager Int: 10.10.22.16
    ip dhcp pool WLAN103
    network 10.10.3.0 255.255.255.0
    default-router 10.10.3.1
    option 60 ascii "Cisco AP c1040"
    option 43 hex f104.0a0a.1610
    dns-server 10.10.3.1
    ip dhcp pool WLAN103
    network 10.10.3.0 255.255.255.0
    default-router 10.10.3.1
    option 60 ascii "Cisco AP c1040"
    option 43 hex f104.0a0a.1610
    dns-server 10.10.3.1
    port-channel load-balance src-dst-ip
    interface range gig 2/38 - 41
      switchport
      channel-group 13 mode on
      no shutdown
    interface port-channel 13
      switchport
      switchport trunk encapsulation dot1q
      switchport trunk native vlan 1
      switchport trunk allowed vlan 1,122,103,113,1002 - 1005
      switchport mode trunk
      no shutdown
    Regards
    Naray

    Hi Naray,
    I just setup my wireless network with 2504 WLC and 1142 AP's. I don't have to define option 43 or 60 for DHCP i think you need to do this if you have more than one dhcp scope or if you create new scope for wireless.
    In my case i use my old dhcp scope and i just configured wlc with external dhcp and AP joined straight  away. One issue i had was AP wasn't joinging the WLC because of wronge time and date on wlc. Its prety straight forward hope it goes well for you.

  • Need info on BSP tags  Test Suite and Test Case

    Dear All,
                 Could any one pls send me some info on the BSP tags Test Suite and Test Case.
    Thanks,
    Sirisha.

    Hi,
             I have gone through the sample examples.. for TestSuite and test case.. but im unable to understand it. I need some documentation on the usage of these tags..
    Thanks,
    Sirisha.

  • Need info regarding disk packs

    Greetings.
    There is a need to maintain different dev/production configurations (for different
    customers or different software releases) on the same Sun system (for
    example T5120/T5220 or similar) and have the ability to switch to a
    particular configuration. I came to know that there is something
    called "disk packs" available from Sun which is cluster of disks and
    we can selectively deploy multiple OS/Configs in one of more disks
    and activate the desired configuration whenever there is a need.
    Would you be please able to provide if you have any information in
    this regard or suggest us what solution would work best for this usecase.
    Thanks
    Anand

    ACLs, like Accounts, are optional security setting which may add on some extra functionality to mandatory security groups. Likewise, the resulting permission is taken as an intersection of SG and ACLs.
    But in the second part the number of set of users is huge (approx say 600)I don't get this completely. Does this mean that those "sets of users" (users who see the same data) are distinct and that there is 600 of such groups?
    If you read thoroughly the manual I sent earlier, there is a recommendation that there should be maximum 50 security groups, and you should use accounts, should this number be exceeded. This means you could have all the documents in one security group (and have one common role with Read permission), but combine it with accounts. ACLs are not a good choice here - their performance and manageability is much worse than of accounts. ACLs are primarily used if you expect security settings to change during the lifetime (e.g. a project manager adds temporarily rights to access an item to another user, and revokes it when the user finishes his or her work).
    Note that accounts as well as permissions of users within accounts can also be mapped externally (from LDAP/AD) and it usually follows some kind of org chart.
    I'd feel more comfortable not to speak about users, security groups, roles, etc., but about some real-life objects and scenarios.

  • Need help regarding converting text to Lines and Arcs.

    In my program i have text.Lets say the text is JAVA.
    Now i need to group that text(JAVA) in the form of line and arcs.
    Its like organizing lines and arcs and make it looks like a text(JAVA).
    Can we have such a possibilities to do that?
    Please help regarding this!!
    Thanks in Advance.
    Boopathy.

    Have a look at TextLayout class (http://java.sun.com/javase/6/docs/api/java/awt/font/TextLayout.html)
    Graphics2D g = ...;
    Point2D loc = ...;
    Font font = Font.getFont("Helvetica-bold-italic");
    FontRenderContext frc = g.getFontRenderContext();
    TextLayout layout = new TextLayout("This is a string", font, frc);
    Shape shape = layout.getOutline(null);
    Edited by: AlexeyUshakov on Sep 29, 2008 8:46 AM

  • Need Info Regarding Unix Scripts for DBA's

    Hi,
    I'm a oracle DBA with little knowledge of Unix.
    I wanted to write some shell scripts which will be helpful for DBA's regular activity.
    As i'm a new to oracle with unix can any plese tell me what are all the activities can be done throgh Unix Shell Scripts also suggest me how to learn unix shell scripts quickly.
    Thanks in Advance
    Gobinathan

    Maybe it is about time you leave your ideal world, and take a reality check.
    You don't take into account, I would say all over the globe, with the likely exception of the University of Washington, companies unwilling to upgrade to a supported version of Oracle. Then there are companies who can't upgrade to a supported version of Oracle, as the third party sw doesn't support a supported version of Oracle.
    Then there are companies who are unwilling to pay for OEM and/or database control.
    My company can't afford to use OEM to manage all our customers.
    Daniel, I think I know your answers. They are, and always have been highly unrealistic. You need to leave your paradise, and stop making people frustrated, because they have to stick with the (you so often use that word) paleolithic version of Oracle that has been presented to them.
    They simply have no choice.
    In the Netherlands 50 percent of the customers use 10g, 25 percent 8i and 25 percent 9i. You can climb your hobbyhorse every day, many of them won't upgrade, simply because management doesn't want to upgrade, as it doesn't buy them anything, apart from support, which is considered unimportant, as the application 'works'.
    Apart from that, your assertion scripts aren't portable across platform is not necessarily true when you start using Perl (comes with Oracle).
    There are many tasks for which shell scripts are still mandatory.
    In fact Rman is one of them. As Rman doesn't support variables, you can't use OEM to set up a script which uses a proper tag in the backup command.
    You need scripting to reset an alert.
    You need scripting to rotate the log file of a listener.
    Etc, etc, etc.
    Sybrand Bakker
    Senior Oracle DBA

  • Need info regarding OCA

    Hi, All
    I am looking for first certification for OCA. I have seen the syllabus also.
    Please suggest me and provide me material, if you have.
    mail me at [email protected]
    Thanks in advance
    Arun

    Hi Arun,
    you need prepare the first 13 chapters of Oracle's Introduction to Oracle 9i: SQL pdfs..
    Regards
    Sai Krishna

  • Need info regarding HANA DB  & MaxDB/SAPDB

    Hi All,
    I have a requirement where in I need to get the following information in regard to HANA DB & MaxDB/SapDB. Kindly suggest.
    This info I need to get from ECC or similar Box. Please let me know in which SAP table we can get this info.
    Information requried
    ================
    Database version
    Schemas
    Database parameters
    Configuration files
    Data files
    Log files
    Regards,
    Mani

    > Database version
    > Schemas
    System - status
    > Database parameters
    > Configuration files
    > Data files
    > Log files
    DB50 - or DBACOCKPIT
    Markus

Maybe you are looking for

  • Error when trying to open DeskI and Designer

    Hello Guys ! I have a big problem on my laptop. We're currently migrating from Xi R2 to Xi 3.1 SP3 FP3.2 I'm testing BO client tools deployment (with or without parameters, silent or verbose) So i need to nstall/uninstall/reinstal/reinstall etc.. But

  • Get msg disk is full when trying to save a PDF file

    Running windows 7 and latest version of Adobe Reader.  I get the following message when I try to save a PDF file to disk. The disk you were saving to or the disk used for temporary files is full.  Free some space on this disk & try again or save to a

  • Brightness/Contrast Problem in CS3 & CS2

    When I adjust (using legacy option) the sliders, then hit okay, the adjustments don't apply, and the image reverts to it's original state as if I hadn't adjusted the contrast or brightness at all. It did this in both CS3 & CS2. Has anyone else had th

  • The humanist's Question:

    ''locking - duplicate - https://support.mozilla.com/en-US/questions/852452'' I will never understand how this machine behaves and why the matters addressed always requires some kind of technical approach that always misses the very matter at hand. Th

  • Video Download Does Not Play.

    So apparently the digital copy of Star Trek is a two hour and six minute gray rectangle. On my system, at least. I can't figure it out, here's a screenshot. I am hesitant to re-download 1 gigabyte all over again. img695.imageshack.us/img695/5940/trek