Spawning Threads in WebLogic - forbidden in 5.1.  what about 6.x?

          Is spawning threads in 6.x permitted?
          http://websupport.beasys.com/websupport/clearexp_cgi/solution.htm?probdesc.objid=268519040
          

I do not think it is forbidden, but certainly not recommended. In 5.1 using user
          threads was causing all sorts of problems ranging from memory leaks (caused by
          threadlocal implementation) to mysterious exceptions when ivoking EJBs etc.
          Threadlocal was fixed in 6, but still, you can never tell what will break if you
          try to invoke WebLogic services (EJBs etc) from user threads.
          You can use this trick to borrow threads from WebLogic execute threads pool:
          http://dima.dhs.org/misc/AsyncServlet.jsp
          Mike Reiche <[email protected]> wrote:
          > Is spawning threads in 6.x permitted?
          > http://websupport.beasys.com/websupport/clearexp_cgi/solution.htm?probdesc.objid=268519040
          Dimitri
          

Similar Messages

  • Spawning thread in the stateful session bean

    I ran into an interesting issue: I am spawning a thread inside
    my stateful session bean's ejbCreate(...) method. The spawned
    thread runs in an infinite loop until some stop signal. The
    thread uses some BMP entity beans to access some data from DB,
    it creates some BMP entity beans as well as creates another
    stateful session bean in each iteration. The application ran
    into a crash. Now I have a couple questions:
    - First, is it an allowed operation to have a stateful session
    bean spawn off threads? Am I violating the specs?
    - Second, is it also allowed to have that thread create another
    bmp entity bean and another stateful session bean? Again, am I
    violating the specs also in here?
    Your responses will be very much appreciated.
    - Simon

    From the EJB 2.0 Spec, Section 24.1.2:
    <quote>
    These networking functions are reserved for the EJB Container.
    Allowing the enterprise bean to use these functions could compromise
    security and decrease the Container’s ability to properly manage the
    runtime environment.
    • The enterprise bean must not attempt to manage threads. The
    enterprise bean must not attempt to start, stop, suspend, or resume
    a thread; or to change a thread’s priority or name. The enter-prise
    bean must not attempt to manage thread groups.
    <quote>
    And, spawning threads in weblogic is highly discouraged in any
    server-side component. An application should not be designed this
    way.
    Bill
    Simon wrote:
    I ran into an interesting issue: I am spawning a thread inside
    my stateful session bean's ejbCreate(...) method. The spawned
    thread runs in an infinite loop until some stop signal. The
    thread uses some BMP entity beans to access some data from DB,
    it creates some BMP entity beans as well as creates another
    stateful session bean in each iteration. The application ran
    into a crash. Now I have a couple questions:
    - First, is it an allowed operation to have a stateful session
    bean spawn off threads? Am I violating the specs?
    - Second, is it also allowed to have that thread create another
    bmp entity bean and another stateful session bean? Again, am I
    violating the specs also in here?
    Your responses will be very much appreciated.
    - Simon

  • EJB client spawning threads

    We've got problems with respect to the number of EJB client threads (ExecuteThread) spawned by WebLogic in a client JVM. As the number of threads increase (~1700 in a JVM with 512Mb of memory and 2 hours of uptime), the JVM performance degrades substantially - although almost all these threads are waiting for requests, as one can see in the thread dump attached bellow.
    This problem happens in an integration scenario involving both WebLogic (8.1 and 6.1 as service providers) and webMethods Integration Server (version 6.0.1); the webMethods EJB adapter (version 1.2) acts like EJB client from the WebLogic instances, and the "EJB client spawning threads" can be detected by thread dumps extracted from the Integration Server JVM. The URL property from the wm EJB adapter has been setup as t3://server:port. The Integration Server runs with Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.02-040225-19:18-PA_RISC2.0 PA2.0 (aCC_AP), mixed mode) JRE in HP-UX (11.11) environment.
    Although we couldn't reproduce this problem in a prod like environemnt, we'd identified that initially, WebLogic (weblogic.jar from WebLogic 6.1) spawns 5 ExecuteThreads plus 3 additional threads (TimeEventGenerator, SpinnerRandomSource and HighPriority TimeEventGenerator) in the first access of an EJB not matter the instance used, as well as two new threads (ExecuteThread) for each access to new WebLogic instances (different from previously accessed WebLogic instances). With weblogic.jar from the WebLogic 8.1 SP4 the behavior is slightly different: from the second instance access toward, only two new Threads (ExecuteThread in weblogic.JavaSocketReaders queue) are created.
    We have also noticed that this problem should not be reflect of context classloaders because the counter of the ExecuteThread for the default pool only increases; in case of a pool cached in separate context classloaders, we should see "duplicate" threads with the same counter (starting with 0), which is not the case.
    The questions are 1) why weblogic is spawning so much threads; 2) is there any setup/config to limit the number of WebLogic threads in the client context ?
    Excerpt from the thread dump:
    Full thread dump Java HotSpot(TM) Server VM (1.4.2 1.4.2.02-040225-19:18-PA_RISC2.0 PA2.0 (aCC_AP) mixed mode):
    "ExecuteThread: '1749' for queue: 'default'" daemon prio=10 tid=05734140 nid=4813 lwp_id=583942 in Object.wait() [0x0dfbe000..0x0dfbe4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4a5ef9f0> (a weblogic.common.internal.DynaQueue)
         at weblogic.common.internal.DynaQueue.getW(DynaQueue.java:228)
         - locked <4a5ef9f0> (a weblogic.common.internal.DynaQueue)
         at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:252)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    "ExecuteThread: '1742' for queue: 'default'" daemon prio=10 tid=04c263f0 nid=4812 lwp_id=583845 runnable [0x06449000..0x064494f0]
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java:281)
         - locked <4a5ee690> (a java.net.Socket)
         at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:233)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    "ExecuteThread: '1735' for queue: 'default'" daemon prio=10 tid=05733fd8 nid=4811 lwp_id=583784 in Object.wait() [0x064ca000..0x064ca4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4c40a6b8> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4c40a6b8> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '1734' for queue: 'default'" daemon prio=10 tid=01ecd940 nid=4810 lwp_id=583783 in Object.wait() [0x0654b000..0x0654b4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4c40a728> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4c40a728> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '1733' for queue: 'default'" daemon prio=10 tid=05733e70 nid=4806 lwp_id=583777 in Object.wait() [0x066ce000..0x066ce4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4c40a798> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4c40a798> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '1732' for queue: 'default'" daemon prio=10 tid=01ecd7d8 nid=4801 lwp_id=583771 in Object.wait() [0x065cc000..0x065cc4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4c40a808> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4c40a808> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '1731' for queue: 'default'" daemon prio=10 tid=05733d08 nid=4798 lwp_id=583766 in Object.wait() [0x067d0000..0x067d04f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4c40a878> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4c40a878> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    ... (cut for brevity)
    "ExecuteThread: '2' for queue: 'default'" daemon prio=10 tid=009251b8 nid=172 lwp_id=569500 in Object.wait() [0x3d61f000..0x3d61f4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4a5b4498> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4a5b4498> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '1' for queue: 'default'" daemon prio=10 tid=00924ee8 nid=171 lwp_id=569499 in Object.wait() [0x3d6a0000..0x3d6a04f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4a5b40f0> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4a5b40f0> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "ExecuteThread: '0' for queue: 'default'" daemon prio=10 tid=00925050 nid=170 lwp_id=569498 in Object.wait() [0x3d7a2000..0x3d7a24f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <4a5b3d48> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:429)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:94)
         - locked <4a5b3d48> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:118)
    "Thread-2" daemon prio=10 tid=00bec5f0 nid=18 lwp_id=569246 in Object.wait() [0x41e2e000..0x41e2e4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c14ff0> (a com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr)
         at com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr.run(RepoServer.java:1533)
         - locked <46c14ff0> (a com.wm.app.repov4.server.RepoServer$RepoLockTimeoutMgr)
    "Thread-1" daemon prio=10 tid=00bec488 nid=17 lwp_id=569244 in Object.wait() [0x41eaf000..0x41eaf4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c150a8> (a com.wm.driver.queue.data.DataQueue)
         at java.lang.Object.wait(Object.java:429)
         at com.wm.driver.queue.data.DataQueue.dequeue(DataQueue.java:310)
         - locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
         at com.wm.driver.queue.data.DataQueue.dequeueCommit(DataQueue.java:260)
         - locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
         at com.wm.driver.queue.data.DataQueue.dequeueCommit(DataQueue.java:254)
         - locked <46c150a8> (a com.wm.driver.queue.data.DataQueue)
         at com.wm.app.repov4.server.RepoServerBase$RepoEventManager.run(RepoServerBase.java:224)
    "Log Thread" prio=10 tid=00bec320 nid=16 lwp_id=569243 in Object.wait() [0x41f30000..0x41f304f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c15120> (a com.wm.util.sync.SimpleQueue)
         at com.wm.util.sync.SimpleQueue.deq(SimpleQueue.java:171)
         - locked <46c15120> (a com.wm.util.sync.SimpleQueue)
         at com.wm.util.sync.SimpleQueue.deq(SimpleQueue.java:126)
         - locked <46c15120> (a com.wm.util.sync.SimpleQueue)
         at com.wm.app.b2b.server.ServerLogHandler$LogThread.run(ServerLogHandler.java:268)
    "Cron Daemon" prio=10 tid=00bec1b8 nid=15 lwp_id=569241 in Object.wait() [0x41fb1000..0x41fb14f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c15190> (a java.util.Vector)
         at com.wm.util.Cron.run(Cron.java:424)
         - locked <46c15190> (a java.util.Vector)
         at java.lang.Thread.run(Thread.java:534)
    "Cron Daemon Pool2" prio=10 tid=00bec050 nid=14 lwp_id=569240 in Object.wait() [0x42032000..0x420324f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c15268> (a com.wm.util.pool.PooledThread)
         at java.lang.Object.wait(Object.java:429)
         at com.wm.util.pool.PooledThread.run(PooledThread.java:103)
         - locked <46c15268> (a com.wm.util.pool.PooledThread)
         at java.lang.Thread.run(Thread.java:534)
    "Cron Daemon Pool1" prio=10 tid=00bebee8 nid=13 lwp_id=569239 in Object.wait() [0x420b3000..0x420b34f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c152d0> (a com.wm.util.pool.PooledThread)
         at java.lang.Object.wait(Object.java:429)
         at com.wm.util.pool.PooledThread.run(PooledThread.java:103)
         - locked <46c152d0> (a com.wm.util.pool.PooledThread)
         at java.lang.Thread.run(Thread.java:534)
    "webMethods Integration Server" prio=10 tid=000870e0 nid=12 lwp_id=569238 in Object.wait() [0x42134000..0x421344f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c152f0> (a com.wm.app.b2b.server.Server)
         at java.lang.Object.wait(Object.java:429)
         at com.wm.app.b2b.server.Server.run(Server.java:353)
         - locked <46c152f0> (a com.wm.app.b2b.server.Server)
    "Signal Dispatcher" daemon prio=10 tid=00086f78 nid=7 lwp_id=569231 waiting on condition [0x00000000..0xffffffff]
    "Finalizer" daemon prio=10 tid=00086e10 nid=5 lwp_id=569229 in Object.wait() [0x4293b000..0x4293b4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c15668> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
         - locked <46c15668> (a java.lang.ref.ReferenceQueue$Lock)
         at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
         at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:188)
    "Reference Handler" daemon prio=10 tid=00086ca8 nid=4 lwp_id=569228 in Object.wait() [0x429bc000..0x429bc4f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c15340> (a java.lang.ref.Reference$Lock)
         at java.lang.Object.wait(Object.java:429)
         at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:120)
         - locked <46c15340> (a java.lang.ref.Reference$Lock)
    "main" prio=10 tid=00086b40 nid=1 lwp_id=569222 in Object.wait() [0x68ff3000..0x68ff24f0]
         at java.lang.Object.wait(Native Method)
         - waiting on <46c152f0> (a com.wm.app.b2b.server.Server)
         at java.lang.Thread.join(Thread.java:1001)
         - locked <46c152f0> (a com.wm.app.b2b.server.Server)
         at java.lang.Thread.join(Thread.java:1054)
         at com.wm.app.b2b.server.Server.start(Server.java:141)
         at com.wm.app.b2b.server.Main.main(Main.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.wm.proxy.Proxy.invokeStaticMethod(Proxy.java:166)
         at com.wm.app.server.ServerProxy.ServerMain_main(ServerProxy.java:77)
         at com.wm.app.server.ServerApp.start(ServerApp.java:105)
         at com.wm.app.Application.launch(Application.java:490)
         at com.wm.app.server.Main.main(Main.java:50)
    "VM Thread" prio=7 tid=000167f8 nid=3 lwp_id=569227 runnable
    "VM Periodic Task Thread" prio=8 tid=00016908 nid=11 lwp_id=569235 waiting on condition
    "Suspend Checker Thread" prio=10 tid=00016880 nid=6 lwp_id=569230 runnable

    We already opened a case. Actually, we did reproduce the problem: it happens because there is a hardware load balancing between the client and the WebLogic Server.
    As far as I know, EJB load balancing can be done only with WebLogic clusters. Could you confirm that ?

  • Spawning Threads inside the Web Container

    What are the ramifications of a developer spawning off threads from a "helper"
    object called from a servlet service() method ?
    Thanks in advance.

    That's what I said, it is not at all advisable but if you know what you
    are doing it can work just fine.
    The biggest issue is migration since the behavior is not defined in the
    spec and thus all vendors can implement it differently and it can change
    from version to version, which in turn defeats the J2EE portability
    advantage.
    That is why I highly recommended using JMX timers since it is going to
    be available on all J2EE servers and then the only vendor dependent
    thing is to get the MBeanServer.
    Dejan
    DN wrote:
    Hello
    I was also doing the same thing from my servlet but using another class which
    extends thread.
    I was using JDBC calls in the new thread , eventhough it worked fine I was getting
    warning messages in the console when I was using WSAD.(websphere studio).
    My app is deployed to WLS , i did not see any messages in WLS.
    When I post this issue in a forum , some one advised me that it is not advisable
    to open up threads from the servlets and this is what he said 'quote'
    so eventually (i.e.
    J2EE 1.4) spun threads from a Servlet accessing a
    database outside of a transaction will not be
    supported either.
    "Deyan D. Bektchiev" <[email protected]> wrote:
    Whit,
    If you are not careful you can very well starve the JVM, lose your
    security, transaction contexts and probably some other bad things I
    don't know about...
    But having said all those scary things, I must admit that we do it all
    the time and don't have any issues with that.
    For most purposes you should try to use the JMX timer service instead
    of
    spawning your own threads. You callback will be called in a different
    thread from the Weblogic thread pool and I guess this will be sufficient
    for most cases.
    Regards,
    Dejan
    Whit Armstrong wrote:
    What are the ramifications of a developer spawning off threads from
    a "helper"
    object called from a servlet service() method ?
    Thanks in advance.

  • Spawning threads in application servers

    Hi All,
    I know spawning threads within your application server is a no no according to EJB specs. However I have a problem which calls for it!!
    We are using weblogic and we are creating application logs which need to be rotated at midnight every night. The best choice would be to spawn a thread on server startup which will sleep till midnight then wake up and rotate the log.
    Another choice would be to write a client program which does the same (sleeping and waking up) and then makes a request to weblogic server and the logs get rotated. However in production environemnt there will be this other new client program that will need to be deployed.
    Any other ideas?
    Thanks in advance for help.

    If weblogic supports it you could try a 'load on startup' servlet that loops forever. You can then startup a timer to wait until the desired time and invoke a session bean to do the rotation.

  • Stuck Threads on weblogic 10.3.2 Holding lock HttpURLConnection

    We are having issue with STUCK THREADS on weblogic 10.3.2. Basically my application makes a lot of web service calls over HTTPS and once in a while I see few STUCK THREADS and most of the time they clear but sometimes I have to bounce my server to clean.
    I have a thread dump, according to this its holding lock at weblogic.net.http.HttpURLConnection.getInputStream
    Any help to resolve this problem is highly appreciated.
    ThreadDump:
    <May 24, 2011 9:59:08 AM EDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "604" seconds working on the request "weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl@b607d75", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-75 "[STUCK] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
    jrockit.net.SocketNativeIO.readBytesPinned(SocketNativeIO.java:???)
    jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:31)
    java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
    java.net.SocketInputStream.read(SocketInputStream.java:107)
    weblogic.utils.io.ChunkedInputStream.read(ChunkedInputStream.java:149)
    java.io.InputStream.read(InputStream.java:85)
    com.certicom.tls.record.ReadHandler.readFragment(Unknown Source)
    com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
    com.certicom.tls.record.ReadHandler.read(Unknown Source)
    ^-- Holding lock: com.certicom.tls.record.ReadHandler@bec563c[thin lock]
    com.certicom.io.InputSSLIOStreamWrapper.read(Unknown Source)
    java.io.BufferedInputStream.fill(BufferedInputStream.java:189)
    java.io.BufferedInputStream.read(BufferedInputStream.java:236)
    ^-- Holding lock: java.io.BufferedInputStream@bec5d9f[thin lock]
    weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:214)
    weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:141)
    weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:452)
    ^-- Holding lock: weblogic.net.http.HttpsClient@bec5202[thin lock]
    weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:328)
    weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37)
    ^-- Holding lock: weblogic.net.http.SOAPHttpsURLConnection@bd3b209[thin lock]
    weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:939)
    com.sun.xml.ws.transport.http.client.HttpClientTransport.readResponseCodeAndMessage(HttpClientTransport.java:213)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:116)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:101)
    com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:580)
    com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:553)
    com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:535)
    com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:433)
    ^-- Holding lock: com.sun.xml.ws.api.pipe.Fiber@bd3afa8[thin lock]
    com.sun.xml.ws.client.Stub.process(Stub.java:238)
    com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:102)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:116)
    $Proxy107.jobSubmit(Unknown Source)
    com.somejob.invokeService(JobOperation.java:53)
    com.somejobws.operations.ticket.execute(ticket.java:30)
    com.somejobutil.Somehelper.process(Somehelper.java:174)
    com.somejobutil.Somehelper.processJob(Somehelper.java:147)
    com.somejobutil.Somehelper.processMDB(Somehelper.java:91)
    com.somejobejb.ProcessMDB.onMessage(ProcessMDB.java:28)
    sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:86)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:102)
    com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
    com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:151)
    $Proxy67.onMessage(Unknown Source)
    weblogic.ejb.container.internal.MDListener.execute(MDListener.java:403)
    weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:352)
    weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:264)
    weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4564)
    weblogic.jms.client.JMSSession.execute(JMSSession.java:4060)
    weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3746)
    weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
    weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5096)
    weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:198)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:165)
    }

    Yes, we have the same problem, stuck thread on weblogic.net.http.HttpsURLConnection.getResponseCode() (actually implemented by weblogic.net.http.SOAPHttpsURLConnection which also appears to be deprecated ???)
    When we use the class javax.net.ssl.HttpsURLConnection the getResponseCode() method works perfectly well, so it looks like the weblogic implementation is to blame.
    This is becoming rather urgent now because we're looking to migrate from OC4J to Weblogic and this issue has therefore become a blocker.

  • Setting Webserver max-threads in Weblogic

    Hi all!
    I'm porting an application from Tomcat which uses max-threads to set up the number of maximum concurrent connections to the web server.
    I see Oracle Weblogic uses Workmanager instead, but what is the correct way to assign a WorkManager with a MaxThreadsConstraint to the Web server ? (or if it's not possible to the Web server to a Web application)
    Thanks
    Frank

    Assuming that you are porting the application to Weblogic server,if you want to set maximum concurrent connections on the weblogic server,you could configure a workmanager with MaxThreadConstraints.You can either create a Global Workmanager or a scoped work manager on the basis of your requirement.
    Please refer to the below link to understand the difference between both and how to go about configuring them:-
    http://docs.oracle.com/cd/E11035_01/wls100/config_wls/self_tuned.html
    http://docs.oracle.com/cd/E11035_01/wls100/config_wls/self_tuned.html#wp1064810
    Now,if you want say for example only 10 concurrent requests on any managed server instance at any point of time,you could configure a Global manager with "Max Threads Constraint" of 10 and target it to the specific instance.
    Hope this helps!
    -Sandeep

  • Spawning threads from within a UnicastRemoteObject

    I have a question regarding spawning threads from within a class that extends UnicastRemoteObject. Would it be okay to spawn new thread(s) in the constructor/ remote methods of the class that extends UnicastRemoteObject .? Are there any pitfalls to doing so? Is it against the suggested practice of writing RMI server code?
    rajkumar

    You can do anything you like in the Class that extends URO.
    The classic problem of doing anything within a constructor is that the object under construction may not be available to the threads you are spawning. That is, since the object is not fully constructed, any fields the new threads need may not be available. There have been discussions on this subject in the forums before. You might give a look and see.

  • Stuck thread in weblogic

    Hello All,
    We are getting stuck thread in weblogic under high load.
    following is the thread dump from weblogic 10
    "[STANDBY] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'" id=83 idx=0x134 tid=5376 prio=5 alive, in native, waiting, daemon
    -- Waiting for notification on: weblogic/work/ExecuteThread@0x06DEC880[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:156)
    ^-- Lock released while waiting: weblogic/work/ExecuteThread@0x06DEC880[fat lock]
    at weblogic/work/ExecuteThread.run(ExecuteThread.java:177)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "[STANDBY] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'" id=84 idx=0x138 tid=1688 prio=5 alive, in native, waiting, daemon
    -- Waiting for notification on: weblogic/work/ExecuteThread@0x06E50070[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:156)
    ^-- Lock released while waiting: weblogic/work/ExecuteThread@0x06E50070[fat lock]
    at weblogic/work/ExecuteThread.run(ExecuteThread.java:177)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "[STUCK] ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'" id=85 idx=0x13c tid=3984 prio=1 alive, daemon
    at jrockit/vm/Allocator.allocArray(Allocator.java:392)
    at java/lang/AbstractStringBuilder.<init>(AbstractStringBuilder.java:44)
    at java/lang/StringBuffer.<init>(StringBuffer.java:80)
    at com/vignette/exolab/castor/jdo/oql/ParseTreeWalker.addWhereClause(ParseTreeWalker.java:994)
    at com/vignette/exolab/castor/jdo/oql/ParseTreeWalker.createQueryExpression(ParseTreeWalker.java:816)
    at com/vignette/exolab/castor/jdo/oql/ParseTreeWalker.<init>(ParseTreeWalker.java:139)
    at com/vignette/exolab/castor/jdo/engine/OQLQueryImpl.create(OQLQueryImpl.java:274)
    at com/vignette/exolab/castor/jdo/engine/DatabaseImpl.getOQLQuery(DatabaseImpl.java:502)
    at com/vignette/as/server/persist/dao/JDODAOPersistor.findByQuery(JDODAOPersistor.java:395)
    at com/vignette/as/server/persist/dao/JDODAOPersistor.findByIds(JDODAOPersistor.java:360)
    at com/vignette/as/server/persist/ExtensibleApplicationObjectPersistor.findByIdsHelper(ExtensibleApplicationObjectPersistor.java:159)
    at com/vignette/as/server/persist/ExtensibleApplicationObjectPersistor.findByIds(ExtensibleApplicationObjectPersistor.java:90)
    at com/vignette/as/server/logic/channel/ChannelOpsLogic.findById(ChannelOpsLogic.java:194)
    at com/vignette/as/server/logic/channel/ChannelOpsLogicGen.findById(ChannelOpsLogicGen.java:1553)
    at com/vignette/as/client/javabean/Channel.findById(Channel.java:247)
    at com/vignette/as/server/logic/channel/ChannelOpsLogic.getSubchannels(ChannelOpsLogic.java:563)
    at com/vignette/as/server/logic/channel/ChannelOpsLogicGen.getSubchannels(ChannelOpsLogicGen.java:3237)
    at com/vignette/as/client/javabean/ChannelBase.getSubchannels(ChannelBase.java:480)
    at com/vignette/as/client/javabean/ChannelBase.getAllSubchannels(ChannelBase.java:375)
    at com/astrazeneca/portal/dpm/ChannelWrapper.getSubchannels(ChannelWrapper.java:203)
    at jsp_servlet/_jsp/_grid/__xmlgeneration.subChannelRec(__xmlgeneration.java:97)
    at jsp_servlet/_jsp/_grid/__xmlgeneration.subChannelRec(__xmlgeneration.java:146)
    at jsp_servlet/_jsp/_grid/__xmlgeneration._jspService(__xmlgeneration.java:430)
    at weblogic/servlet/jsp/JspBase.service(JspBase.java:34)
    at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
    at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:283)
    at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3395)
    at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(Unknown Source)
    at weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
    at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:2046)
    at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1366)
    at weblogic/work/ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic/work/ExecuteThread.run(ExecuteThread.java:172)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "[STANDBY] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)'" id=86 idx=0x140 tid=1192 prio=5 alive, in native, waiting, daemon
    -- Waiting for notification on: weblogic/work/ExecuteThread@0x06E50AF0[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at weblogic/work/ExecuteThread.waitForRequest(ExecuteThread.java:156)
    ^-- Lock released while waiting: weblogic/work/ExecuteThread@0x06E50AF0[fat lock]
    at weblogic/work/ExecuteThread.run(ExecuteThread.java:177)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "VAP Topic Consumer Thread - 0" id=87 idx=0x144 tid=6040 prio=5 alive, in native, parked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2416)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.park(LockSupport.java:118)
    at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
    at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com/epicentric/topic/internal/MessageQueue.remove(MessageQueue.java:67)
    at com/epicentric/topic/internal/Consumer.run(Consumer.java:72)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "VAP Topic Consumer Thread - 1" id=88 idx=0x148 tid=4752 prio=5 alive, in native, parked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2416)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.park(LockSupport.java:118)
    at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
    at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com/epicentric/topic/internal/MessageQueue.remove(MessageQueue.java:67)
    at com/epicentric/topic/internal/Consumer.run(Consumer.java:72)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "VAP Topic Consumer Thread - 2" id=89 idx=0x14c tid=4504 prio=5 alive, in native, parked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2416)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.park(LockSupport.java:118)
    at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
    at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com/epicentric/topic/internal/MessageQueue.remove(MessageQueue.java:67)
    at com/epicentric/topic/internal/Consumer.run(Consumer.java:72)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "VAP Topic Consumer Thread - 3" id=90 idx=0x150 tid=5572 prio=5 alive, in native, parked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2416)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.park(LockSupport.java:118)
    at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
    at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com/epicentric/topic/internal/MessageQueue.remove(MessageQueue.java:67)
    at com/epicentric/topic/internal/Consumer.run(Consumer.java:72)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "VAP Topic Consumer Thread - 4" id=91 idx=0x154 tid=4340 prio=5 alive, in native, parked, daemon
    at jrockit/vm/Locks.park0(J)V(Native Method)
    at jrockit/vm/Locks.park(Locks.java:2416)
    at sun/misc/Unsafe.park(ZJ)V(Native Method)
    at java/util/concurrent/locks/LockSupport.park(LockSupport.java:118)
    at java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1767)
    at java/util/concurrent/LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
    at com/epicentric/topic/internal/MessageQueue.remove(MessageQueue.java:67)
    at com/epicentric/topic/internal/Consumer.run(Consumer.java:72)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "CS_Local_Monitor_0" id=92 idx=0x158 tid=3864 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/vignette/config/client/cachefile/ConfigSpaceLocal$Monitor.run(ConfigSpaceLocal.java:1364)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-41" id=93 idx=0x15c tid=4884 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x0A899918[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x0A899918[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-42" id=94 idx=0x160 tid=4968 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x06BE2238[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x06BE2238[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "TaskScheduler thread" id=98 idx=0x164 tid=1580 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/task/TaskScheduler.sleepUntilRuntime(TaskScheduler.java:226)
    at com/epicentric/task/TaskScheduler.run(TaskScheduler.java:83)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "TaskQueue Lease Manager" id=100 idx=0x168 tid=3908 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/task/internal/LeaseManager.waitForNextExecutionTime(LeaseManager.java:69)
    at com/epicentric/task/internal/LeaseManager.run(LeaseManager.java:52)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread System Expiration and Ostracizing Thread" id=101 idx=0x16c tid=4200 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/threadpool/standard/StandardThreadPool$ExpirationThread.run(StandardThreadPool.java:238)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Task Executor" id=102 idx=0x170 tid=3592 prio=1 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/task/internal/TaskExecutor.waitForNextExecutionTime(TaskExecutor.java:205)
    at com/epicentric/task/internal/TaskExecutor.run(TaskExecutor.java:186)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Task Metric Gatherer" id=103 idx=0x174 tid=5988 prio=1 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/task/internal/TaskExecutor$1.run(TaskExecutor.java:142)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "CS_Local_Monitor_0" id=142 idx=0x178 tid=5196 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/vignette/config/client/cachefile/ConfigSpaceLocal$Monitor.run(ConfigSpaceLocal.java:1364)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-54" id=130 idx=0x17c tid=648 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x0AD3C798[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x0AD3C798[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Timer-10" id=113 idx=0x180 tid=1092 prio=5 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/TaskQueue@0x00B22F40[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/util/TimerThread.mainLoop(Timer.java:509)
    ^-- Lock released while waiting: java/util/TaskQueue@0x00B22F40[fat lock]
    at java/util/TimerThread.run(Timer.java:462)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "JNDI Monitor" id=116 idx=0x184 tid=1856 prio=5 alive, in native, waiting, daemon
    -- Waiting for notification on: com/epicentric/jndi/Monitor@0x00B12D60[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at com/epicentric/jndi/Monitor.run(Monitor.java:100)
    ^-- Lock released while waiting: com/epicentric/jndi/Monitor@0x00B12D60[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-47" id=117 idx=0x188 tid=816 prio=5 alive, in native, daemon
    at jrockit/net/SocketNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BIII)I(Native Method)
                    at jrockit/net/SocketNativeIO.socketRead(SocketNativeIO.java:31)
                    at java/net/SocketInputStream.socketRead0(Ljava/io/FileDescriptor;[BIII)I(SocketInputStream.java)
                    at java/net/SocketInputStream.read(SocketInputStream.java:129)
                    at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
                    at java/io/BufferedInputStream.read1(BufferedInputStream.java:256)
                    at java/io/BufferedInputStream.read(BufferedInputStream.java:313)
                    ^-- Holding lock: java/io/BufferedInputStream@0x00B3EA48[thin lock]
    at com/sun/jndi/ldap/Connection.run(Connection.java:784)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "TaskScheduler thread" id=119 idx=0x18c tid=4520 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/epicentric/task/TaskScheduler.run(TaskScheduler.java:94)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "OracleTimeoutPollingThread" id=124 idx=0x190 tid=2628 prio=10 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at oracle/jdbc/driver/OracleTimeoutPollingThread.run(OracleTimeoutPollingThread.java:158)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-55" id=131 idx=0x194 tid=5700 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x0973F378[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x0973F378[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-56" id=132 idx=0x198 tid=5596 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at org/apache/commons/pool/impl/GenericObjectPool$Evictor.run(GenericObjectPool.java:1122)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "CacheSyncThread" id=133 idx=0x19c tid=708 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/vignette/as/server/caching/CacheSynchronization.run(CacheSynchronization.java:135)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-58" id=135 idx=0x1a0 tid=5652 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at org/apache/commons/pool/impl/GenericObjectPool$Evictor.run(GenericObjectPool.java:1122)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-61" id=143 idx=0x1a4 tid=4196 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x0BEF1160[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x0BEF1160[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-62" id=144 idx=0x1a8 tid=5456 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x0D650770[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x0D650770[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-63" id=145 idx=0x1ac tid=1056 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at org/apache/commons/pool/impl/GenericObjectPool$Evictor.run(GenericObjectPool.java:1122)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "CacheSyncThread" id=146 idx=0x1b0 tid=3496 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/vignette/as/server/caching/CacheSynchronization.run(CacheSynchronization.java:135)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-64" id=147 idx=0x1b4 tid=4132 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at org/apache/commons/pool/impl/GenericObjectPool$Evictor.run(GenericObjectPool.java:1122)
    at java/lang/Thread.run(Thread.java:595)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "CS_Local_Monitor_0" id=221 idx=0x1b8 tid=6104 prio=5 alive, in native, sleeping, native_waiting, daemon
    at java/lang/Thread.sleep(J)V(Native Method)
    at com/vignette/config/client/cachefile/ConfigSpaceLocal$Monitor.run(ConfigSpaceLocal.java:1364)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-84" id=222 idx=0x1bc tid=3500 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x1673EAD8[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x1673EAD8[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "Thread-85" id=223 idx=0x1c0 tid=5492 prio=1 alive, in native, waiting, daemon
    -- Waiting for notification on: java/util/ArrayList@0x1932F128[fat lock]
    at jrockit/vm/Threads.waitForNotifySignal(JLjava/lang/Object;)Z(Native Method)
    at java/lang/Object.wait(J)V(Native Method)
    at java/lang/Object.wait(Object.java:474)
    at com/vignette/logging/LocaleAppender$Dispatcher.run(LocaleAppender.java:393)
    ^-- Lock released while waiting: java/util/ArrayList@0x1932F128[fat lock]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    "[STANDBY] ExecuteThread: '17' for queue

    Hi,
    We are facing a similar stuck thread problem with the following stack trace...
    Any help on this is much appreciated.
    Thanks,
    Sen
    Thread-86 "[STUCK] ExecuteThread: '10' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, waiting, priority=1, DAEMON> {
    -- Waiting for notification on: netscape.ldap.LDAPSearchListener@2accce6[fat lock]
    java.lang.Object.wait(Object.java:???)
    java.lang.Object.wait(Object.java:485)
    netscape.ldap.LDAPMessageQueue.waitForMessage(LDAPMessageQueue.java:198)
    netscape.ldap.LDAPMessageQueue.waitFirstMessage(LDAPMessageQueue.java:100)
    netscape.ldap.LDAPConnection.sendRequest(LDAPConnection.java:1782)
    ^-- Holding lock: netscape.ldap.LDAPConnection@138555c[thin lock]
    netscape.ldap.LDAPConnection.search(LDAPConnection.java:2500)
    weblogic.security.providers.authentication.LDAPAtnDelegate.getDNForUser(LDAPAtnDelegate.java:3317)
    weblogic.security.providers.authentication.LDAPAtnDelegate.listMemberGroups(LDAPAtnDelegate.java:2091)
    weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.addAllGroups(LDAPAtnLoginModuleImpl.java:419)
    weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.addGroups(LDAPAtnLoginModuleImpl.java:411)
    weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:136)
    com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110)
    com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:101)
    sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:???)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:27)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    javax.security.auth.login.LoginContext.invoke(LoginContext.java:720)
    javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
    javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
    javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
    javax.security.auth.login.LoginContext.login(LoginContext.java:566)
    com.bea.common.security.internal.service.JAASLoginServiceImpl.login(JAASLoginServiceImpl.java:77)
    sun.reflect.GeneratedMethodAccessor2726.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
    $Proxy17.login(Unknown Source)
    weblogic.security.service.internal.WLSJAASLoginServiceImpl$ServiceImpl.login(Unknown Source)
    com.bea.common.security.internal.service.JAASAuthenticationServiceImpl.authenticate(JAASAuthenticationServiceImpl.java:74)
    sun.reflect.GeneratedMethodAccessor2727.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:575)
    com.bea.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
    $Proxy37.authenticate(Unknown Source)
    weblogic.security.service.WLSJAASAuthenticationServiceWrapper.authenticate(Unknown Source)
    weblogic.security.service.PrincipalAuthenticator.authenticate(Unknown Source)
    weblogic.servlet.security.internal.SecurityModule.checkAuthenticate(SecurityModule.java:213)
    weblogic.servlet.security.ServletAuthentication.login(ServletAuthentication.java:391)
    weblogic.servlet.security.ServletAuthentication.weak(ServletAuthentication.java:371)
    com.bea.p13n.security.Authentication.login(Authentication.java:118)
    com.ppluk.moneyout.portal.auth.LoginServlet.doGet(LoginServlet.java:40)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:700)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:815)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198)
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:50)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:241)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:61)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:25)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3468)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308)
    weblogic.security.service.SecurityManager.runAs(Unknown Source)
    weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2116)
    weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2038)
    weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1372)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:198)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:165)
    }

  • What about session memory when using BEA Weblogic connection pooling?

    Hi,
    consider a web application, allowing database connections via a BEA Weblogic 8.1 application server. The app-server is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?
    2) Does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    If (1) is true, than what about the session memory of Oracle sessions? I understand, that things like package global variables are beeing stored in this session private memory. If (1) is true, the PL/SQL programmer has the same situation, as with programming an Oracle databas in "shared server" mode, that is, he should not use package global variables etc.
    Thankful for any ideas...
    Message was edited by:
    Xenofon

    Xenofon Grigoriadis wrote:
    Hi,
    consider a web application, using BEA between client and an Oracle Database (v9i). BEA is pooling the oracle connections. The oracle database is running in dedicated server mode.
    How are the database requests from the web app beeing served by the connection pool from BEA?
    1) Does one oracle session serve more than one request simultanously?no.
    2) Or does BEA serialize the requests, which means, that a session from the pool is always serving only one request at a time?
    Reading "Configuring and Using WebLogic JDBC" from weblogic8.1 documentation, I read:
    "... Your application "borrows" a connection from the pool, uses it, then returns it to the pool by closing it...."
    What do you mean by returning the connection by closing it? Tbe server will either return the connection to the pool or close it...When application code does typical jdbc code, it obtains
    a connection via a WebLogic DataSource, which reserves an
    unused pooled connection and passes it (transparently wrapped)
    to the application. The application uses it, and then closes
    it. WebLogic intercepts the close() call via the wrapper, and
    puts the DBMS connection back into the WebLogic pool.
    The reason, why I as an Oracle programmer ask this is, because every session (=connection)
    in Oracle has its own dedicate, private memory for things like global PL/SQL variables.
    Now I want to figure out, if you have to careful in programming your databases, when
    one Oracle session (=connection) is serving many weblogic requests.It is serving many requests, but always serially. Do note however, that we
    also transparently cache/pool prepared and callable statements with the
    connection so repeat uses of the connection will be able to get already-made
    statements when they call prepareStatement() and prepareCall(). These
    long-lived statements will each require a DBMS-side cursor.
    >
    Thankful for any ideas or practical experience...
    Message was edited by:
    mk637Joe

  • Creating threads in Weblogic

    For a variety of reasons I need to write my own messaging bridge between Weblogic and MQ. The reasons have been validated by BEA, so I'm not completely off my rocker :)
    I can either write this as a standalone java application that acts as a client to weblogic's JMS server, or as a deployed webapp (using the ServletContextListener method to start/stop it). Either way the app will <shudder>create one thread per queue</shudder> and listen on that queue until a message arrives.
    The pros of a deployed application (cost-free clustering, management, can use a webapp to manage the threads/queues, etc) leads me in that direction, but creating threads in a J2EE server dubious at best.
    Ideally this webapp runs in its own execute queue, and the holy grail is to have the threads run in that execute queue. However, there doesn't seem to be any supported way to create threads from an execute queue.
    Has anyone done anything like this? Any suggestions on how to spawn and manage the threads properly? Should it be deployed or stand-alone?
    cheers
    mike

    Hello,
    The webapp route sounds better to me than a standalone java app, you will get things up and running a lot more quickly and get all the goodies associated with webapps.
    You don't explicity create threads from the queue for example in the way you get connections from a connection pool. Once you have created and configuered your execute queue you just add a few init parameters to your web.xml deployment descriptor:
    <servlet>
    <servlet-name>MainServlet</servlet-name>
    <jsp-file>/myapplication/critical.jsp</jsp-file>
    <init-param>
    <param-name>wl-dispatch-policy</param-name>
    <param-value>CriticalAppQueue</param-value>
    </init-param>
    </servlet>
    see:
    http://e-docs.bea.com/wls/docs81/perform/AppTuning.html#1105201
    for complete instructions.
    cheers
    Hussein Badakhchani
    www.orbism.com

  • Monitor socket with thread in WebLogic

    I've recently joined a company where a solution was put in place within web apps to monitor a socket. The socket communication comes from a C-based app sending in messages to a socket monitored by a thread.
    This was done in a web app that used WebLogic Express, with only JSP's and servlets. My question is...how appropriate is this architecture in a WebLogic server that will now call EJB's from this thread? How can I spawn this thread outside of a servlet, maybe a startup class? My services layer may receive RMI-based client calls, thus the servlet would not come into play.
    My thoughts are that this should become a JMS-based communication, but for the initial versions, we may not have time rehaul the messaging infrastructure.
    I'd appreciate any opinions on this....
    Chuck

    <p>cheinle,</p>
    <p>It's not clear from your post what it is you need to achieve. What protocol is your service layer using? Is your service layer <b>only</b> going to deal with synchronous RMI requests?</p>
    <p>Answering your first question the implementation you describe using WebLogic Express is also applicable to WebLogic.</p>
    <p>With respect to Servlets and EJBs a typical architecture would have HTTPServlets listen on a ServerSocect and dispatch requests to a service layer implemented in EJBs (in their own threads). You could implement your own Servlets to deal to with protocols other than HTTP.</p>
    <p>You can also provide an HTTP wrapper for your RMI service layer using servlets see here for an introduction to using HTTPServlets with RMI</p>
    <p>cheers</br>
    Hussein Badakhchani</br>
    www.orbism.com
    </p>

  • How to resolve stuck threads in weblogic

    JDeveloper: 11.3
    Weblogic: 10.3
    Hi,
    System Admin is complaining about the stuck threads in our ADF Application. Can some one help me in resolving those in weblogic server or at code level.
    Basically, I am looking for an approach to resolve them.
    Thanks.

    If you get stuck threads you should also get a dump of all running threads, indicating which threads are stuck. This is the starting point for your investigation. Try to find out which threads are stuck and what they are supposed to do.
    This should be you started.
    Timo

  • NIO on Windows spontaneously spawning thread?

    Hey guys.
    I have a question concerning something odd i've noticed. When i run my NIO socket on a Windows machine and load test it then after a while (about 20-30 seconds) a new thread is spontaneously started.
    One is spawner per active selector, they're unnamed threads and they're involved with this method :
    sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(long, int, int[], int[], int[], long) line: not available [native method]
    These threads are only spawned if the server is really busy, so my questions are :
    1) Why does this thread appear
    2) Once it appears, does that mean my server has a problem?
    I can only guess that the threads appear because my server isnt dealing with something fast enough, but i just cant seem to find details.

    Oh yes? That's odd, i only see one when i reach about 1500-2000 connections. Maybe it wont get spawned until more than 64 keys are selected during a single select() or something?
    I'm not liking that at all, i dont want threads to spontaneously appear. Is this Windows specific?

  • How to Increase min number of executable threads in Weblogic 10.3.0

    Hi,
    I was trying to increase the Min number of executable threads using the following startup argument
    "set USER_MEM_ARGS=-Dweblogic.threadpool.MinPoolSize=30" in startWeblogic.cmd. But doing so haven't increased the "execute thread total count" to the desired number when I verified it in console.
    Kindly help me to configure this.
    PS: Changing the configuration file (config.xml) is not recommended.
    Thanks
    Prasanth

    In 10.3 usually work managers are used for this purpose. (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/upgrade/compat.html#wp1117123)
    You can use the 8.1 thread pool if you want (http://download.oracle.com/docs/cd/E12840_01/wls/docs103/perform/appb_queues.html#use81)
    but generally work managers are the preferred way: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_wls/self_tuned.html
    Coming back to your original question:
    "I was trying to increase the Min number of executable threads using the following startup argument "set USER_MEM_ARGS=-Dweblogic.threadpool.MinPoolSize=30" in startWeblogic.cmd. But doing so haven't increased the "execute thread total count" to the desired number when I verified it in console."
    Can you add the option in the setDomainEnv file, located in the ${DOMAIN_HOME}/bin directory, for example,
    @REM *************************************************************************
    set WL_HOME=C:\bea\wlserver_10.3
    for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi
    set BEA_JAVA_HOME=C:\bea\jrockit_160_24_D1.1.2-4
    set USER_MEM_ARGS=-jrockit -Xms512m -Xmx512m -Xgc:throughput -Dweblogic.threadpool.MinPoolSize=100
    set SUN_JAVA_HOME=To check if it indeed shows the number of threads you can follow the steps presented here: http://m-button.blogspot.com/2009/02/tuning-default-workmanager-on-weblogic.html

Maybe you are looking for