How To  Identify thread status

Hi Everybody,
Anybody got an idea regarding identifying the status of the Thread like if its dead or live.
And also how can you identify a thread.
Very urgent,
Thanks in advance.
Keep smiling.....:-)

try this
public class ThreadTest implements Runnable {
public static void main(String[] args) {
ThreadTest tt = new ThreadTest();
Thread t1 = new Thread(tt, "First");
t1.setDaemon(true);
Thread t2 = new Thread(tt, "Second");
t2.setDaemon(true);
t1.start();
t2.start();
try {
Thread.sleep(2000);
System.out.println("the first Thread is sleeping for 2 seconds");
} catch (Exception e) {}
synchronized (tt) {
tt.notify();
try {
Thread.sleep(1000);
System.out.println("the second Thread is sleeping for 1 second");
} catch (Exception e) {}
public synchronized void run() {
try {
wait();
} catch (InterruptedException ie) {}
sleepAWhile(4000);
protected synchronized void sleepAWhile(long time) {
try {
Thread.sleep(time);
} catch (Exception e) {}
}

Similar Messages

  • How to identify the status of the data load

    Hi All,
    Here is my requiremenet,
    I have a process called etl_pf2 which loads the data into staging tables. Now I have another process that does a partition exchange and moves the data from staging tables to online tables.
    In one procedure, I need to verify whether any data load into the staging tables is happings. If yes then partiontion should not occur, if no then movement should happen.
    Any idea on any parameter which can be used in the procedure to check the status of the data load in staging tables.
    Please help me.

    Thanx for reply
    But i thhink that the problem is with NQSServer which crashes but not disappears from the processes list.
    I tried to search obiee+USER_MEM_ARGS and nqsserver+USER_MEM_ARGS but found only this thread.
    How can JVM settings help to nqsserver.exe to work properly?

  • How to know threads status

    Hello all!
    I want to know if all my threads are done.
    I wrote some code but when I run it have this errors:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException
            at java.lang.Object.wait(Native Method)
            at java.lang.Object.wait(Object.java:485)
            at gui.start.insertUserOpinion(start.java:177)
            at gui.start.searchButActionPerformed(start.java:145)
            at gui.start.access$000(start.java:36)
            at gui.start$1.actionPerformed(start.java:68)In my code I want to continue on my main function.
    my code is:
         //creating threads by index of combobox
         for (i=0;i<=level.getSelectedIndex();i++){
         new myThread(list.get(i).toString(),model);
         //wait until all threads are done
         while  (myThread.activeCount()!=0)
         this.wait();
         }The error on the while loop
    thanks for helping!!!

    vitaly87 wrote:
    But how do I know if all threads are done?When you have join()ed on each one of them. Like for example with your for loop there.
    if I have more that one thread,and i create them with simple program not with anther thread.What?

  • How to identify mouse status

    Hello friends,
    Is it possible to identify the mouse status , I stress mouse status not mouse event i would like to identify mouse cursor type at any instant of time is it possible.
    One more thing is it posible to get the mouse cursor type outside a awt component
    Regards
    hari

    You would have to use the public Cursor getCursor() method of java.awt.Component to do what you're talking about. Additionally, without looking into native code, I don't think it would be possible to get the mouse status outside of your application (like if you had your mouse on a system-depent xterm window or visual basic application).
    -bx

  • How to identify the stock status of a material

    Hi,
    How to identify the status of a material if it is in quality inspection or unrestricted stock or Blocked stock?
    Regards,
    Kumar

    Hi,
    use transaction MMBE- Stock overview or MB52
    Regards Vassko!

  • How to identify Shopping cart status ?

    Hi Experts,
    I need your inputs regarding how to identify the status of the shopping cart ( like Awaiting approval, pending) passing through GUID of the shopping cart..
    Pls provide me if any classes or anythin in such related are available..

    Hello
    Please use FM BBP_DOC_STATUS_GET to get the current status of shopping cart.
    Inputs: SC/PO guid, All the status in the CRM JEST table.
    Output: Current Status of the Doc
    Hope this helps.
    Regards,
    Neelima

  • How to maintain the status of the Thread ?

    How to maintain the status of the Thread ?
    namanc

    I want to know whether a particular thread (java
    application) is completed successfully or not ...
    If the thread is not completed successfully then I
    want to restart the Thread.
    Actually this is the Task Scheduler Application ...
    If the particular task is not running successfully
    then I want to start the Task again ...
    namancThen it could look something like this: // loading the queue
    for each task
        add task to list of incomplete tasks
        enqueue task in work queue
    // dispatcher
    while !done()
        task = workQueue.dequeue();
        New Thread(task).start();When a task finishes, it can call a callback method on the dispatcher. The dispatcher looks at the task's status. If it finished successfully, the task gets removed from the list of incomplete tasks. Else it goes back on the work queue.
    There will be some syncing issues involved. You'll have to use wait() and notify()/notifyAll() to handle the situation where the work queue is empty, and all incomplete tasks are being worked on. And the case where the dispatcher wakes up after the notifyAll() and there's nothing to dequeue and nothing in the list of incomplete tasks.
    Clearly it needs some fine tuning, but I hope you get the idea.

  • How to identify the name of my smtp-mail host dynamically?

    Hi,
    I want to send an email from my system which has an internet connection.
    I don't know how to identify and mention the name of my smtp server ie; the smtp-host name that should be mentioned in my propetries object 'props' as props("mail.smtp.host","smtphostname");
    I want this program to work on other systems also,ie; It should dynamically find out what is the smtp-email host for the computer on which the program is running and set the smtp-host name in the 'properties' object dynamically.
    I will be thankful if anybody sends me code to solve this problem.
    Thank u in advance,
    Ravi.

    Write a mail scan to look for typical settings
    such as domain, mail.domain, smtp.domain, smtp.mail.domain
    where domain is after @ in an email address
    Have a SocketSearch class that uses non blocking via java.nio.channels.*
    so it can be interruptable and scan for these typical mail settings on default port 25 - The code using these interruptable socket can each be threaded to find the host/port and should find it in seconds
    Once found, store the settings in a configuration so you don't have to scan again unless it doesn't work anymore...
    If can't find the socket host/port via typical settings, next use a Java class that does a nslookup based on MX records - For example if you type "nslookup -type=mx javasoft.com" and you get mail exchanger = mail.java.sun.com and if you "telnet mail.java.sun.com 25" - you can see the port is open for sending emails.
    No expert in MX records for a domain to find the exact one and someone else can share some light on this...

  • How to identify what are all the events are created in background jobs?

    Hi all,
    how to identify what are all the events are created for  background jobs. And what events gets triggered for a particular job.
    thanxs
    haritha

    Hi Haritha,
    JOB is a program which starts to a determined point of time and executes some standard programs in the system. JOBs can be planed to a determined point of time on the regular basis (every night, for example) or to some discret time moments. So, the JOB can be planed and then will be started automatically without the manual start.
    Realtime programs are understood in the most cases as actual program execution which is started by somebody to the actual moment of time.
    Typically per JOBs some special processes will be started that should be executed automatically and regularly: for example, IDOC application, some correction reports, statistic updates etc.
    Standard jobs are those background jobs that should be run regularly in a production SAP System These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    Use
    As of Release 4.6C, the Job Definition transaction ( sm36 ) provides a list of important standard jobs, which you can schedule, monitor, and edit.
    Standard jobs are those background jobs that should be run regularly in a production SAP System. These jobs are usually jobs that clean up parts of the system, such as by deleting old spool requests.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw70/helpdata/en/24/b884388b81ea55e10000009b38f842/frameset.htm
    About Events:
    Events have meaning only in the background processing system. You can use events only to start background jobs.
    Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
    Types of Events:
    There are two types of events:
    1.)System events are defined by SAP. These events are triggered automatically when such system changes as the activation of a new operation mode take place.
    2.)User events are events that you define yourself. You must trigger these events yourself from ABAP or from external programs. You could, for example, signal the arrival of external data to be read into the SAP system by using an external program to trigger a background processing event.The event scheduler processes an event if the event is defined in the system.
    For example, if a system (System 1) receives an event from another system (System 2), the event scheduler of System 1 processes the event only if it is defined in System 1. That event does not need to be defined in System 2 (the sending system).
    You define an event by assigning a name (EVENTID) to it. When defining an event, you do not define the event arguments.
    for more information you can go thru the following thread:
    http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm
    When you schedule the process chain or infopackages the jobs associated with it run in the background mode. In case you want to create a job for a specific activity you can do so in SM36. You would be creating jobs that would get executed in any one of the options:
    1. Immediate
    2. Date & Time
    3. After event.
    4. After job.
    5. At Operation mode.
    In case you want to view the job logs go to sm37.
    Also Pls check DB02 for database performance and ST03 for workload .
    Analyse u will have an idea ,
    *pls assign points,if info is useful**
    Regards
    CSM reddy
    null

  • How to identify Contract items in a SO

    Hi,
    I want to display the support Contract Value. If the sales order contains support items then i need to display the support value in the report.For this first i need to identify the support/contract items in a SO.I am not aware about the inventory item types.So how to identify the Contract items in a SO.
    Thanks,

    If you are using Oracle's service contract functionality, then the contract item type code should be populated.
    Run the following to see if Service Contracts is installed.
    select status from fnd_product_installations where application_id=515
    It seems to me that your client is not using this functionality. They may be creating regular items and assigning a different status or item type. Talk to someone in the Master Data group and find out the process of creating a service item.
    Service item is a type of a contract item (other types are warranty, usage and subscription.) Please also go thru' the link I provided earlier.
    Sandeep Gandhi

  • How to identify XML gateway patch version in R12 ?

    Hi,
    how to identify XML gateway patch version in R12.1.3? Which is the latest version available for R12.1.3
    Regards

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> @ecxver.sql
    ECX_UTL_XSLT_DIR Profile :
    /usr/tmp
    ECX_OAG_LOGICALID Profile :
    ECX_SERVER_TIMEZONE Profile:
    ECX_SYS_ADMIN_EMAIL Profile:
    ECX_XML_VALIDATE_FLAG Profile: Y
    ECX_XML_MAXIMUM_SIZE Profile : 2000000
    utl_file_dir :
    /usr/tmp, /usr/tmp,
    /busdata/dfop/nca1/db/tech_st/11.1.0/appsutil/outbound/dfopnca1_oncerpd4,
    /usr/tmp, /busdata/dfop/nca1/db/tech_st/11.1.0/ccr/state
    Oracle XML Developers Kit 11.1.0.7.0 - Production
    Parser Version Ok
    XML Gateway Status Summary
    XML Parser Version OK
    All ECX Objects Valid? OK
    All XML Parser Objects Valid? OK
    OTA Running? N/A*
    Total Messages on Outbound Queue 0
    OTA Msgs on Outbound Queue 0
    Others Msgs on Outbound Queue 0
    Messages on Inbound Queue 0
    *Please use the ECXOTAPing.html as described in the Testing Oracle Transport
    Agent section of the User's Guide
    End of Summary
    Service Component Control Event Subscriptions
    EVENT_NAME RULE_FUNCTION OUT_AGENT STATUS
    oracle.apps.ecx.inbound.message.process [email protected]. MICHELIN.COM Not Defined ENABLED
    oracle.apps.ecx.inbound.message.process [email protected] N.COM Not Defined ENABLED
    oracle.apps.ecx.inbound.message.receive [email protected] N.COM Not Defined ENABLED
    oracle.apps.ecx.inbound.message.receive CLN_XMLG_EVENT_HANDLER_PKG.CLN_XMLG_SET [email protected] Not Defined ENABLED
    NC.MICHELIN.COM
    oracle.apps.ecx.inbound.message.receive CLN_XMLG_EVENT_HANDLER_PKG.CLN_XMLG_EVE [email protected] Not Defined ENABLED
    .MICHELIN.COM
    oracle.apps.ecx.inbound.message.receive CLN_XMLG_EVENT_HANDLER_PKG.CLN_XMLG_EVE [email protected] Not Defined ENABLED
    .MICHELIN.COM
    oracle.apps.ecx.inbound.message.receive [email protected]. MICHELIN.COM Not Defined ENABLED
    oracle.apps.ecx.processing.message.callb [email protected] LIN.COM Not Defined ENABLED
    ack
    oracle.apps.ecx.processing.message.error CLN_XMLG_EVENT_HANDLER_PKG.CLN_XMLG_PRO CESSING_ERROR_F@DFOPN Not Defined ENABLED
    CA1.ONC.MICHELIN.COM
    oracle.apps.ecx.processing.message.error [email protected] LIN.COM Not Defined ENABLED
    oracle.apps.ecx.processing.message.error [email protected] LIN.COM Not Defined ENABLED
    oracle.apps.ecx.processing.message.error [email protected] N.COM Not Defined ENABLED
    oracle.apps.ecx.processing.notification. [email protected] LIN.COM Not Defined ENABLED
    send
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Regards

  • How to set custmer master block for posting & how to set the status .....

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. Use an appropriate subject in your message thread. >
    Hi ...
    How to set custmer master blocked for posting & how to set the status has deleted. please provide the steps for the above two actions.
    thanks

    Hi,
    U can use T-code FD05 for Blocking the customer and
    T-code FD06 in order to set for deletion,
    Assign Points if useful,
    Regards,

  • How to identify whether a TCode is for SAP query or for a customized TCode

    Hi,
    We have a list of TCodes starting with Y_*
    Some of these TCodes could be related to SAP Queries and some could be real custom transactions. How do I find out which one of those are related to SAP queries and which ones are related to custom SAP transactions?
    I have already checked table TSTC for the program names of these Transactions, but the program name field (PGMNA) is blank. Also in TCode SE93 the transaction mentioned is START_REPORT. Also for some, when I go to the transaction (Y_*) and then environment->status to check the program name the values found are something like AQ11FI==========F10A==========.
    Please help on how to identify whether a TCode is actually for an SAP query or for a customized transaction.
    Thanks in advance.
    Mick

    Thanks Anil.
    In TSTC, the filed for program name is blank. Therefore I would have to go to each and every transaction (I  have around 250 Y_* TCodes with me) and then to environment->status to get the program name and then check whether it is A......
    Is there any easier way to know whether a TCode refers to an SAP query or a custom developed transactions/program.
    Mick

  • How to identify relevant BADIs to hide a screen field from specific users

    We have a business requirement to hide a document item field (BSEG-XREF3) from specific users (i.e make the field invisible if the userid does not exist in a Z table) during FI invoice entry/maintenance/display via transactions FB01, FB02, FB03, FV50, FV60, FBV0, etc..  We know that it would be possible to do this via modification to the Process Before Output sections of LF040O00, LFDCBFM0, MF05AO00_DYNPRO_MODIFIZIEREN, MF05LO00, but would prefer to avoid modification if possible. 
    I believe that BADIs could possibly be used for screen enhancements, but have not had any previous exposure to BADIs, so I'm really not sure whether it's possible to use BADIs for our specific requirement.  For example, using the advice given in the 2nd post in thread BADI for contract, I've searched SAPMF05A for all 'CALL METHOD cl_exithandler=>get_instance' statements, and have found that a single BADI (FBAS_CIN_MF05AFA0 - EWT - Downpayment Clearing - Tax transfer for CIN) seems to exist for FB01.  The description of this BADI sounds completely inappropriate for our requirement.  However, subsequent posts in that thread suggest far more BADIs for the relevant transaction than were given when searching the ABAP for all 'CALL METHOD cl_exithandler=>get_instance' statements, so I'm not convinced that the procedure I'm following will provide me with all the relevant BADIs for the transaction.
    Please can you advise me how to identify which BADIs - if any - can be used to control screens before output for FB01 screen SAPMF05A/332 (SAP R/3 4.6C)? 
    Many thanks in anticipation,
    Jules

    Hi Kuntal,
    Thank you very, very much for your prompt response and very useful alternative suggestion.
    The screen variant solution would be invaluable under different circumstances, but would be too complex to administer for this particular issue because we're trying to hide the field from unauthorised users in over 100 invoice entry/maintenance/display transactions. 
    We can make a Process Before Output modification to 4 SAP standard programs (LF040O00, LFDCBFM0, MF05AO00_DYNPRO_MODIFIZIEREN, MF05LO00) to make the field invisible for unauthorised users (i.e. whose user-ids are not in a Z* table), but would prefer to avoid modification if we could use BADIs instead.  You've said that you're not sure how we can identify the relevant BADIs, but I very much appreciate the suggestion you've made anyway - it might be useful to others who find themselves in a similar situation for a more limited number of transactions.
    Please can someone advise me how to identify which BADIs - if any - can be used to control screens before output for FB01 screen SAPMF05A/332 (SAP R/3 4.6C)?
    Many thanks,
    Jules

  • How many parallel threads

    Can any of you point to a query to show how many parallel threads are being used by a specific OSUSER. A load runner test is being done and the application server issues a set of dmls to an Oracle database. The v$session table shows all the sessions associated with the (application server) osuser have status 'INACTIVE'. Does it mean that none of the dmls are being executing? Which other data dictionary tables/views do I need to join to v$session to get a correct picture of the parallel threads being used.
    Thanks in advance.

    Yuri_IL
    You need to download the 488.2 driver. Make sure that you include the support for .NET framework. You specify this during the installation.  
    NI-488.2 3.1.1
    http://www.ni.com/download/ni-488.2-3.1.1/3786/en/
    In the following readme file you can find .NET framework compatibility, GPIB interface compatibility and other details that might be of your interest. You can also find where the .NET examples are going to be located.
    NI-488.2 for Windows, Version 3.1.1 Readme
    http://ftp.ni.com/support/softlib/gpib/Windows/3.1​.1/ReadMe.html
    The following manual explains all of the functions that are included in the driver API
    www.ni.com/pdf/manuals/370428f.pdf
    http://www.ni.com/pdf/manuals/370428f.pdf
    Warm Regards,
    William Fernandez
    Applications Engineering
    National Instruments

Maybe you are looking for

  • How to create Custom Application .plist file

    Hi all, I want to create a custom myapp.plist file from where my application can read or write information. I used the java.util.prefs.Preferences class for that it works fine. but the problems are (a) I want file name myapp.plist instead of com.appl

  • Cover flow on ipod classic 160gb 6th gen

    I was just given an ipod classic 160gb 6th gen, it the previous owners music on it, so I hooked it up to itunes & restored it & updated it to factory settings & put my name on it. I noticed in cover flow mode, that albums are doubled, one for the ent

  • IMac can't read data through 32' USB Active Extension / Repeater Cable

    My iMac doesn't seem to be able to read data through my 32' USB Active Extension / Repeater Cable. The cable is brand new, and it works flawlessly to connect my Microsoft Kinect Sensor to my Xbox 360, so I don't think the cable is the problem. Does a

  • J1INCHLN Challan Number

    Dear All I have a situation where, the J1INCHLN was processed and document number got generated but the Challan Number didnt get generated . What might be the reason? Pls guide as it is very urgent Thanks & Regards Veena

  • I keep getting this when trying to open Time machine:   An unexpected error occurred (error code -6584).

    I keep getting this when trying to open Time machine:   An unexpected error occurred (error code -6584). time machine wont even open up. My Time capsule has a green lite and appears fine Thaks,