UI Thread blocks UN reactive

In my application, Uithread (Main thread) is blocked from estates or sensitive United Nations for some time.

There is already a user interface Thread, plus she I'm on another thread to access the data through the network. If data accessed via the network to be used on UiThread.While on adding thread becomes blocked or unresponsive.

and I use

UiApplication.getUiApplication().invokeLater(arg0);

To make the updations in my screen of the user interface.

What could be done to avoid a late response in my application.

What is happening on the Simulator or device?

I'm suspicious there is an intervention of the user interface in the thread to networking.  To check if that's your logic 'Add' which is causing the problem, you could create a dummy entry and update the ListField this way even by using a Menu item.  What works, OK, then the problem is not in your update code, but in your network.  If it fails, then you have an easy way to track down the problem!

Edit:

Just to really understand what I mean, here is a suggested menu item (just write, not compiled, not tested, you get the idea):

TestMenu MenuItem = new MenuItem ("Test", 110, 10) {}
public void run() {}

final details DeviceDetails = ;
{if (! list_obj.isFound (Details))}
UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run() {}
list_obj. AddElement (Details);
listField.insert (listField.getSize (), details.endpoint_name);
}
});

};

Tags: BlackBerry Developers

Similar Questions

  • Network UI Thread blocking

    Hello everyone, I am developing an app for Blackberry wich uses networking capabilities. The query is executed by pressing a button with the following code:

     mainButton=new BitmapButton(Bitmap.getBitmapResource("elcomercio.gif"), Bitmap.getBitmapResource("elcomercio.gif"), Field.FOCUSABLE){
                protected boolean navigationClick(int status,int time) {
                    //It automatically add itself to the screen stack
                    waitScreen=new WaitScreen();
                    TimeOutThread timeOut=new TimeOutThread(HomeScreen.this, 10000);
                    HttpHelper helper=new HttpHelper("http://www.elcomercio.com/rss/latest", null, HomeScreen.this, HttpHelper.GET);
                    UiApplication.getUiApplication().invokeLater(timeOut);
                    UiApplication.getUiApplication().invokeLater(helper);
                    return true;
                }
            };
    

    As you can see TimeOutThread and HttpHelper inherit both Thread, so that they can be called outside the main flow of execution.  Two of them also receive the current as a delegate object screen, so that I can execute methods later on the screen. in this case timeout executes the following function.

    public void onTimeout() {
            if(!didTimeout.booleanValue()){
                UiApplication.getUiApplication().popScreen(waitScreen);
                didTimeout=Boolean.TRUE;
            }
        }
    

    The timeout method is called sucessfully... even the waitScreen is poppedOut with success and the last screen is shown. But the user interface crashes right now... it is like the HttpThread I got runs always block the user interface... I know, because when the network thread times out... the user interface is responsive again. What I am doing wrong?

    You do not use your son as separate threads - instead, plan you on the event Thread run() methods (this is what invokeLater). The right way is to use their start() methods to start two threads separately. So, replace your

    UiApplication.getUiApplication().invokeLater(timeOut);
    

    with

    timeOut.start();
    

    and do the same with your thread for assistance.

    Good luck!

  • How to get lots of thread dump without killing-3?

    I am trying to solve a problem of thread blocked involving multiple threads external middleware, it blocks what locks being help in the middleware client libraries. Unfortunately in the environment, most people (including those available at 2:00 when offshore is testing) have access to Linux for the JVM WebLogic user ID, so they cannot issue a kill-3.

    Thread through the console (and WLST) dumps are not enough, because they are not full thread dumps, that is, they do not show what threads hold locks (they show only what are threads waiting for locks) - that is, they contain no lines like:

    -locked (an oracle.jdbc.driver.T4CConnection) < 0x0000000798fc9e88 >

    Is it possible to achieve this programmatically or otherwise, far from being able to issue a sigquit (kill-3) to the same user WebLogic runs under?

    WebLogic 10.3.5, Sun/Oracle Java 1.6.0_33 (64-bit) 5.6 RHEL. And, FWIW, SonicMQ 8.5 - our threads WebLogic are apparently stuck trying to write off of a TX of XA.

    Hi Steve,.

    There is a WebLogic Admin command to take dump thread. It is obsolete, but you can still use it.

    Reference http://docs.oracle.com/cd/E13222_01/wls/docs81/admin_ref/cli19.html

    Thank you

    Laurent Mathieu

  • Thread Dump Oracle Service Bus

    Hi all

    I'm new to the SOA world. I tried my hands on the OSB.

    I don't know what is the cause?

    = FULL THREAD DUMP =.
    Kill Mar 27 16:24:29 2012
    BEA JRockit (R) R27.6.1-20-104573-1.6.0_05-20081016-1236-linux-ia32

    "Main Thread" id = 1 idx = 0 x 4 tid = 28283 prio = 5 alive, natively, waiting
    [- Awaiting notification on: locking of weblogic/t3/srvr/T3Srvr@0x10533378[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to java/lang/Object.wait (J) V (Native Method)
    to java/lang/Object.wait(Object.java:485)
    to weblogic/t3/srvr/T3Srvr.waitForDeath(T3Srvr.java:811)
    [^ - Lock released pending: weblogic/t3/srvr/T3Srvr@0x10533378[fat lock]
    to weblogic/t3/srvr/T3Srvr.run(T3Srvr.java:459)
    to weblogic/Server.main(Server.java:67)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "(Manager of signals)" id = 2 idx = 0 x 8 tid = 28284 prio = 5 alive, natively, demon

    "(GC hand Thread)" id = 3 idx = 0xc tid = 28285 prio = 5 living, native, native_waiting, demon

    "(GC Worker Thread 1)" id =? IDX = 0 x 10 tid = 28286 prio = 5 alive, natively, demon

    "(GC Worker Thread 2)" id =? IDX = 0 x 14 tid = 28287 prio = 5 alive, natively, demon

    "(GC Worker Thread 3)" id =? IDX = 0 x 18 tid = 28288 prio = 5 alive, natively, demon

    "(GC working Thread 4)" id =? IDX = 0x1c tid = 28289 prio = 5 alive, natively, demon

    "(Code Generation 1 wire)" id = 4 idx = 0 x 20 tid = 28292 prio = 5 living, native, native_waiting, demon

    ID '(code optimization Thread 1)' = 5 idx = 0 x 24 tid = 28293 prio = 5 living, native, native_waiting, demon

    ID "(tâche périodique de VM) ' 6 = idx = 0 x 28 = 28294 prio = 10 tid living, native, demon"

    'Finalizer' ID = 7 idx = 0x2c tid = 28295 prio = 8 living, native, native_waiting, demon
    to jrockit/memory/Finalizer.waitForFinalizees ([Ljava/lang/object ;) I (Native Method)])
    to jrockit/memory/Finalizer.access$500(Finalizer.java:12)
    to jrockit/memory/Finalizer$4.run(Finalizer.java:159)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Reference Manager" id = 8 idx = 0 x 30 = 28296 prio = 10 tid living, native, native_waiting, demon
    at java/lang/ref/Reference.waitForActivatedQueue () Ljava/lang/ref/reference; (Native Method)
    to java/lang/ref/Reference.access$100(Reference.java:11)
    to java/lang/ref/Reference$ReferenceHandler.run(Reference.java:79)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "(Capteur événement Thread)" id = 9 idx = 0 x 34 tid = 28297 prio = 5 alive, natively, demon "

    ID = 12 "Timer-0" idx = 0 x 38 tid = 28309 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of java/util/TaskQueue@0x10159ef8[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to java/util/TimerThread.mainLoop(Timer.java:509)
    [^ - Lock released pending: java/util/TaskQueue@0x10159ef8[fat lock]
    to java/util/TimerThread.run(Timer.java:462)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Timer 1" id = 13 idx = 0x3c tid = 28374 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of java/util/TaskQueue@0x8f34020[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to java/util/TimerThread.mainLoop(Timer.java:509)
    [^ - Lock released pending: java/util/TaskQueue@0x8f34020[fat lock]
    to java/util/TimerThread.run(Timer.java:462)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '0' for the queue:"weblogic.kernel.Default (self-adjusting)"" id = 14 idx = 0 x 40 = 28375 prio = 5 tid living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x8f34b50[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x8f34b50[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "weblogic.time.TimeEventGenerator" id = 15 idx = 0 x 44 tid = 28379 prio = 9 living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/time/common/internal/TimeTable@0x8f50188[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to weblogic/time/common/internal/TimeTable.snooze(TimeTable.java:286)
    [^ - Lock released pending: weblogic/time/common/internal/TimeTable@0x8f50188[fat lock]
    to weblogic/time/common/internal/TimeEventGenerator.run(TimeEventGenerator.java:117)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "JMAPI event thread" id = 16 idx = 0 x 48 tid = 28380 prio = 5 living, native, native_waiting, demon

    "weblogic.timers.TimerThread" id = 17 idx = 0x4c tid = 28381 prio = 9 living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/timers/internal/TimerThread@0x8f594f8[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to weblogic/timers/internal/TimerThread$Thread.run(TimerThread.java:267)
    [^ - Lock released pending: weblogic/timers/internal/TimerThread@0x8f594f8[fat lock]
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '1' for the queue:"weblogic.kernel.Default (self-adjusting)"" id = 18 idx = 0 x 50 = 28385 prio = 5 tid living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x8f5d040[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x8f5d040[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    21-id = "Timer 2" idx = 0 x 54 tid = 28386 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of java/util/TaskQueue@0x8f6d748[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to java/util/TimerThread.mainLoop(Timer.java:509)
    [^ - Lock released pending: java/util/TaskQueue@0x8f6d748[fat lock]
    to java/util/TimerThread.run(Timer.java:462)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Thread-8" id = 22 idx = 0 x 58 tid = 28387 prio = 5 living, native, parking, daemon
    -Parking to wait: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0xff98b00
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.park(LockSupport.java:158)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    to java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    to weblogic/utils/concurrent/JDK15ConcurrentBlockingQueue.take(JDK15ConcurrentBlockingQueue.java:89)
    to weblogic/store/internal/PersistentStoreImpl.getOutstandingWork(PersistentStoreImpl.java:567)
    to weblogic/store/internal/PersistentStoreImpl.run(PersistentStoreImpl.java:615)
    to weblogic/store/internal/PersistentStoreImpl$2.run(PersistentStoreImpl.java:383)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    ' ExecuteThread: '0' for the queue: 'weblogic.socket.Muxer' "id = 23 idx = 0x5c tid = 28388 prio = 5 alive, natively, blocked, daemon
    [- Blocked trying to be locking: lock java/lang/String@0xffb5b88[fat]
    at jrockit/vm/Threads.waitForUnblockSignal () V (Native Method)
    to jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1674) [Inline]
    in jrockit/vm/Locks.fatLockReacquire(Locks.java:1912) [optimised]
    in jrockit/vm/Locks.lockFat(Locks.java:1780) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1311) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258) [optimised]
    in jrockit/vm/Locks.monitorEnter(Locks.java:2455) [optimised]
    to weblogic/socket/EPollSocketMuxer.processSockets(EPollSocketMuxer.java:153)
    to weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    to weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    to weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    to weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    ' ExecuteThread: '1' for the queue: 'weblogic.socket.Muxer' "id = 24 idx = 0 x 60 tid = 28389 prio = 5 alive, natively, demon
    jrockit/ext/epoll/EPoll.epollWait0 (IIII) I have (Native Method)
    to jrockit/ext/epoll/EPoll.epollWait(EPoll.java:103)
    to weblogic/socket/EPollSocketMuxer.processSockets(EPollSocketMuxer.java:156)
    [^ - Holding lock: lock of java/lang/String@0xffb5b88[fat]
    to weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    to weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    to weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    to weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    ' ExecuteThread: '2' for the queue: 'weblogic.socket.Muxer' "id = 25 idx = 0 x 64 tid = 28390 prio = 5 alive, natively, blocked, daemon
    [- Blocked trying to be locking: lock java/lang/String@0xffb5b88[fat]
    at jrockit/vm/Threads.waitForUnblockSignal () V (Native Method)
    in jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1674) [optimised]
    in jrockit/vm/Locks.lockFat(Locks.java:1775) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1311) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258) [optimised]
    in jrockit/vm/Locks.monitorEnter(Locks.java:2455) [optimised]
    to weblogic/socket/EPollSocketMuxer.processSockets(EPollSocketMuxer.java:153)
    to weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    to weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    to weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    to weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    ' ExecuteThread: '3' for the queue: 'weblogic.socket.Muxer' "id = 26 idx = 0 x 68 tid = 28391 prio = 5 alive, natively, blocked, daemon
    [- Blocked trying to be locking: lock java/lang/String@0xffb5b88[fat]
    at jrockit/vm/Threads.waitForUnblockSignal () V (Native Method)
    in jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1674) [optimised]
    in jrockit/vm/Locks.lockFat(Locks.java:1775) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1311) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258) [optimised]
    in jrockit/vm/Locks.monitorEnter(Locks.java:2455) [optimised]
    to weblogic/socket/EPollSocketMuxer.processSockets(EPollSocketMuxer.java:153)
    to weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    to weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    to weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    to weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    ' ExecuteThread: '4' for the queue: 'weblogic.socket.Muxer' "id = 27 idx = 0x6c tid = 28392 prio = 5 alive, natively, blocked, daemon
    [- Blocked trying to be locking: lock java/lang/String@0xffb5b88[fat]
    at jrockit/vm/Threads.waitForUnblockSignal () V (Native Method)
    in jrockit/vm/Locks.fatLockBlockOrSpin(Locks.java:1674) [optimised]
    in jrockit/vm/Locks.lockFat(Locks.java:1775) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStageHard(Locks.java:1311) [optimised]
    in jrockit/vm/Locks.monitorEnterSecondStage(Locks.java:1258) [optimised]
    in jrockit/vm/Locks.monitorEnter(Locks.java:2455) [optimised]
    to weblogic/socket/EPollSocketMuxer.processSockets(EPollSocketMuxer.java:153)
    to weblogic/socket/SocketReaderRequest.run(SocketReaderRequest.java:29)
    to weblogic/socket/SocketReaderRequest.execute(SocketReaderRequest.java:42)
    to weblogic/kernel/ExecuteThread.execute(ExecuteThread.java:145)
    to weblogic/kernel/ExecuteThread.run(ExecuteThread.java:117)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "VDE Transaction processor Thread" id = 30 idx = 0 x 70 tid = 28397 prio = 2 alive, native, waiting, demon
    [- Awaiting notification on: locking of com/octetstring/vde/backend/standard/TransactionProcessor@0xff84350[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to java/lang/Object.wait (J) V (Native Method)
    to java/lang/Object.wait(Object.java:485)
    to com/octetstring/vde/backend/standard/TransactionProcessor.waitChange(TransactionProcessor.java:367)
    [^ - Lock released pending: com/octetstring/vde/backend/standard/TransactionProcessor@0xff84350[fat lock]
    to com/octetstring/vde/backend/standard/TransactionProcessor.run(TransactionProcessor.java:212)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "DoSManager" id = 33 idx = 0 x 78 tid = 28401 prio = 6 alive, natively, sleep, native_waiting, demon
    to java/lang/Thread.sleep (J) V (Native Method)
    to com/octetstring/vde/DoSManager.run(DoSManager.java:433)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "OracleTimeoutPollingThread" id = 34 idx = 0x7c tid = 28478 prio = 10 alive, natively, sleep, native_waiting, demon
    to java/lang/Thread.sleep (J) V (Native Method)
    to oracle/jdbc/driver/OracleTimeoutPollingThread.run(OracleTimeoutPollingThread.java:150)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Wire-12" id = 35 idx = 0 x 80 tid = 28492 prio = 5 living, native, parking, daemon
    -Parking to wait: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x18625de8
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.park(LockSupport.java:158)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    to java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    to weblogic/utils/concurrent/JDK15ConcurrentBlockingQueue.take(JDK15ConcurrentBlockingQueue.java:89)
    to weblogic/store/internal/PersistentStoreImpl.getOutstandingWork(PersistentStoreImpl.java:567)
    to weblogic/store/internal/PersistentStoreImpl.run(PersistentStoreImpl.java:615)
    to weblogic/store/internal/PersistentStoreImpl$2.run(PersistentStoreImpl.java:383)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    'Timer-3' id = 36 idx = 0 x 84 tid = 28503 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of java/util/TaskQueue@0x18413578[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    java/lang/Object.wait (J) V (Native Method) [reduced]
    to java/util/TimerThread.mainLoop(Timer.java:509)
    [^ - Lock released pending: java/util/TaskQueue@0x18413578[fat lock]
    to java/util/TimerThread.run(Timer.java:462)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '2' for the queue:"weblogic.kernel.Default (self-adjusting)"" id = 37 idx = 0 x 88 = 28635 prio = 5 tid living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x10b10cc0[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x10b10cc0[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Thread-14" id = 38 idx = 0x8c tid = 28643 prio = 5 living, native, parking, daemon
    -Parking to wait: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x109acbd8
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.park(LockSupport.java:158)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    to java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    to weblogic/utils/concurrent/JDK15ConcurrentBlockingQueue.take(JDK15ConcurrentBlockingQueue.java:89)
    to weblogic/store/internal/PersistentStoreImpl.getOutstandingWork(PersistentStoreImpl.java:567)
    to weblogic/store/internal/PersistentStoreImpl.run(PersistentStoreImpl.java:615)
    to weblogic/store/internal/PersistentStoreImpl$2.run(PersistentStoreImpl.java:383)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '3' for queue:"weblogic.kernel.Default (self-adjusting)"" id = 39 idx = 0 x 90 = 28663 prio = 5 tid living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x21bc7c28[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x21bc7c28[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "pool-1-wire-1" id = 40 idx = 0 x 94 tid = 28691 prio = 5 living in native, parked
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.parkNanos(LockSupport.java:198)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1963)
    to java/util/concurrent/DelayQueue.take(DelayQueue.java:164)
    to java/util/concurrent/ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:582)
    to java/util/concurrent/ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:575)
    to java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
    to java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "LDAPConnThread-0 ldap://admin-ryprdsbB.baplc.com:7999" id = 41 idx = 0 x 98 = 28800 prio = 5 tid living, native, demon
    to jrockit/net/SocketNativeIO.readBytesPinned (Ljava/io/FileDescriptor; [I (Native Method) BILL)
    to jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:46)
    to java/net/SocketInputStream.socketRead0 (Ljava/io/FileDescriptor; [BILL) I (SocketInputStream.Java)
    to java/net/SocketInputStream.read(SocketInputStream.java:129)
    to java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
    to java/io/BufferedInputStream.read(BufferedInputStream.java:237)
    [^ - Holding lock: lock of java/io/BufferedInputStream@0x1a960cd0[biased]
    to netscape/ldap/ber/stream/BERElement.getElement(BERElement.java:101)
    to netscape/ldap/LDAPConnThread.run(LDAPConnThread.java:538)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Timer-4" id = 42 idx = 0x9c tid = 28819 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of java/util/TaskQueue@0x1a38a930[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to java/lang/Object.wait (J) V (Native Method)
    to java/lang/Object.wait(Object.java:485)
    to java/util/TimerThread.mainLoop(Timer.java:483)
    [^ - Lock released pending: java/util/TaskQueue@0x1a38a930[fat lock]
    to java/util/TimerThread.run(Timer.java:462)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "LDAPConnThread-1 ldap://admin-ryprdsbB.baplc.com:7999" id = 43 idx = 0xa0 = 28824 prio = 5 tid living, native, demon
    to jrockit/net/SocketNativeIO.readBytesPinned (Ljava/io/FileDescriptor; [I (Native Method) BILL)
    to jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:46)
    to java/net/SocketInputStream.socketRead0 (Ljava/io/FileDescriptor; [BILL) I (SocketInputStream.Java)
    to java/net/SocketInputStream.read(SocketInputStream.java:129)
    to java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
    to java/io/BufferedInputStream.read(BufferedInputStream.java:237)
    [^ - Holding lock: lock of java/io/BufferedInputStream@0x16a8f110[biased]
    to netscape/ldap/ber/stream/BERElement.getElement(BERElement.java:101)
    to netscape/ldap/LDAPConnThread.run(LDAPConnThread.java:538)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '4' for queue:"weblogic.kernel.Default (self-adjusting)"" id = 44 idx = 0xa4 tid = 28844 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x1efa17c0[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x1efa17c0[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "ExecuteThread [ASSET]: '5' for queue:"weblogic.kernel.Default (self-adjusting)"" id = 45 idx = 0xa8 tid = 28845 prio = 5 living, native, waiting, demon
    [- Awaiting notification on: locking of weblogic/work/ExecuteThread@0x1efa2410[fat]
    at jrockit/vm/Threads.waitForNotifySignal (object/lang/JLjava ;) Z (Native Method)
    to jrockit/vm/Locks.wait(Locks.java:2250) [Inline]
    to java/lang/Object.wait(Object.java:485) [Inline]
    in weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:157) [optimised]
    [^ - Lock released pending: weblogic/work/ExecuteThread@0x1efa2410[fat lock]
    to weblogic/work/ExecuteThread.run(ExecuteThread.java:178)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "Thread-16" id = 46 idx = 0xac tid = 28882 prio = 5 living, native, parking, daemon
    -Parking to wait: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x19e63430
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.park(LockSupport.java:158)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    to com/bea/alsb/alert/TaskCollector.run(TaskCollector.java:59)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    "pool-3-wire-1" id = 47 idx = 0xb0 tid = 29009 prio = 5 living in native, parked
    -Parking to wait: java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject@0x19f2fd58
    to jrockit/vm/Locks.park0 (J) V (Native Method)
    to jrockit/vm/Locks.park(Locks.java:2506)
    to sun/misc/Unsafe.park (ZJ) V (Native Method)
    to java/util/concurrent/locks/LockSupport.park(LockSupport.java:158)
    to java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
    to java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:358)
    to java/util/concurrent/ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:946)
    to java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:906)
    to java/lang/Thread.run(Thread.java:619)
    to jrockit/vm/RNI.c2java (IIIII) V (Native Method)
    -end of the trace

    Hello

    Sign on support.oracle.com and look for:
    (1) problem: 100% use of the processor because of blocked Threads observed with Apache Xml beans [ID 1307201.1]
    (2) NOTE: 977591.1 -Thread blocked problem in Oracle WebLogic Server using Apache XMLBeans v2.3

    These two looks like your problem. You probably need to update the library XMLBeans.

    Best regards
    Karol Muszynski

  • 125, hogging threads waiting for lock oracle.jdbc.driver.T4CConnection@5500

    We use DBAdapter in soa suite 11 g (xa thin drivers, AIX platform) to talk to the database. At one point today, we could see the system WLS slows down considerably and thread dumps could see 125 hogging son everyone waits for the next lock:

    ' ExecuteThread: '16' for queue: '(self-adjusting) weblogic.kernel.Default' "waiting for lock *oracle.jdbc.driver.T4CConnection@55005500* BLOCKED
    oracle.jdbc.driver.T4CXAResource.doRollback(T4CXAResource.java:648)
    oracle.jdbc.xa.client.OracleXAResource.rollback(OracleXAResource.java:1148)
    weblogic.jdbc.wrapper.VendorXAResource.rollback(VendorXAResource.java:78)
    weblogic.jdbc.jta.DataSource.rollback(DataSource.java:1146)

    Can someone point to this oracle.jdbc.driver.T4CConnection@55005500. Is that a lock on a connection object? If so this means that all 125 discussions were waiting for a single connection? The source of data used has default settings for the connection pool.

    I couldn't see any thread thread discharge which States that it is now the same lock, possibly could be a problem with the way thread dump is generated in AIX

    Can someone shed some light on this?

    Hello. Grep just for T4CConnection@55005500 in the discharge. You will see the number of threads
    blocked (as you would expect) on this point, but only one thread that already have this object
    locked and uses it. Unfortunately, the thread is suspended in a call to DBMS, so it cannot
    go ahead and release the connection object and let all other threads proceed.
    I has you pointed out only one thread.

  • Real-time, semaphores and Subvi

    Hello

    We use a handful of semaphores in our application of Realtime (2015) on a cRIO.  For cleanliness, I wanted to encapsulate each semaphore in their own VI.  When I did the semaphores didn't work properly.  I feel like it is fundamentals of labview which it reveals, and I need to know!

    So, below, is more or less the standard semaphore HelloWorld program - it's similar to the Labview Semaphore.vi Simple example.  'Digital' and 'Digital Slow' indicators increase more or less increments.

    The next thing I did was create a VI load functions of semaphore to acquire and release, as shown below.  You can ask "what's the point?  In my desired version of VI the semaphore would not control well, rather "prevail" within the VI (and avoid passing the semaphore throughout our program).  For this display (and test) I wanted to make things as simple as possible so that I spend in the semaphore.  Notice that the VI is not reentrant, making simple threaded.

    Using the VI in the test program is shown below (in a disabled state)

    It does not work!  I followed the program and acquiring works (a product thread and the other blocks), but will block the release (on the thread of the "Acquis").  Look in the Labview Release Semaphore.vi code I don't see a reason it would block (I can't add the points stop or probes to this code).

    Can someone make sense this for me?

    Thank you

    Steve

    I made this error even with a motor of Action using queues.

    Your problem is that only 1 appeal to the Subvi can arrive on time.  If you have a thread the semaphore by the Subvi.  Meanwhile, the other thread is waiting to be able to use the Subvi to acquire the semaphore so.  If the first thread finishes the consecutively Subvi and fact its task.  Meanwhile the other thread is blocked in the Subvi waiting for the semaphore to be released.  Now the first thread is made his duty and try to go to the Subvi to release the semaphore, but this is impossible since the second thread always uses the Subvi.  If the second thread blocks the first thread to use the Subvi and the first thread blocks the second thread by being not able to release the semaphore.  You are in a bind.

    Why do you use semaphores anyway?  I found that they are rarely needed in a properly modulated code.

  • Update for Windows Vista (641, 80070641 codes)

    I'm having a similar problem to the long string of Bob and Maurice detective.
    I think I have SP2, but do not know how to check this.
    microsoft Setup seems not to be present, but errors and messages in the list of services on the computer.
    1 of 9 updates of microsoft succeeds? and 8 fail, which seems at odds with the symptoms.  Other package programs will not install either.

    Last suggestion of Maurice, repeated below fails with the message "Windows Installer Service is not to be accessible"

    1. open Internet Explorer (only!) to http://support.microsoft.com/kb/910336 [ignore the title & symptoms].

    1B. do disappear/close the window pop up "Automated troubleshooting"!-then...

    1 c. without taking into account possible similar, or '' not recommended '' warnings run difficulty he 50202 in modes DEFAULTand then AGGRESSIVE. [1]

    2 reboot & then make a new race of updates Windows and make a custom scan (a manual check for updates.)

    Take only the critical or important updates.

    ===============================================
    [1] running the difficulty in AGGRESSIVE mode will delete your Update History [i.e. to the Windows Update Web site when you do a review of the installation previous story] but not the list of installed updates in XP or Vista/Windows 7 remove programs programs & Features.

    IF you have a subsequent failure of Windows Update, please create your own new Question.

    And I would ask if the solution from Mauritius to SP1 would work for SP2?   It seemed to me that a solution had been found.

    Last suggestion from other threads block:

    Hello

    What is the error message you get when you try to install Windows install 4.5?

    Given that windows install 4.5 if system is windows vista service pack 1, service pack 2 is installed it will not install.

    You can uninstall SP2 and try to install win Installer 4.5, and then try to install the update.

  • Performance TextFilter problem...

    Hi, I use textFielter in my CustomEditField in my Page of my connection request. TextFilter.Interger works fine but the problem is that it slows down the speed of typing in my editField... I also write my codes for my customTextFilter, login and CustomEdit Field... Kindly give me solution and suggestions for that...

    ----------------------------------------------LoginPage---------------------------------------------------------

    package mypackage;

    import java.util.Date;

    Import net.rim.device.api.lowmemory.LowMemoryListener;
    Import net.rim.device.api.lowmemory.LowMemoryManager;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.component.EditField;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.ui.text.TextFilter;

    /**
    * A class that extends the class screen, which offers default standard
    * behavior for BlackBerry GUI applications.
    */
    public class AgAppLoginPage extends screen implements FieldChangeListener / /, LowMemoryListener
    {

    Private CustomEditField txtMobileNumber;
    Private EditField editField.
    Private CustomPasswordEditField txtPinNumber;
    Private CustomButtonField btnLogin;
    private static String stxtMobileNumber;
    private static String stxtPinNumber;

    public AgAppLoginPage()
    {

    VerticalFieldManager vertMgr = VerticalFieldManager(Manager.VERTICAL_SCROLL | nouveau Manager.VERTICAL_SCROLLBAR |) USE_ALL_WIDTH | USE_ALL_HEIGHT)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {

    Super.sublayout (Display.getWidth (), Display.getHeight ());
    setExtent (Display.getWidth (), Display.getHeight ());

    }

    };

    LockedHeaderHorizontalManager HorMgr = new LockedHeaderHorizontalManager("LoginPage");

    vertMgr.add (HorMgr);

    CustomLabelField lblTop = new CustomLabelField ("Sign In", Font.getDefault () .getHeight () + 10, Field.FIELD_HCENTER |) DrawStyle.LEFT);
    txtMobileNumber = new CustomEditField ("Mobile number");
    txtPinNumber = new CustomPasswordEditField ("PIN");
    editField = new EditField("MyTextFilterEditField","");
    btnLogin = new CustomButtonField ("Log In", "Wide", "login.png");

    lblTop.setMargin (5,0,0,0);
    vertMgr.add (lblTop);

    txtMobileNumber.setMargin (5,0,0,0);
    vertMgr.add (txtMobileNumber);

    txtPinNumber.setMargin (5,0,0,0);
    vertMgr.add (txtPinNumber);

    vertMgr.add (editField);
    btnLogin.setMargin (5,0,0,0);
    btnLogin.setChangeListener (this);
    vertMgr.add (btnLogin);
    Add (vertMgr);
    This.Add
    }

    public void close()
    {
    If (Dialog.ask (4, "Do you really want to leave MCB-Lite") == Dialog.OK)
    System.Exit (0);
    }

    ' Public Sub fieldChanged (field field, int context)
    {
    if(Field == btnLogin)
    {
    If (txtMobileNumber.getTextLength () == 0 | txtPinNumber.getTextLength () == 0)
    {
    Dialog.Alert ("Please enter all info!");
    }
    on the other
    {
    stxtMobileNumber = txtMobileNumber.getText ();
    txtMobileNumber.setFilter (MyTextFilter.get (TextFilter.NUMERIC));
    editField.setFilter (MyTextFilter.get (TextFilter.NUMERIC));
    stxtPinNumber = txtPinNumber.getText ();
    getResponse processRequestAndWait = new processRequestAndWait();
    AgAppPleaseWaitScreen.showScreenAndWait (getResponse);
    txtPinNumber = null;

    }
    }

    }

    static class processRequestAndWait implements Runnable
    {

    public void run()
    {
    final String [] [] xmlResponse.

    If (AgAppHelperMethods.agAppConnection.CompareTo ("SMS")! = 0)
    {
    xmlResponse = AgAppHelperMethods.AgAppXMLParser ("AG_IT_App/AgMainServlet? messageType = LOG & pine = "+ AgAppHelperMethods.getPIN (stxtPinNumber) +" & mobile = "+ stxtMobileNumber +"& source ="+ stxtMobileNumber +" & channel = INTERNET; deviceside = true");
    = AgAppHelperMethods.AgAppXMLResponse xmlResponse (XMLResponse.login ());
    }
    on the other
    {
    AgAppHelperMethods.msg = "AGLOG" + stxtMobileNumber + stxtMobileNumber + AgAppHelperMethods.getPIN (stxtPinNumber); ".
    xmlResponse = AgAppHelperMethods.AgAppSMSParser ();
    }

    UiApplication.getUiApplication () .invokeLater (new Runnable()
    {
    public void run()
    {
    if(xmlResponse[0][0].) CompareTo ("null") == 0)
    {
    UiApplication.getUiApplication () .pushScreen (new AgAppResponseScreen ("Login screen", "host not Responding", Font.getDefault () .getHeight ()));
    }
    if(xmlResponse[1][1].) CompareTo("00") == 0)
    {
    TimeCalculator.timeStart = new Date();
    TimeCalculator.timeEnd = new Date();

    AgAppHelperMethods.varName = xmlResponse [3] [1];
    AgAppHelperMethods.varBalance = xmlResponse [4] [1];
    AgAppHelperMethods.varMobileNo = stxtMobileNumber;
    UiApplication.getUiApplication () .pushScreen (new AgAppHomePage());

    }
    on the other
    {
    UiApplication.getUiApplication () .pushScreen (new AgAppResponseScreen ("Login Screen", AgAppHelperMethods.getStatus(xmlResponse[1][1]), Font.getDefault () .getHeight ()));
    }
    }
    });
    }

    }

    }

    ----------------------------------------------------CustomEditField----------------------------------------------------------

    package mypackage;

    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.XYEdges;
    Import net.rim.device.api.ui.component.EditField;
    Import net.rim.device.api.ui.decor.BackgroundFactory;
    Import net.rim.device.api.ui.decor.Border;
    Import net.rim.device.api.ui.decor.BorderFactory;
    Import net.rim.device.api.ui.text.TextFilter;

    class CustomEditField extends EditField
    {
    Private boolean _focusableFlag;
    private String defaultText;

    public CustomEditField (String defaultText)
    {
    Super (FIELD_HCENTER);
    this.defaultText = defaultText;

    }

    {} public void setFocusable (boolean focusable)
    _focusableFlag = active;
    }

    protected void layout (int width, int height)
    {
    Width = Font.getDefault () .derive (Font.BOLD, Font.getDefault () .getHeight () - 2) .getAdvance ("transfer of my linked account") + 40.
    height = Font.getDefault () .getHeight ();
    Super.Layout (Width, Height);
    super.setExtent (width, height);
    super.setFilter (MyTextFilter.get (TextFilter.NUMERIC));

    }

    protected void paint (Graphics g)
    {
    setBorder (BorderFactory.createRoundedBorder (new XYEdges (5,5,5,5), 0xD0D0D0, Border.STYLE_SOLID));
    setBackground (BackgroundFactory.createSolidBackground (Color.WHITE));

    If (Super.GetText () .length () == 0)
    {
    g.setColor (0xD0D0D0);
    g.drawText (defaultText, 0, 0);
    }

    g.setColor (0x484C54);
    Super.Paint (g);

    }

    }

    ----------------------------------------------------------MyTextFilter---------------------------------------------------

    package mypackage;

    Import net.rim.device.api.ui.text.TextFilter;
    Import net.rim.device.api.util.CharacterUtilities;

    SerializableAttribute public class MyTextFilter extends TextFilter {}

    public char convert (character char, int status) {}
    TODO self-generating method stub
    If (! validate (character))
    {
    return 0;
    }
    Returns the character;
    }

    public boolean validate (char character) {}
    TODO self-generating method stub

    If (CharacterUtilities.isDigit (character))
    Returns true;
    ElseIf (CharacterUtilities.isLetter (character))
    {
    If ((caractère == serait ') |) (caractère == serait '))
    {
    Returns true;
    }
    }
    Returns false;
    }
    }

    It's a little hard to dig through the wall of the code, please use code tags next time.

    I don't think that the textfilter slows your app, I think that you run on the user interface thread things that belong here.
    Move to a thread blocking operations separate, you can use a callback model, for example.
    See
    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

  • Autologin fault after the forgotten password Action

    Hello

    We have (11.1.2.2.4) IOM / OAM (11.1.2.2.5)/OUD(11.1.2.2.1) integrated. We have made the management of users and password management use case implementation.

    After the forgotten password action, the user should ideally be auto connected to the resource to which they want to access. But here, they're trying to autologin, we get no answer which records the time that we are witnessing a thread blocked in IOM. Please find the attached log. Its showing IOM tries to do automatic login and his breaks down.


    Now these blocked thread are at the origin of the problem to the server of the IOM. Can you please let us know how to fix the automatic connection failure. This error we get now on pre-production and prod env.


    We already checked Doc-ID 1554741.1 and it did not help.

    ==========

    28 - Sep - 2015 11:38:53 CEST > < WARNING > < JNDI > < BEA-050007 > < an attempt was made to search for the global resource without version 'tail' of a version of the application "IOM [Version = 11.1.2.0.0]. This can potentially cause conflicts the uses of the global resource among the multiple versions of the application. >

    < 2015 - sep - 28 11:38:55 CEST > < error > < OAM Autologin Logger > < BEA-000000 > < user login for the user with the new password apatilfailed! >

    < 2015 - sep - 28 11:38:55 CEST > < error > < OAM Autologin Logger > < BEA-000000 > < a mistake occurred during the autologin >

    < 2015 - sep - 28 11:38:55 CEST > < error > < oracle.iam > < BEA-000000 > < INTERNAL ERROR: Autologin is not oracle.iam.ui.platform.sso.exception.AutoLoginException: an error occurred during the autologin: >

    < 2015 - sep - 28 11:47:11 CEST > < error > < WebLogicServer > < BEA-000337 > < [STUCK] ExecuteThread: '23' for the queue: "weblogic.kernel.Default (self-adjusting)" has been occupied for the second "646" working on demand "Workmanager: OIMWorkManager, Version: 0, scheduled = true, Started = true, start time: 646695 ms.

    [

    POST /identity/faces/forgotpassword?_adf.ctrl-state=13nkdhhdjd_95 HTTP/1.1

    Accept: * / *.

    Content-Type: application/x-www-formulaires-urlencoded; Charset = UTF-8

    ADF-ads-Page-Id: 1

    ADF-Rich-Message: true

    Referer: https://app.example.com/identity/faces/forgotpassword?backUrl=https%3A%2F%2Fapp-ext.example.com%3A443%2Fportal_authentication_service%2Fappmanager%2Fmerportal%2Fdesktop%3F_nfpb%3Dtrue%26_pageLabel%3Dportals_testportal_portal_page_106&_afrWindowMode=0&_afrLoop=854893960595555&_adf.ctrl-state=13nkdhhdjd_95

    Accept-Language: en - us

    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729 .NET CLR 3.0.30729; Media Center PC 6.0; NET4.0C;. NET4.0E; Tablet PC 2.0)

    Content-Length: 387

    Cache-Control: no cache

    Cookie: _ga = GA1.3.569926938.1440583332; ADRUM_BTa = R:321 | g:35c2fc21 - b41e-486-ae9b-f798e1c55792; PRODUCER_AUTHENTICATION_SESSION = h5myWJXR1qNTqd2zdrT0Q2tjnTTylDVZGxXJWNrM6gGXwh7LPRCM! 1223761332; JSESSIONID = lQqKWJXSxyTHRmFyLgJnnTLWwGPwnyJ7tLGqPvZsdTN2bSSDTQNl! 1223761332; NSC_mc_wtsw_Hbcsjfm_Fyufsobm = ffffffff09801a3545525d5f4f58455e445a4a422851; UserAuthdOnce = false; oimjsessionid = GsGtWJJT811HQGRbDJnVG8pn9rFnvwQN4p2vzbLDjfkcbkLJvM95! 1835151121!-1745376563; _WL_AUTHCOOKIE_oimjsessionid = eOgy8ynWy25JFSqtsCKi; PRODUCER_DATASUBMISSIONCONTROLLER_SESSION = ST9QWJXHnkZHy1pph3J8WyB6TyhRVvytGL7ZcfWPVzTjyQ9YJHwQ! 1223761332; _WL_AUTHCOOKIE_PRODUCER_DATASUBMISSIONCONTROLLER_SESSION = Y2rWv5yus-r5AwOYDPFq; PRODUCER_ADMINISTRATIONCONTROLLER_SESSION = k23HWJXL1VDs9WgjHr5ymLFzyWZnmMrhsppfQF7FpYnCpwZYpg5j! 1223761332; _WL_AUTHCOOKIE_PRODUCER_ADMINISTRATIONCONTROLLER_SESSION = 2Eo-goTVYsO4IjpXgQSI; PRODUCER_SCHEDULEMANAGEMENTCONTROLLER_SESSION = 1hmKWJXL8p1ndMTnvv1mlx2yx8m6G07Z6ghBhThWjqhwdLBTfszG! 1223761332; _WL_AUTHCOOKIE_PRODUCER_SCHEDULEMANAGEMENTCONTROLLER_SESSION = L0d1pIFCXhc16jhsKUr6; OAMAuthnCookie_app.example.com:443=zld9urARI4HcsbQE%2FwPf3cx5hzeN6hfqUhcvyOpPy5q4aKpBbwKfrt9QqiRx9mvz2VfzGRx3mIEUeRuYFhfpj9oKon0pGTzo9DF9kSjbtF7UgDTK5fY2AgVkl0WE6I%2B%2Bn4eRBFX2NAit6tWmAvGjuDBs0jHUiY3gfHIlH3N1W0UcY33r1MTLn9vFCt0OjXclvwuQ6oplr8OSSlOE4Jhe3zFvrfzIPKOgsDL6PfK5iej6UIuGX5ZbYJLH%2BP6ikqfn218P5xKfFDd50iwBH8TVPU64HeOCqB5cp1LZCQNKdtb3EkTOAA%2BlHXB9eRyUVAXt; ADRUM_BT1 = R:321 | i: 74626

    IS_SSL: ssl

    Accept-encoding: identity

    ECID-background: 1.0058Cl4thyAEoIW5Tzp2ic0006ZG00000Z; kZjE1ZDLIPHLj9OP_UOTdKTUj6POZLRSj6RRmNRRoGTOnJVTjISP

    Connection: Keep-Alive

    X-Forwarded-For: 172.16.102.56

    Proxy-Client-IP: 10.136.4.253

    WebLogic-X-KeepAliveSecs: 30

    X WebLogic-request-ClusterInfo: true

    x weblogic-cluster-hash: LU + 8PjjXpmbjjPfOF4PNxp5znUw

    '] ", which is more than the time configured (StuckThreadMaxTime) of '600' seconds. Stack trace:

    NULL >

    < 2015 - sep - 28 11:47:11 CEST > < opinion > < Diagnostics > < BEA-320068 > < Watch "StuckThread" with severity "Notice" on the server "oim_server2" released on 28-Sep-2015 11:47:11 CEST. Details of the notification:

    WatchRuleType: Journal

    WatchRule: (SEVERITY = "Error") AND ((MSGID = ' WL-000337') OR (MSGID = "BEA-000337'"))

    WatchData: DATE = 28-Sep-2015 11:47:11 CEST SERVER = oim_server2 MESSAGE = [STUCK] ExecuteThread: '23' for the queue: "weblogic.kernel.Default (self-adjusting)" has been occupied for the second "646" working on demand "Workmanager: OIMWorkManager, Version: 0, scheduled = true, Started = true time, began: 646695 ms.

    [

    POST /identity/faces/forgotpassword?_adf.ctrl-state=13nkdhhdjd_95 HTTP/1.1

    Accept: * / *.

    Content-Type: application/x-www-formulaires-urlencoded; Charset = UTF-8

    ADF-ads-Page-Id: 1

    ADF-Rich-Message: true

    Referer: https://app.example.com/identity/faces/forgotpassword?backUrl=https%3A%2F%2Fapp-ext.example.com%3A443%2Fportal_authentication_service%2Fappmanager%2Fmerportal%2Fdesktop%3F_nfpb%3Dtrue%26_pageLabel%3Dportals_testportal_portal_page_106&_afrWindowMode=0&_afrLoop=854893960595555&_adf.ctrl-state=13nkdhhdjd_95

    Accept-Language: en - us

    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729 .NET CLR 3.0.30729; Media Center PC 6.0; NET4.0C;. NET4.0E; Tablet PC 2.0)

    Content-Length: 387

    Cache-Control: no cache

    Cookie: _ga = GA1.3.569926938.1440583332; ADRUM_BTa = R:321 | g:35c2fc21 - b41e-486-ae9b-f798e1c55792; PRODUCER_AUTHENTICATION_SESSION = h5myWJXR1qNTqd2zdrT0Q2tjnTTylDVZGxXJWNrM6gGXwh7LPRCM! 1223761332; JSESSIONID = lQqKWJXSxyTHRmFyLgJnnTLWwGPwnyJ7tLGqPvZsdTN2bSSDTQNl! 1223761332; NSC_mc_wtsw_Hbcsjfm_Fyufsobm = ffffffff09801a3545525d5f4f58455e445a4a422851; UserAuthdOnce = false; oimjsessionid = GsGtWJJT811HQGRbDJnVG8pn9rFnvwQN4p2vzbLDjfkcbkLJvM95! 1835151121!-1745376563; _WL_AUTHCOOKIE_oimjsessionid = eOgy8ynWy25JFSqtsCKi; PRODUCER_DATASUBMISSIONCONTROLLER_SESSION = ST9QWJXHnkZHy1pph3J8WyB6TyhRVvytGL7ZcfWPVzTjyQ9YJHwQ! 1223761332; _WL_AUTHCOOKIE_PRODUCER_DATASUBMISSIONCONTROLLER_SESSION = Y2rWv5yus-r5AwOYDPFq; PRODUCER_ADMINISTRATIONCONTROLLER_SESSION = k23HWJXL1VDs9WgjHr5ymLFzyWZnmMrhsppfQF7FpYnCpwZYpg5j! 1223761332; _WL_AUTHCOOKIE_PRODUCER_ADMINISTRATIONCONTROLLER_SESSION = 2Eo-goTVYsO4IjpXgQSI; PRODUCER_SCHEDULEMANAGEMENTCONTROLLER_SESSION = 1hmKWJXL8p1ndMTnvv1mlx2yx8m6G07Z6ghBhThWjqhwdLBTfszG! 1223761332; _WL_AUTHCOOKIE_PRODUCER_SCHEDULEMANAGEMENTCONTROLLER_SESSION = L0d1pIFCXhc16jhsKUr6; OAMAuthnCookie_app.example.com:443=zld9urARI4HcsbQE%2FwPf3cx5hzeN6hfqUhcvyOpPy5q4aKpBbwKfrt9QqiRx9mvz2VfzGRx3mIEUeRuYFhfpj9oKon0pGTzo9DF9kSjbtF7UgDTK5fY2AgVkl0WE6I%2B%2Bn4eRBFX2NAit6tWmAvGjuDBs0jHUiY3gfHIlH3N1W0UcY33r1MTLn9vFCt0OjXclvwuQ6oplr8OSSlOE4Jhe3zFvrfzIPKOgsDL6PfK5iej6UIuGX5ZbYJLH%2BP6ikqfn218P5xKfFDd50iwBH8TVPU64HeOCqB5cp1LZCQNKdtb3EkTOAA%2BlHXB9eRyUVAXt; ADRUM_BT1 = R:321 | i: 74626

    IS_SSL: ssl

    Accept-encoding: identity

    ECID-background: 1.0058Cl4thyAEoIW5Tzp2ic0006ZG00000Z; kZjE1ZDLIPHLj9OP_UOTdKTUj6POZLRSj6RRmNRRoGTOnJVTjISP

    Connection: Keep-Alive

    X-Forwarded-For: 172.16.102.56

    Proxy-Client-IP: 10.136.4.253

    WebLogic-X-KeepAliveSecs: 30

    X WebLogic-request-ClusterInfo: true

    x weblogic-cluster-hash: LU + 8PjjXpmbjjPfOF4PNxp5znUw

    '] ", which is more than the time configured (StuckThreadMaxTime) of '600' seconds. Stack trace:

    NULL the subsystem = WebLogicServer USERID < WLS Kernel > = SEVERITY = error THREAD = ExecuteThread [ASSET]: '15' for queue: MSGID 'weblogic.kernel.Default (self-adjusting)' = BEA - 000337 TXID the CONTEXTID = 995a12fdb0c6819d:dfc9ad8:14fe162b9c5 = sd2oappzu10.fsa.gov.uk = MACHINE:-8000 - 00000000000 has 8221 TIMESTAMP = 1443437231754

    WatchAlarmType: AutomaticReset

    WatchAlarmResetPeriod: 600000

    >

    < 2015 - sep - 28 11:47:11 CEST > < emergency > < oracle.dfw.incident > < BEA-000000 > < incident 266 > created in "BEA-000337 [WebLogicServer]" key problem

    WebLogic Server Authentication with LDAP provider hangs intermittently (Doc ID 1436044.1)

    This solved!

  • OSB &gt; performance

    Hello


    How can I avoid Threads blocked in my approach? (this causes instability on my environment). Is there a guide for configuration for OSB 11 g performance? or should I implements a kind of desing pattern on my evolution?


    Thanks in advance.


    MC

    In WLS Console, navigate to the environment-> Workmanagers. Create new Workmanager, give it a name and target to appropriate server. Then click on the boxes and newly created WM: "'ignore blocked Threads '."

    Then assign the requestclasses appropriate, created according to the blog mentioned earlier.

    (Sorry for the late reply, to be busy at my client)

    Kind regards
    Martian

  • Impossible to install Illustrator CS2 on Mac OSX Yosemite

    I'm unable to install Adobe Illustrator CS2 on my mac (OX Yosemite 10.10.3) because it gives the error "The Installation HFS disk no is not supported." However, the drive that I installed is HFS + and should be able to withstand that. In disk utility, I confirmed that the format is Mac OS extended (journaled), what is HFS +. I also ran check disk and disk utility repair disk, but both showed that the volume seems to be OK and I still couldn't install Illustrator.

    Does anyone found a workaround for this problem? I've seen a few old threads blocked on this issue, but they did not provide an answer to my question.

    CS2 can not be installed on OS X Yosemite at all regardless of the format of your hard drive.

    CS2 is a PowerPC application intended for the former PowerPC based Mac processors.

    Macs today have Intel processors that cannot run PowerPC applications without the Rosetta utility previously made available by Apple. OS X not supported Rosetta since OS X 10.7 "Lion" for Mac of today cannot run PowerPC as CS2 applications.

    Rosetta (software) - Wikipedia, the free encyclopedia

  • The requests hung and implementation Oracle driver thin query timeout

    We are seeing occasional cases of threads blocked, where the code is in Oracle thin XA of the code driver waiting for a socket read a response from the database. Usually only one thread at a time. The connection is never ending and we close WebLogic to clear it. DBA tells us that all connections for the RAC 11 g of our guests cluster members are inactive, with no hanging transactions or long term.

    In this case every few cases of days between two WebLogic 10.3.5 grouped in our QA environment, is generally not the same time on both servers (we had four incidents, the other had one, in the last 15 days). Sometimes it resulted in a server hung, the driver is keeps a lock that is blocking other threads (today we had many discussions block in a restoration of TX).

    I'm guessing that our instance of WebLogic somehow does not receive the close connection of the remote host. BTW, there is no firewall between us and the DB. I don't have any suspect strong for the cause (even if we're under Linux on a virtual VMWare 4.0 computer, always worried).

    Usually, I would ask any application to set a timeout for the query or set the time-out request to connect with Betclic to work around the problem (we use a MultiDatasource), if the transaction will give up at least and the application can manage it. However, while the Oracle driver supports java.sql.Statement.setQueryTimeout (), a brief investigation on my part leads me to believe the time-out is implemented on the server side, not client side - so that if it is indeed the case that WebLogic does not see the outcome on the connection, it also would never see the timeout.

    Two questions:
    1. is my suspicion implementation timeout for Oracle 11 g correct server-side?
    2. If so, is there a property that I can put to the pilot who will implement a socket timeout? It is "safe"?

    Thanks for any help!

    [Oracle WebLogic 10.3.5, 64-bit JVM 1.6.0_29 HotSpot on RHEL 5.6 on VMWare;] Pilot of thin Oracle XA's bundled with WebLogic; Oracle RAC 11 g (three-node cluster)]

    Published by: SteveElkind on December 3, 2012 05:25

    Hi, Yes, there is a property, you can give the driver to taken all calls with a timeout of read.
    oracle.net.READ_TIMEOUT. The units are in milliseconds, so choose a high number
    enough that no reading legitimate, as a wait for the DBMS do an update or commit.
    etc., would take more time.

    Ignore the message by Mukesh. There's nothing relevant there.

  • Time-out in OSB parameters

    Hi all

    I have a service that called DB through the DB adapter. For the Web service call, I have a settings option of reading business service downtime, so that he will get a timeout after the configured period.

    But for the DB call I don't have this option in the business and we get exceptions in thread blocked when the legacy takes more time to meet the back. We have an obligation to all the realted DB call to have services to expire when the legacy takes more time.

    Kindly help me to do so.

    Thank you and best regards,
    Prabhu

    Prabhu,

    As I mentioned above, use QueryTimeout characteristic of DDAdapter. You can set its value in the 'Advanced Options' screen of the database of the adapter Wizard. You can consult the user guide for the procedure-

    http://docs.Oracle.com/CD/E17904_01/integration.1111/e10231/adptr_db.htm#BDCFHHIJ

    Kind regards
    Anuj

  • Blocking the UI Thread

    Hi all

    I wrote a utility class to make sure that at some point there is at most a dialog box showed and avoid duplication (this can occur because the application is made of many threads and each one can need alert the user).

    This is the code:

    public class UserDialogUtils extends Thread implements SystemListener2 {
    
        private boolean isForeground = false, isBacklightOn = false;
        private final Object screenLock = new Object();
    
        private boolean newDialogRequestPresent = false, lastDialogClosed = true,
                lastDialogResultConsumed = true;
    
        private static UserDialogUtils instance = null;
    
        private UserDialog currentDialog = null;
    
        private UserDialogUtils() {
            super();
            isBacklightOn = Backlight.isEnabled();
            isForeground = Application.getApplication().isForeground();
        }
    
        public static synchronized UserDialogUtils getInstance() {
            if (instance == null || !instance.isAlive()) {
                if (instance != null) {
                    Application.getApplication().removeSystemListener(instance);
                }
                instance = new UserDialogUtils();
                Application.getApplication().addSystemListener(instance);
                instance.start();
            }
            return instance;
        }
    
        public synchronized void popupAlert(String msg) {
            while (!(!newDialogRequestPresent && lastDialogClosed && lastDialogResultConsumed)) {
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            }
            currentDialog = new UserDialog(UserDialog.DIALOG_ALERT, msg, 0);
            newDialogRequestPresent = true;
            lastDialogResultConsumed = false;
            notifyAll();
    
            while (!(!newDialogRequestPresent && lastDialogClosed))
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            // int res = currentDialog.res;
            lastDialogResultConsumed = true;
            notifyAll();
            return;
        }
    
        public synchronized boolean popupYesNo(String msg) {
            while (!(!newDialogRequestPresent && lastDialogClosed && lastDialogResultConsumed)) {
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            }
            currentDialog = new UserDialog(UserDialog.DIALOG_YES_NO, msg, 0);
            newDialogRequestPresent = true;
            lastDialogResultConsumed = false;
            notifyAll();
    
            while (!(!newDialogRequestPresent && lastDialogClosed))
                try {
                    wait();
                } catch (InterruptedException e) {
                }
            int res = currentDialog.res;
            lastDialogResultConsumed = true;
            notifyAll();
            return res == Dialog.YES;
        }
                // Implements method from SystemListener2
        public void backlightStateChange(boolean on) {
            synchronized (screenLock) {
                isBacklightOn = on;
                screenLock.notifyAll();
            }
        }
            // Called by main UIapp when switching fgd/bkgd
        public void setForeground(boolean isForeground) {
            synchronized (screenLock) {
                this.isForeground = isForeground;
                screenLock.notifyAll();
            }
        }
    
        public void run() {
            while (true) {
                synchronized (instance) {
                    while (!(newDialogRequestPresent && lastDialogClosed)) {
                        try {
                            wait();
                        } catch (InterruptedException e) {
                        }
                    }
    
                    newDialogRequestPresent = false;
                    lastDialogClosed = false;
                    currentDialog.manage();
    
                    notifyAll();
                }
            }
        }
    
        public synchronized void dialogClosed(UserDialog closedDialog) {
            if (closedDialog == currentDialog) {
                lastDialogClosed = true;
                notifyAll();
            } else {
                // shouldn't ever happen
            }
        }
    
        private class UserDialog {
            public static final int DIALOG_STATUS_SHOW = 1;
            public static final int DIALOG_INFORM = 2;
            public static final int DIALOG_ALERT = 3;
            public static final int DIALOG_YES_NO = 4;
            public static final int DIALOG_OK_CANCEL = 5;
    
            private int type = 0;
            private String msg = null;
            private int millis = 0;
    
            private int res = 0;
    
            public UserDialog(int type, String msg, int millis) {
                super();
                this.type = type;
                this.msg = msg;
                this.millis = millis;
            }
    
            public void manage() {
                synchronized (screenLock) {
                    while (!(isBacklightOn && isForeground)) {
                        try {
                            screenLock.wait();
                        } catch (InterruptedException e) {
                        }
                    }
    
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
                        public void run() {
                            switch (type) {
                            case DIALOG_STATUS_SHOW:
                                if (millis > 0)
                                    Status.show(msg, millis);
                                else
                                    Status.show(msg);
                                break;
                            case DIALOG_INFORM:
                                Dialog.inform(msg);
                                break;
                            case DIALOG_ALERT:
                                Dialog.alert(msg);
                                break;
                            case DIALOG_YES_NO:
                                res = Dialog.ask(Dialog.D_YES_NO, msg);
                                break;
                            case DIALOG_OK_CANCEL:
                                res = Dialog.ask(Dialog.D_OK_CANCEL, msg);
                                break;
                            default:
                                break;
                            }
                            dialogClosed(UserDialog.this);
                        }
                    });
    
                }
            }
    
        }
    
    }
    

    I can't understand how and why, but sometimes it can cause a blockage (I believe that the lock of the event).

    Essentially, in some cases, UIApplication will never call the executable content in the UserDialog instance manage() method.

    This means that, when it happens, the screen freezes as if it were before a popup methods (UserDialogUtils.getInstance () .popupAlert ("Please do not freeze")) was called.

    What Miss me?

    Thank you

    Luca

    I appreciated that the question you were worried but not specifically related to the UserDialogUtils code, but I thought there is no point in studying something depends on the UserDialogUtils until UserDialogUtils is processing properly.

    I could be missing something, but isn't sync it on methods prevents actually several Threads displaying dialog boxes at the same time?

    You only need the loop because manage() returns before the dialog box was dismissed.  And this happens because you use invokeLater and not invokeAndWait.  Your dialogs block the Thread event at some point, I'm not sure that your workaround (loop) here is really necessary.

    But to be honest, I haven't looked hard in the code.

    In any case, I have the answer to your problem I think.

    fieldChanged() is called on the event Thread.  If you hold the event walking till it ends.  Now in your treatment, that you never come back of popupAlert until something got the wire of the event, specifically the dialog box.  If you are in a bind.

    Short answer, do not call the methods in UserDialogUtils while holding the thread of events.

  • ContactService blocking UI thread

    While working with ContactService I noticed thread interface user cascading gets completely blocked even if I use the contacts optimized pick.

    Filtering only contacts that have e-mail and phonenumbers out 1000 contacts, takes about 3 seconds.

    Maybe I'm crazy, but this is not acceptable.

    Here is the code I use:

    void ApplicationUI::fetchContacts()
    {
        QVariantList contactsList;
        ContactService service;
        QList contactPage;
        ContactListFilters options;
        const int maxLimit = 20;
        QSet kindList;
        kindList.insert(AttributeKind::Phone);
        kindList.insert(AttributeKind::Email);
    
        options.setSortBy(SortColumn::LastName, SortOrder::Ascending);
        options.setIncludeGroups(false);
        options.setIncludePhotos(false);
        options.setIncludePostalAddress(false);
        options.setLimit(maxLimit);
        options.setHasAttribute(kindList);
    
        do {
            contactPage = service.contacts(options);
    
            foreach (const Contact &idContact, contactPage) {
                const Contact contact = service.contactDetails(idContact.id());
                const QList phoneNumbers = contact.phoneNumbers();
                const QList emails = contact.emails();
                QVariantMap entry;
    
                if (!phoneNumbers.isEmpty() && !emails.isEmpty()) {
                    entry["name"] = contact.displayName();
                }
    
                if (!phoneNumbers.isEmpty()) {
                    QVariantList phonNoList;
                    for(int i=0; ifetchContactsListCompleted(contactsList);
    
        QString result;
        bb::data::JsonDataAccess jda; //this line works only on BB
        jda.saveToBuffer(QVariant(contactsList), &result);
        if (!jda.hasError()) {
            emit this->fetchContactsCompleted(result.simplified().toUtf8());
        }
    }
    

    Now, as I see it, I have 2 options.

    We must implement my own multithreading and make async.

    Edit the event when I extract contacts.

    Before going with my own multithreading, is that what I'm doing wrong and the code still optimize?

    Here's how I did and so far very notes with results.

    In the header of your class says:

    private:
        QVariantList doContacts();
        QFutureWatcher futureWatcher;
    
    private Q_SLOTS:
        void onDoContactsFinished();
    

    In your class constructor, establish a connection:

        bool connectContacts = connect(&futureWatcher, SIGNAL(finished()), this, SLOT(onDoContactsFinished()));
        Q_UNUSED(connectContacts);
        Q_ASSERT(connectContacts);
    

    Basically, existing function has been divided into 2 rewritten and additional functions. Be careful how the member function is called in QtConcurrent and where exactly has QFuture together. Questions of command line. It now looks like this:

    void ApplicationUI::fetchContacts()
    {
        QFuture future = QtConcurrent::run(this, &ApplicationUI::doContacts);
        futureWatcher.setFuture(future);
    }
    
    QVariantList ApplicationUI::doContacts()
    {
        QVariantList contactsList;
        ContactService service;
        QList contactPage;
        ContactListFilters options;
        const int maxLimit = 20;
        QSet kindList;
        kindList.insert(AttributeKind::Phone);
        kindList.insert(AttributeKind::Email);
    
        options.setSortBy(SortColumn::LastName, SortOrder::Ascending);
        options.setIncludeGroups(false);
        options.setIncludePhotos(false);
        options.setIncludePostalAddress(false);
        options.setLimit(maxLimit);
        options.setHasAttribute(kindList);
    
        do {
            contactPage = service.contacts(options);
    
            foreach (const Contact &idContact, contactPage) {
                const Contact contact = service.contactDetails(idContact.id());
                const QList phoneNumbers = contact.phoneNumbers();
                const QList emails = contact.emails();
                QVariantMap entry;
    
                if (!phoneNumbers.isEmpty() && !emails.isEmpty()) {
                    entry["name"] = contact.displayName();
                }
    
                if (!phoneNumbers.isEmpty()) {
                    QVariantList phonNoList;
                    for(int i=0; ifetchContactsListCompleted(contactsList);
    
        QString result;
        bb::data::JsonDataAccess jda;
        jda.saveToBuffer(QVariant(contactsList), &result);
        if (!jda.hasError()) {
            emit this->fetchContactsCompleted(result.simplified().toUtf8());
        }
    }
    

    I am open to any suggestions or improvements.

Maybe you are looking for