J2ME - Thread running independent of Midlet

Hi Folks,
I am very new to J2ME, but I have been reading the midp2.0 api and forums. From what I've read, you cannot have a MIDlet running in the background acting as a server (on the actual phone). My question is, is it possible to have a thread that is initially spawned when the MIDlet is instantiated and then runs independently of the MIDlet (if the MIDlet is destroyed, the thread is still running in the background)? Which would in theory act as a server who wakes up the MIDlet and tells it to perform some predefined tasks.
So I saw the PushRegistry and the Storage classes in midp2.0, using these classes is this possible?

Hi,
The PushRegistry invokes your midlet when some condition defined by you is meet. ex: arrival of a sms, connection to aport on the mobile phone, arrival of a datagram, etc..
You don't need to have a thread running for that.

Similar Messages

  • Java ME SDK 3.4 problem running IMP-NG Midlets

    Hello!
    I downloaded and installed the Java ME SDK 3.4 and I'm having trouble running a IMP-NG JAD. I don't know if it's a environment problem or a SDK bug...
    If I make a JAD IMP-NG, I get a IllegalArgumentException when launching, even if we run using the Device Selector window, right-click on IMPNGDevice1. If I make it a IMP-1.0, it runs on simulator, but doesn't show in right-click on IMPNGDevice1... It seems to be checking the version (IMP-NG is 2.0, and simulator is 1.0?) but I don't see what's wrong.
    Thanks for any help!
    Stacktrace:
    Installing suite from: file:///C:/devel/ecl_ng2/workspace/Hello1/.mtj.tmp/emulation/Hello1.jad
    TRACE: <at java.lang.IllegalArgumentException>,
    java.lang.IllegalArgumentException
    - com.sun.midp.installer.Version.initFromComponents(), bci=149
    - com.sun.midp.installer.Version.<init>(), bci=22
    - com.sun.midp.installer.Version.createFromString(), bci=33
    - com.sun.midp.installer.Version.compare(), bci=6
    - com.sun.midp.installer.Installer.matchVersion(), bci=81
    - com.sun.midp.installer.Installer.isSupportedProfile(), bci=23
    - com.sun.midp.installer.Installer.matchProfile(), bci=212
    - com.sun.midp.installer.Installer.installStep10(), bci=19
    - com.sun.midp.installer.Installer.performInstall(), bci=188
    - com.sun.midp.installer.Installer.resumeInstallation(), bci=7
    - com.sun.midp.installer.MidpInstaller$StartAction.run(), bci=10
    - com.sun.j2me.security.AccessController.doPrivileged(), bci=12
    - com.sun.midp.installer.MidpInstaller$InstallThread.run(), bci=9
    - java.lang.Thread.run(), bci=5
    JAD
    MIDlet-Version: 1.0.0
    MIDlet-Vendor: MIDlet Suite Vendor
    MIDlet-Jar-URL: Hello1.jar
    MicroEdition-Configuration: CLDC-1.1
    MIDlet-1: Hello1,,mobi.v2com.zion.test.Hello1
    MicroEdition-Profile: IMP-NG-2.0
    MIDlet-Name: Hello MIDlet Suite
    Midlet
    package mobi.v2com.zion.test;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import com.oracle.util.logging.Level;
    import com.oracle.util.logging.Logger;
    public class Hello1 extends MIDlet {
      private Logger logger = Logger.getLogger(getClass().getName());
      public Hello1() {
      // TODO Auto-generated constructor stub
      protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
      // TODO Auto-generated method stub
      protected void pauseApp() {
      // TODO Auto-generated method stub
      protected void startApp() throws MIDletStateChangeException {
      logger.log(Level.INFO, "Hello1");
      System.out.println("Hello!");

    I had the same problem and I got it to work by removing the "-2.0" in MicroEdition-Profile line in JAD file "by hand":
    MicroEdition-Profile: IMP-NG
    But it's not possible to achieve this using the combo box to select the Microedition Profile. Only changing the file in text mode.

  • The background thread running lazy writer encountered an I/O error

    Hi I have a test server which has thrown the following error
    File system error: A system error occurred while attempting to read or write to a file store. The system might be under memory pressure or low on disk space. Physical file: \\?\F:\MSAS11.DEPLOYAS\OLAP\Data\Prod_KCube.0.db\DIM Flags And Types.0.dim\3.Flag
    Types Key.khstore. Logical file: . GetLastError code: 8. File system error: The background thread running lazy writer encountered an I/O error. Physical file: \\?\F:\MSAS11.DEPLOYAS\OLAP\Data\Prod_KCube.0.db\DIM Flags And Types.0.dim\3.Flag Types Key.khstore.
    Logical file: . Errors in the OLAP storage engine: An error occurred while processing the 'Facts' partition of the 'Main Facts' measure group for the 'Prod_Cube' cube from the Prod_KCube database.
    The cube sits on a not very well maintained server which is used by various users (it is a test server) with the following specs
    Intel(R) Xenon(R) CPU x5690 @3.47GHz
    24GB Ram
    64 Bit operating system.
    The Cube data and logs are on separate drives and have plenty data but the C drive (where SQL Server is installed) only has3.5Gb of space left.
    It's a fairly big cube and I've managed to get it running by processing dimensions and facts bit by bit but errors when processed all together.
    What could be causing the errors above?

    Hi aivoryuk,
    According to your description, you get the lazy writing error when processing partitions. Right?
    In this scenario, the issue may cause by low memory for SSAS and lack of disk space. Please consider configure
    Server Properties (Memory Page) and increase
    memory setting for SSAS. If the .cub file is located in C drive, please reserve more disk space.
    Please refer to a similar thread below:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/21bf84c5-f89a-464a-a5f1-2649fae5eb1e/while-processing-large-cubes-various-file-system-errors-the-background-thread-running-lazy-writer?forum=sqlanalysisservices
    Best Regards,
    Simon Hou
    TechNet Community Support

  • How can I allow a sub-vi to run independent of the main program once it has been called while still sending data to the sub-vi

    I have a main program where I call a sub-vi. In this sub-vi, there is a while loop that is used to wait for commands in the sub-vi. While the while loop is running, I cannot continue with normal operation of the main program. I would like get the sub-vi to run independently once it has been called, but not hold up the main program. As well, I need to still be able to send data to the sub-vi

    One way is to use VI Server, which has been mentioned by others. This will allow you to start another VI (by name) and run it entirely independently of the calling VI. This is a good way to start various independent VIs from a main menu, for example. None of the VIs thus called need have any connection to the others.
    Another way it to have the SubVI in a separate while loop on the calling VI's BD. Then, use a local var to start this sub VI from the main loop. The calling VI sets a local START bit and continues running. The sub VI's while loop watches for this START bit to go true, and then runs the Sub VI. The advantage here is that one can more easily pass arguments to the SubVI when it is started, using local vars, which are preferable to globals. Once the Su
    bVI is running, however, you must use a global Stop Bit, set in the calling VI, to stop it when the calling VI exits, or the calling VI will hang up, waiting for the Sub VI to close and exit its while loop.
    If you need an example of this, email me. ([email protected]). I can also recommend Gary W. Johnson's excellent book which discusses this. ("LabVIEW Graphical Programming", 2nd Ed).
    Note: Where possible, I try to call a subvi from within the main VI, wait till it is done, then continue. It avoids the use of locals & globals, and results in cleaner code, with fewer "race" conditions. However, the main VI stops until the subVI is done, hence one should make the subVI modal.

  • Why do threads run one at a time?

    [Newbie] Couldn't get help in another forum, so here goes. Tried this in Netbeans 3.5 then at home later in BlueJ, same thing. Thanks in advance!
    I have written a small application to play with threads. I create 3 instances of a class and shoot each one off in a thread, but they all seem to run one at a time, not at the same time. I have posted the code below. The output I expect is something like this:
    0T1
    0T2
    0T3
    1T1
    1T2
    1T3
    2T1
    2T2
    2T3
    498T1
    498T2
    498T3
    499T1
    499T2
    499T3
    500T1
    500T2
    500T3
    The T1 means threadstart1 wrote that line, the T3, means threadstart3 wrote the line, etc. I would expect to see these slightly out of order, too, knowing that the threads will process what they can, when they can. Instead, I see this:
    0T1
    1T1
    2T1
    500T1
    0T2
    1T2
    2T2
    500T2
    0T3
    1T3
    2T3
    500T3
    It's in perfect numeric order, each completing before the next starts. What am I doing wrong?
    //-------------dostuff.java
    package delme2;
    public class dostuff implements Runnable {
    private String mtext;
    public dostuff(String atext) {
    mtext = atext;
    public void run() {
    int j;
    String s;
    //display 500 numbers
    for (j=0; j<500; j++) {
    //build the string
    s = String.valueOf(j) + mtext;
    //show the string
    System.out.println(s);
    //wait a bit before doing this again.
    try {
    Thread.sleep(10);
    } catch (InterruptedException e) {
    //--------------- delme2.java
    package delme2;
    public class delme2 {
    public delme2() {
    System.out.println("Thread demo:");
    Runnable threadstart1 = new dostuff("T1");
    Runnable threadstart2 = new dostuff("T2");
    Runnable threadstart3 = new dostuff("T3");
    Thread t1 = new Thread( threadstart1 );
    Thread t2 = new Thread( threadstart2 );
    Thread t3 = new Thread( threadstart3 );
    t1.run();
    t2.run();
    t3.run();
    public static void main(String[] args) {
    delme2 mydelme2 = new delme2();
    }

    Okay, I'll play along. Having written a task scheduler in C (under tutorial, I admit), I think I qualify. A task scheduler has three jobs at all times.
    1) Execute the code at hand.
    2) Figure out when to stop executing the code at hand.
    3) When stopped, figure out what code to execute next.
    When executing a piece of code, there are different paradigms for determining when to stop and move on. Ideally, a cooperative multitasking system would have threads that relinquish timeslices or have some other method sprinkled throughout their code that indicates to the task scheduler that it's okay to move on to another piece of code. In my experience, that indicator is a Thread.Sleep() or equiavalent. when the thread.sleep() is encountered. The task scheduler has nothing to do for a whopping 10 MS. It could even take 15 or 20 ms if the next process in line takes that long. So what is it doing for 10 ms? It's not executing those other threads, which should be queued for their turn on step #3 as soon as I fire them off with a .run().
    Now, I hope you can see that I've given this some thought and read about it, but I'm missing something. I can get a very similar project to work as I expect it to in .NET and in Delphi. The Java environment has something different about it that I haven't figured out. Here's the c# code that does EXACTLY what I want it to. All threads run at a same time, and I get 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4, etc.. See the similarities?
              private void button1_Click(object sender, System.EventArgs e)
                   lst.Items.Clear();
                   ThreadStart start1 = new ThreadStart(runner);
                   ThreadStart start2 = new ThreadStart(runner);
                   ThreadStart start3 = new ThreadStart(runner);
                   Thread t1 = new Thread(start1);
                   Thread t2 = new Thread(start2);
                   Thread t3 = new Thread(start3);
                   t1.Start();
                   t2.Start();
                   t3.Start();
              private void runner()
                   string s;
                   for (int j=0; j<500; j++)
                        s = j.ToString();
                        lst.Items.Add(s);
                        Thread.Sleep(10);
              }

  • How to throw Exception in Thread.run() method

    I want to throw exception in Thread.run() method. How can I do that ?
    If I try to compile the Code given below, it does not allow me to compile :
    public class ThreadTest {
         public static void main(String[] args) {
         ThreadTest.DyingThread t = new DyingThread();
         t.start();
         static class DyingThread extends Thread {
         public void run() {
         try {
                   //some code that may throw some exception here
              } catch (Exception e) {
              throw e;//Want to throw(pass) exception to caller
    }

    (a) in JDK 1.4+, wrap your exception in RuntimeException:
    catch (Exception e)
    throw new RuntimeException(e);
    [this exception will be caught by ThreadGroup.uncaughtException() of this thread's parent thread group]
    In earlier JDKs, use your own wrapping unchecked exception class.
    (b) if you know what you are doing, you can make any Java method throw any exception using Thread.stop(Throwable) regardless of what it declares in its "throws" declaration.

  • How to pass the caught exception in Thread.run back to the main program?

    I have following three Java files (simplified from a real world application I am developing, see files at the end of this posting):
    1. ThreadTest.java: The main program that invokes the Manager.run()
    2. Manager.java: The manager that creates a thread to execute the Agent.run() for each agent
    3. Agnet.java: The run() method can throw Exception
    My goal is twofold:
    1. To execute the run() method of an Agent in a thread (the reason for this is there are many Agents all managed by a Manager)
    2. To catch the exception thrown by Agent.run() in the main program, ThreadTest.main() -- so the main program can alert the exceptions
    My problem:
    Bottomline: I cannot pass the exception thrown by Agent.run() in the Thread.run() back to the main program.
    Explanation:
    The signature of Thread.run() (or Runnable.run()) is
    public void run();
    Since it does not have a throws clause, so I have to try/catch the Agent.run(), and rethrow a RuntimeException or Error. However, this RuntimeException or Error will not be caught by the main program.
    One work-around:
    Subclass the ThreadGroup, override the ThreaGroup.uncaughtException() methods, and spawn the threads of this group. However, I have to duplicate the logging and exception alerts in the uncaughtException() in addition to those already in the main program. This makes the design a bit ugly.
    Any suggestions? Am I doing this right?
    Thanks,
    Xiao-Li "Lee" Yang
    Three Java Files:
    // Agent.java
    public class Agent {
    public void run() throws Exception {
    throw new Exception("Test Exception"); // Agent can throw execptions
    // Manager.java
    public class Manager {
    public void run() throws Exception {
    try {         // <===  This try/catch is virtually useless: it does not catch the RuntimeException
    int numberOfAgents = 1;
    for (int i = 0; i < numberOfAgents; i++) {
    Thread t = new
    Thread("" + i) {
    public void run() {
    try {
    new Agent().run();
    } catch (Exception e) {
    throw new RuntimeException(e); // <=== has to be RuntimeException or Error
    t.start();
    } catch (Exception e) {
    throw new Exception(e); // <== never got here
    // ThreadTest.java
    public class ThreadTest {
    public static void main(String[] args) {   
    try {
    Manager manager = new Manager();
    manager.run();
    } catch (Throwable t) {
    System.out.println("Caught!"); // <== never got here
    t.printStackTrace();

    The problem is, where could you catch it anyway?
    try {
    thread.start();
    catch(SomeException e) {
    A thread runs in a separate, er, thread, that the catch(SomeException) isn't running within. Get it?
    Actually the Thread class (or maybe ThreadGroup or whatever) is the one responsible for invoking the thread's run() method, within a new thread. It is the one that would have to catch and deal with the exception - but how would it? You can't tell it what to do with it, it (Thread/ThreadGroup) is not your code.

  • Thread running in jvm or os

    pls tell me thread running in jvm or operating system

    pls tell me thread running in jvm or operating systemIIRC, unless you are using a very old JVM (e.g. pre 1.2) or are explicitly specifying green threads (which I believe was still possible even in 1.2?) then all threading using native threads. As mentioned above, the mapping between Java thread objects and the native threads is is highly dependent on the OS (especially when it comes to thread priority).
    This document goes into much more detail: http://java.sun.com/docs/hotspot/threads/threads.html
    - N

  • Will subsequent calls to an object running in a thread run in the thread?

    Hi,
    If I start a thread with an empty run method and then make a call to the object that I started in the thread, will the method call run in the other thread? For example:
    class ThreadClass implements Runnable {
        public void someMethod() {
        public void run() {
    class ThreadCaller {
        private ThreadClass threadClass;
        public ThreadCaller() {
            threadClass = new ThreadClass();
            Thread thread = new Thread(threadClass);
            thread.start();
        public blah() {
            threadClass.someMethod();
    }Will the method call in blah() run in the same thread as ThreadCaller, or will it run in the thread that was started in ThreadCaller's constructor?
    Thanks,
    Dan

    Djaunl wrote:
    vanilla_lorax wrote:
    Djaunl wrote:
    Is there a way to keep the thread alive until the object that started the thread is terminated,Objects don't get terminated. What do you mean?I want the thread to stay alive indefinitely until I arbitrarily terminate it makes more sense. The thread will stay alive until its run method completes. The canonical approaches are
    public void run() {
      while (!Thread.interrupted()) { // NOT isInterrupted()
        // do stuff
        // if you need to catch InterruptedException, do this:
        try {
        catch (InterruptedException exc) {
          Thread.currentThread().interrupt();
    }And then from another thread, call theAboveThread.interrupt() when it's time to stop. Read the docs in interrupt(), interrupted(), the interrupt flag, etc.
    OR
    while (!done()) {
      // do stuff
    }and then another thread calls setDone(true) or somesuch when it's time to stop. Note that all access to done--both get and set--must be synchronized, or done must be declared volatile. Also note that you may still have to handle interrupts, so you may have some repeated code with this approach--testing both done() and interrupted().
    Let me give the end-goal of this.
    Currently, I have a "main" thread which the user can input commands into, and another thread which occasionally runs in the background. When I want something to run in the background, I just create a new thread. However, I figured it'd be more efficient to have one thread running in the background to do something as opposed to spawning hundreds of new threads to do the same task over and over. If the task happens VERY frequently and what it does is VERY small and quick, then the overhead of thread creation may make this a valid approach. Otherwise, don't overcomplicate it. Since you're new to threads, first get it working where you spawn one thread for each background task. Then move on to thread pooling. Look into ThreadPoolExecutor and related classes.
    http://java.sun.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html

  • Avoid timeout in Thread.run

    I have a Thread running task by task from a taskpool.
    while(running) {
    task = tasks.elementAt(0);
    process(task);
    Sometime, processing might take too long (timeout)
    so I need to force the thread to skip to the next task.
    1) How can I accomplish this without having access to
    process (my thread is abstract) ?
    2) Do application servers provide such a feature
    (timeout controll) at task level ?

    why not just time it using System.currentTimeMillis
    and then if it was too long (how long is too long ??)
    then remove the next task from your tasks vector ??Timing is no problem as I have a monitor doing this.
    The problem is that this is an abstract class, and I have
    no contorl over process() method. This could event
    run forever. As I said, stopping is controled by a monitor
    object but the problem is that my thread is running in
    process and I can't make it out (like throwing an exception).

  • How to calculate number of threads  running  on Windows 2000 terminal?

    How to calculate number of threads running on Windows 2000 terminal for the oracle process?
    I have installed Oracle 9i DataBase with 6 patch(9.2.0.6.0) on Windows 2000 Terminal.
    But,after database is started up, when i check up the sessions in v$session view.
    It is showing like for SYSTEM osuser alone, 10 ORACLE.EXE sessions running on this server machine in active state.
    Why it is creating 10 ORACLE.EXE sessions for a single Oracle Server.
    This is the output of v$session view.
    SQL> select terminal,osuser,status,sid,serial#,program from v$session;
    TERMINAL OSUSER STATUS SID SERIAL# PROGRAM
    IMGDBSVR SYSTEM ACTIVE 1 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 2 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 3 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 4 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 5 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 6 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 7 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 8 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 9 1 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 10 1 ORACLE.EXE
    SUGANTHI_DBA suganthi ACTIVE 11 91 sqlplusw.exe
    11 rows selected.
    SQL>

    This is how i have related these two views:
    SQL> select s.terminal,s.osuser,s.status,s.paddr s_paddr,b.paddr p_paddr,s.program
    2 from v$session s,gv$bgprocess b
    3 where s.paddr=b.paddr;
    TERMINAL OSUSER STATUS S_PADDR P_PADDR PROGRAM
    IMGDBSVR SYSTEM ACTIVE 33AF2270 33AF2270 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF2654 33AF2654 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF2A38 33AF2A38 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF2E1C 33AF2E1C ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF3200 33AF3200 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF35E4 33AF35E4 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF39C8 33AF39C8 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF3DAC 33AF3DAC ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF4958 33AF4958 ORACLE.EXE
    IMGDBSVR SYSTEM ACTIVE 33AF4D3C 33AF4D3C ORACLE.EXE
    10 rows selected.
    SQL>
    Here, It shows 10 sessions are running.
    Whether this means 10 threads are running on the particular server or not?

  • Java Thread run some day then death ,use jstack check it,it  run again, is

    hi all;
    I write a java program run as linux daemon,
    command line is >nohup java myclass &>/dev/null
    it run some day ,then death, ,look like death lock ,but thread not exit
    if i use jstack checke it ,it run again!
    my env is
    Linux version 2.4.20 ,redhat linux
    jstack 14616
    Attaching to process ID 14616, please wait...
    Debugger attached successfully.
    Client compiler detected.
    JVM version is 1.5.0_02-b09
    my program like
    commandline nohuo java StartUp >/dev/null &
    public Class StartUp{
    public static void main(String[] argv){
       Connection con = getDBConnection
         Thread t1 = new Thread(new MyRun(con));
      t1.start();
         Thread t2 = new Thread(new MyRun(con));
      t2.start();
      for(;;){
      Thread.sleep(100);
    public class MyRun implements Runnable{
    Connection con;
    public MyRun(Connection c){con = c;}
    public void run(){
         for(;;){
         object = readData(con);
         process(object);
         log.info("watch info ....");
         Thread.sleep(500);
    }

    Today i found my program hang, i use kill -SIGQUIT to print thead trace
    but i can't find the bug,after send singal ,the thread run again!
    another question
    how to detect a thread is hang?and use another thread restart it?
    thread dump
    Full thread dump Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode, sharing):
    "pool-1-thread-2" prio=1 tid=0x08447858 nid=0x5aa6 waiting on condition [0x4680f000..0x4681021c]
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1772)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:470)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:674)
    at java.lang.Thread.run(Thread.java:595)
    "pool-1-thread-1" prio=1 tid=0x08392740 nid=0x5aa5 waiting on condition [0x4678f000..0x4678ff1c]
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:118)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1772)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com.ejet.mms.MmsSend.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    "Low Memory Detector" daemon prio=1 tid=0x080a18b0 nid=0x5a9f runnable [0x00000000..0x00000000]
    "CompilerThread0" daemon prio=1 tid=0x080a0360 nid=0x5a9e waiting on condition [0x00000000..0x417e2c04]
    "Signal Dispatcher" daemon prio=1 tid=0x0809f478 nid=0x5a9d waiting on condition [0x00000000..0x00000000]
    "Finalizer" daemon prio=1 tid=0x080989e8 nid=0x5a9c in Object.wait() [0x413e4000..0x413e441c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x66c18420> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x66c18420> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=1 tid=0x08097cf8 nid=0x5a9b in Object.wait() [0x41364000..0x4136451c]
    at java.lang.Object.wait(Native Method)
    - waiting on <0x66c184a0> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:474)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x66c184a0> (a java.lang.ref.Reference$Lock)
    "main" prio=1 tid=0x0805ae68 nid=0x5a98 waiting on condition [0xbfffc000..0xbfffc4f8]
    at java.lang.Thread.sleep(Native Method)
    at com.ejet.mms.MmsStartup.main(Unknown Source)
    "VM Thread" prio=1 tid=0x08095218 nid=0x5a9a runnable
    "VM Periodic Task Thread" prio=1 tid=0x080a2d40 nid=0x5aa0 waiting on condition

  • Can forms programme run independently of its original developer enviroment?

    hello everyone.
    it is well known that when we develope a c/c++ programme
    in vc++ developer enviroment,we can finally build the programme to a exe programme that can run independently of its original developer enviroment.i want to know when we develope a oracle programme in oracle 9ias developer forms enviroment if we can also finally build the programme to a exe programme running independently of its original forms developer enviroment.
    thanks.

    No, Forms cannot be compiled into an .exe. But an Oracle9iAS Enterprise Edition install contains everything it needs to run.

  • Thread.run() method..

    I was wondering how the "Thread.run()" method get called. I started with "Thread.start()" and found it calls the "Thread.start0()" which is a native method.
    I downloaded the JDK 5 source code and went to "j2se\src\share\native\java\lang\Thread.c". In "Thread.c" I found a mapping of "start0()" with "JVM_StartThread".
    After that I opened the "hotspot\src\share\vm\prims\jvm.cpp". From line no 2257 to 2316 I saw the implementation of "JVM_StartThread".
    In side "JVM_StartThread", I saw there is a call to "Thread::start(native_thread)" and opened the "hotspot\src\share\vm\runtime\Thread.cpp". In "Thread.start()" method there is a call to "os::start_thread(thread);".
    In "hotspot\src\share\vm\runtime\os.cpp" the "os::start_thread()" calls the "pd_start_thread(thread);" method. But I did not get the "pd_start_thread(thread);" method in os.cpp.
    Note: I am java programmer and hardly understand the C/C++ languages. But had a doubt how the run() method get called and how the Thread.start() method works. But I got stuck here.
    Kindly help me to know how the flow goes, when we call the Thread.start() and how the run() method is linked to it.

    But I did not see anything in the os.cpp. In fact i did not find the "pd_start_thread(thread);" .
    void os::start_thread(Thread* thread) {
      // guard suspend/resume
      MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag);
      assert(thread->is_baby_thread(), "thread has started");
      thread->clear_is_baby_thread();
      OSThread* osthread = thread->osthread();
      // A thread may be suspended in the presence of the profiler.
      // Only start thread when it's not suspended.
      osthread->set_state(RUNNABLE);
      if (!thread->is_vm_suspended()) {
        pd_start_thread(thread);
    }

  • RMI Registry leaves thread running

    I've searched the postings about this topic and none of them have been helpful. I create an RMI registry at port 1099 in my app, use it, and then try to shut it down, but it leaves a thread running.
    The following sample code shows what my code does (in a condensed form):
    Registry registry = LocateRegistry.createRegistry(1099);
    Communicator c = new CommunicatorImpl();
    registry.rebind("//localhost/remoteserver", c );
    Naming.rebind("rmi://localhost:1099/TriggerService", c);
    registry.unbind("//localhost/remoteserver");
    Naming.unbind("rmi://localhost:1099/TriggerService");
    boolean b = UnicastRemoteObject.unexportObject(registry, true);
    System.err.println( "unexported: "+b );When I run this code in Eclipse and the code exits, I still have a process running that was spawned by "LocateRegistry.createRegistry(1099)", but I can't figure out how to get a handle for it within my program, so that I can kill it. I've read that it will end when the JVM ends, but the RMI portion of my app is only a small part and I need the rest of it to keep running. Is there a way to stop this thread?
    Thanks,
    Tony

    Well I only see 'createRegistry' and 'getRegistry' I don't see any 'destroyRegistry' methods. So I don't know.
    What I used to do back in the day was to use Runtime to start an external process for processes that I needed to kill later on. So perhaps you can use the runtime to start the registry from the command line so to speak. Then hold a reference to the returned process. Then you can kill that process when you want the registry to die. In this case you will for sure be creating a new 'jvm' for the registry to run within. (if the registry is a java program)
    Otherwise I have no idea why you would be seeing an extra java process. If you run the eclipse debugger, the debugger should not exit until the whole process is done. Even when the program is done, the debugger will still be 'live' and you can push the stop button to stop the whole launched process.

Maybe you are looking for

  • How to access static variable from a Thread class

    Kindly help me....... here's the code..... class Thread1 extends Thread int j=0; myClass2 mc = new myClass2();      public void run()           for( int a=0;a<6;a++)                     {try                          { Thread.sleep(5000);             

  • Insert row into database table via dynamic form -

    I have developed a portlet via Portal. I used a dynamic page. I replaced the default "<ORACLE>select * from scott.emp</ORACLE>" text to call a package procedure that uses HTP.P to render the web page. My goal is to show all rows in a table and allow

  • Object variable or With block variable not set (Error 91)

    I am not a developer, however i have to help to run a VB program. when using a local administrator to run this program there will be error : Object variable or With block variable not set (Error 91) however using a DOMAIN Administrator to run without

  • I've never updated my OS X 10.5.8. What can/should I update to and how do I go about it?

    I've never updated my OS X 10.5.8. What can I update to and how do I go about it?

  • FLASH PROFESSIONAL 8

    Hi, I'm have just downloaded FLASH PROFESSIONAL 8. I want to import a quick time file into flash.Please can someone walk me through this. THANKS