Weird Thread problem - Not getting processing time from system?

I have an applet that displays an animation, and tasks are divided up into separate threads. After the main display is created, I create a thread that repaints the display every 10 milliseconds and one that does the actual animation. The odd thing is, even though it is in an infinite for loop, the message (see below) only comes up once (saying "Refresh 0"), and the applet doesn't refresh unless I minimize and maximize the window. Below is a modified code snippet:
...imports...
public class AnimationApplet extends Applet
AnimationApplet a;
public void init(){
a = this;
createDisplay() //gets the container and adds a Jpanel with main animation, a button and a textfield.
new AnimateThread().start()//calls animate() method which uses a timer to daw a series of lines
new RefreshThread().start();}
private class RefreshThread extends Thread{
public void run()
int count = 0;
for(;;){
JOptionPane.showMessageDialog(null, "Refresh " + count);
tp.repaint() //refresh main panel
a.validate()
count++;
sleep(10);}
}If you need to see more code, I can provide it. Thanks in advance for the help!

Nothing I'm trying is working. Someone please help!

Similar Messages

  • Custom authorization provider for WL7 problem (not getting all parameters from ContextHandler)

    I'm implementing a custom authorization provider for WebLogic 7.
    In my Access Decision isAccessAllowed method I need to check values of
    the parameters passed to an EJB method. Now, if an EJB method I have
    two parameters of the same type, for example int, when I get
    ContextElement array from ContextHandler and iterate through it to get
    names and values of the parameters I get the same value (value of the
    first int parameter) from both ContextElement's.
    Here is the code:
    String [] names = ch.getNames();
    for (int i = 0; i < names.length; i++)
    String name = names;
    System.out.println("name = " + name);//here it gets array of
    Strings, which contains two parameter names: "int","int",
    which are the types of EJB method parameters
    ContextElement[] ces= ch.getValues(names);
    for (int j = 0; j < ces.length; j++)
         ContextElement ce = ces[j];
         System.out.println(ce.getName()+ " = " + ce.getValue());
    //here if the value of the first int was 2 and the second 0,
    it would get 2 from both ContextElements (each of ContextElements will
    have name "int"
    If I try this with method parameters of different types, for example
    int with value 2 and long with value 0, then this code work fine -
    first ContextEleement has name int and value 2 and the second has name
    long and value 0.
    Thanks,
    -Oleg Kozlov.

    I'm implementing a custom authorization provider for WebLogic 7.
    In my Access Decision isAccessAllowed method I need to check values of
    the parameters passed to an EJB method. Now, if an EJB method I have
    two parameters of the same type, for example int, when I get
    ContextElement array from ContextHandler and iterate through it to get
    names and values of the parameters I get the same value (value of the
    first int parameter) from both ContextElement's.
    Here is the code:
    String [] names = ch.getNames();
    for (int i = 0; i < names.length; i++)
    String name = names;
    System.out.println("name = " + name);//here it gets array of
    Strings, which contains two parameter names: "int","int",
    which are the types of EJB method parameters
    ContextElement[] ces= ch.getValues(names);
    for (int j = 0; j < ces.length; j++)
         ContextElement ce = ces[j];
         System.out.println(ce.getName()+ " = " + ce.getValue());
    //here if the value of the first int was 2 and the second 0,
    it would get 2 from both ContextElements (each of ContextElements will
    have name "int"
    If I try this with method parameters of different types, for example
    int with value 2 and long with value 0, then this code work fine -
    first ContextEleement has name int and value 2 and the second has name
    long and value 0.
    Thanks,
    -Oleg Kozlov.

  • Bulky Message are not getting processed

    Hi All,
    Recently we have upgraded our XI systems to EHP4.
    After upgrade Bulky files are not getting processed into XI system. Small files are getting processed successfully.
    Earlier we had faced same issue at that time we have maintained some parameters in transaction RZ10, RZ11, SXMB_ADM-->
    Integration Configuration--> HTTP time out parameter.
    Same parameters are still there. But now the message is not getting processed in XI when we check into sxi_monitor. Message mapping is also not seems to be a problem as we havnt put any bulky logic over there.
    The message is not getting processed ahead of  Receiver Grouping .  Please find attached log from Performanceheader
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Receiver Grouping
      -->
    - <SAP:PerformanceHeader xmlns:SAP="http://sap.com/xi/XI/Message/30">
    - <SAP:RunTimeItem>
      <SAP:Name type="ADAPTER_IN">INTEGRATION_ENGINE_HTTP_ENTRY</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134229.930472</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="ADAPTER_IN">INTEGRATION_ENGINE_HTTP_ENTRY</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134232.052577</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="CORE">INTEGRATION_ENGINE</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134232.059576</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="CORE">INTEGRATION_ENGINE</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134232.07151</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="DBQUEUE">DB_ENTRY_QUEUING</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134232.071518</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="DBQUEUE">DB_ENTRY_QUEUING</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134237.239947</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_RECEIVER_DETERMINATION</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134237.241179</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_RECEIVER_DETERMINATION</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134237.250385</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_INTERFACE_DETERMINATION</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134239.999045</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_INTERFACE_DETERMINATION</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134240.001292</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_RECEIVER_MESSAGE_SPLIT</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134240.001413</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="PLSRV">PLSRV_RECEIVER_MESSAGE_SPLIT</SAP:Name>
      <SAP:Timestamp type="end" host="evoxicqab">20091210134240.026156</SAP:Timestamp>
      </SAP:RunTimeItem>
    - <SAP:RunTimeItem>
      <SAP:Name type="DBQUEUE">DB_SPLITTER_QUEUING</SAP:Name>
      <SAP:Timestamp type="begin" host="evoxicqab">20091210134240.026164</SAP:Timestamp>
      </SAP:RunTimeItem>
      </SAP:PerformanceHeader>

    Hi
    Have you checked this thread, same discussion here
    Performance of XI Interfaces
    Also check this blog
    /people/michal.krawczyk2/blog/2006/06/08/xi-timeouts-timeouts-timeouts
    Regards
    Ramesh

  • I have a Macbook, an iPad 2, and an iPhone 4. I also have iCloud on all three devices. For some reason I can not get new information from my contacts folder to transfer to the iPad or the iPhone. Never been a problem before.

    I have a Macbook, an iPad 2, and an iPhone 4. I also have iCloud on all three devices. For some reason I can not get new information from my contacts folder to transfer to the iPad or the iPhone. Never been a problem before.

    POP: yahoo, aol, comcast/time warnder/road runner
    Imap: google, hotmail, and more including icloud.
    If you want to use multiple devices - move to imap, I would even say "exchange", but Google does not support free exchange anymore, since January of that year. So Ironically  Icloud or Hotmail would be my choices right now.
    To find out more about what happens to you, search on Google "difference between pop and imap"

  • Google cloud print for officejet pro 8600 - could not get printer information from hp.

    I just purchased a new OfficeJet Pro 8600 today. Everything seems to work great except for the connector to Google Cloud Print. I can print from AirPrint, as well as emails to the hpeprint.com address, but when I try to register via the google site, I receive the "could not get printer information from HP" error message.
    The printer is connected via wireless ethernet, and seems to work find otherwise. I have no restrictions on who can send print jobs, and I have changed the email address for hpeprint.com a few times, as suggested in other forum threads, but it can never connect to the the Cloud Print service. I am at the latest firmware level listed on the HP website. I have tried to initiate the connection from multiple PC's as well as multiple web browsers.
    This was a big factor in purchasing this printer. Help anyone?
    This question was solved.
    View Solution.

    Hey rch33k, I am sorry for the ongoing issue that you are having accessing Google Cloud Print. This is being looked into as this is not a singular issue and is affecting other customers as well.  Engineers are currently investing this problem to try and provide a solution to it.  I want to again apologize and thank you all for your patience in this matter.  They only other thing to attempt at this time is to contact Google for further assistance to see if anything can be done on their end. Hopefully this will be fixed quickly
    I am a former employee of HP...
    How do I give Kudos?| How do I mark a post as Solved?

  • IPhone 5 not getting all texts from Galaxy S6

    My girlfriend is having a problem not getting all of my texts. As far as we know, it is only happening to texts from my phone. They are showing as sent on the Galaxy S6, but do not show up, ever, on her iPhone 5. The missing messages are random. 

    Hi there
    I’m sorry to hear that there have been some issues with receiving texts. I’d be happy to look into this for you! Can you please send me a private message by Clicking Here and include the following information?
    Full name
    Cell number
    Recipient’s number
    Best time to call
    Thanks,
    Charise
     

  • Savings Plan Contribution is not getting processed in Payroll

    Hello Friends,
    We are in the process of upgrading our system from 4.0 to 4.7, After correcting the schema as per the release/OSS notes, we are getting Savings Plan Contribution as blank (Retirement Savings).
    Cumulation values are coming thru right but current period contribution is missing.
    Earlier we had P0169 with P61, now we do not see processing class(PCLS)61 in the PCLS list. Our earlier wage types were referring to PCLS 61, I am not sure if this is causing an issue.
    Please let me know if you have any faced similar situation and have an answer.
    Thanks & Best Regards
    ravi

    Ravi,
    Appriciate if you could share the solution for your problem in savings plan contribution is not getting processed in the payroll. As I am facing the same kind od problem for my new configured benefit plan ROTH 401k plan.
    Please let me know the solution.
    Thanks & Regards,
    Sunita

  • Data packet not getting processed

    Hi SDN's
    I m loading data from one ODS to 4 regions , the source ODS is successfully loaded from der to the data targets the load is getting failed or taking loang time .
    upto transfer rules the data is successful, in update rules data packets are not getting processed
    kindly suggest solution, points will be assigned
    thx in advance

    Hi Katam,
    In the target ODSs go to the monitor screen for a particular request -> in the menu bar go to environment -> transactRFC-> in the datawarehouse -> give the ID and date -> execute.
    Check if there are entries in that. Usually this queue will be stuck and you need to execute the LUWs in the queue manually.
    if it says transaction recorded u need to execute it manually
    Please revert if any issues
    Edited by: Pramod Manjunath on Dec 19, 2007 4:48 PM

  • I am facing problem to get text file from application sever

    Hi This is lokesh.
    Actually my requirement is to craete sales orders by getting file from other server.for that i have used shell script to connect that server.Ok i am connecting to that different server(not sap server) successfully.
    But my problem is getting text file from application SERVER.
    That different server people will send the file name as 'DDHHMMSS' (Days,Hours,Minutes,Seconds).
    Just suppose if they will send today means that file name will come as 20103025. and with in half an hour if they again send that file file means that file name as '20110025'.
    like that file name is always varies.So how can i read that type of text files from the application server.
    and one more thing that is there chance to read morethan one text file from application server.
    Pls guide me if u know the solution.PLs this requirement is urgent.
    Regards,
    Lokeshgoud

    Hi..,
    <b>Just execute this program ... this is for the files received in JUST 3 MINS...</b>
    change it according to your requirement !!
    data time type sy-uzeit value '100000'. <i>"<<----start time</i>
    data file(8) type c value '20'.
    do 180 times. <i>" <<----- for 3 minutes</i>
    add sy-index to time.
    concatenate file time into file.
    write / file.
    OPEN DATASET FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF SY-SUBRC EQ 0.
    PERFORM READ_DATASET.
    ENDIF.
    file = '20'.
    time = '100000'.
    ENDDO.
    <b>form read_dataset.
    read the file here with the file name <b>FILE</b>.
    endform.</b>
    regards,
    sai ramesh

  • Get process preference from Mediator Java CallOut

    Hi,
    I have used Java Call Out in my mediator. Mediator further forwards the request to BPEL having some preferences. I want to
    get BPEL Process preference value in Java Call Out class method preRouting(). Is it possible?
    I found 1 way to achieve the same using Oracle Fusion Middleware Infrastructure Management Java API. But problem with this is that- I need to hard code parameters like composite endpoint, username & password which I do not want.
    Is there some other way to to get process preference from preRouting()?
    Thanks,
    Sujata

    I don't think you can get the process ID from within java or send signals to other processes.
    You might look at the sun.misc.Signal class. However, it is not recommended to use sun.* classes and I don't think it will do what you need either.
    You will probably have to use JNI, or if it is your program you could just have it send its process ID to standard out.

  • How to get processing time in RMI program

    Hi, all
    I am a newbie in Java RMI application. I am currently developing a small calculation application using Java RMI.
    My question is how can i get the processing time from client input until the server give feedback to the client?
    Thanks,
    Sohming

    sohming wrote:
    I have another question, is the default RMI using the reliable/unreliable/switchable connection?No. It is not a messaging protocol and uses direct synchronous connectivity. As such, if you get a reply it was successfully sent.
    Can i test processing time using different type of protocol?You can use the same approach for testing connectivity for a range of protocols. However I suggest you run the tests many times if this is realistic for your use case.
    I have a performance comparison of many messaging and RMI solutions here [http://www.freshvanilla.org:8080/display/essence/Essence+Remote+Method+Invocation] under "What are similar libraries?"
    I tested my own implementation for latency and throughput and you can get the results and download the source for those tests from this page.

  • I am not getting proper guidelines from apple regarding the querry

    I am not getting proper guidelines from apple regarding the querry, really iPhone is headache for me as I am unable to use the same from last 10 days

    If you would like help from here, you'll have to say what the problem is.  "Unable to use" and "not getting proper guidelines... regarding the query" tells nothing about your problem other than your phone isn't working.
    Also, judging by your other post where you are looking for an alternative to the iPhone, do you want a non-Apple phone or do you want your problem fixed.  No sense having people waste their time helping you fix this one if are going to get another phone.

  • Problem in getting parameter value from selection screen in web dynpro abap

    Hi,
    I am facing problem in getting parameter value from selection screen.
    Please find my code below:
    DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
    FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
                                 <FS_OBJ_USAGE>    TYPE REF TO data.
      WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
      LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
        CASE <FS_PAR_ITEM>-M_ID.
          WHEN `OBJ_USAGE`.
             ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.      
    [ Here, sy-subrc is 4,  <FS_OBJ_USAGE> is not assigning.]
        ENDCASE.
      ENDLOOP. 
    So, can any one solve this problem.
    Thanks in advance,
    Radhika

    Hi Radhika,
    Try using GET_RANGE_TABLE_OF_SEL_FIELD...
    Please Refer below code..
       DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA: RT_CARRID TYPE REF TO DATA.
      DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
      DATA: WSFLIGHT TYPE SFLIGHT.
      FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
    Retrieve the data from the select option
      RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
    Assign it to a field symbol
      ASSIGN RT_CARRID->* TO <FS_CARRID>.
      CLEAR ISFLIGHT. REFRESH ISFLIGHT.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
                           WHERE CARRID IN <FS_CARRID>.
      NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
      NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
    Thanks,
    Regards,
    Kiran

  • Thread does not get notify

    Hello,
    I start 10 Threads.
    If a thread must wait till recourse are valid then I call wait() method.
    If any recourse are valid another synchronized method calls notify() method to wake up the thread.
    I have the problem, that some the treads are in wait status and these will never wake up again!
    This happens exactly, when I choose for example 10 Threads and 5 recourses, or 8 Threads and 4 resources, etc..
    What could be the problem, that some threads do not get notify, even when I use netofyAll() method, the situation is the same!

    Most likely problem is that you haven't used synchronized sections properly to manage the flags on which you're waiting.
    e.g. notify is being called before wait has done it's thing.

  • IDOCS Error - Not getting processed automatically

    Hi All,
    We are loading hierarchy for a Product from R/3 system using the standard datasource.
    When we execute the info package, IDOCs are not getting processed automatically.
    We are facing the below error message.
    Error when updating Idocs in Business Information Warehouse
    Diagnosis
    Errors have been reported in Business Information Warehouse during IDoc update:
    No status record was passed to ALE by the applicat
    System Response
    Some IDocs have error status.
    Procedure
    Check the IDocs in Business Information Warehouse . You do this using the extraction monitor.
    Error handling:
    How you resolve the errors depends on the error message you get.
    But when we goto BD87 and process the IDOCs manually, these are getting posted and the hierarchy is loading.
    Can someone please guide me on what is the issue with the IDOCs and how to make them to post automatically.
    Thanks in Advance
    Regards,
    Sachin

    Hi,
    This will happen due to Non-updated IDOCu2019s in the Source system i.e., occurs whenever LUWu2019s are not transferred from the source system to the destination system. If you look at RSMO of the status tab, the error message would appear like u201CtRFC Error in Source Systemu201D or u201CtRFC Error in Data Warehouseu201D or simply u201CtRFC Erroru201D depending on the system from where data is being extracted. Sometimes IDOC are also stuck on R/3 side as there were no processors available to process them. The solution for this Execute LUWu2019s manually. Go to the menu Environment -> Transact. RFC -> In the Source System from RSMO which will asks to login into the source system. The u201CStatus Textu201D for stucked LUWu2019s may be Transaction Recorded or Transaction waiting. Once you encounter this type of status Execute LUWu2019s manually using u201CF6u201D or Editexecute LUWu2019s(F6).Just keep on refreshing until you get the status u201CTransaction is executingu201D in the Production system. We can even see the stuck IDOCu2019c in Transaction BD87 also.Now the data will be pulled into the BW.
    Hope it helps a lot.
    Thanks and Regards,
    Kamesham

Maybe you are looking for