Thread lock in WL 8.1-on jRockit (queryMbeans)

I have noticed in our thread dumps of Weblogic 8.1 managed servers, the following lock:
"ExecuteThread: '2' for queue: 'weblogic.admin.RMI'" id=186 idx=0x182 tid=5292 prio=5 alive, in native, native_blocked, daemon
at jrockit/vm/Allocator.allocLargeArray(JIZ)Ljava/lang/Object;(Native Method)
at jrockit/vm/Allocator.allocArray(JIZ)Ljava/lang/Object;(Unknown Source)
at java/util/HashMap.resize(I)V(Unknown Source)
at java/util/HashMap.addEntry(ILjava/lang/Object;Ljava/lang/Object;I)V(Unknown Source)
at java/util/HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
at java/util/HashSet.add(Ljava/lang/Object;)Z(HashSet.java:192)
at com/sun/management/jmx/RepositorySupport.query(Ljavax/management/ObjectName;Ljavax/management/QueryExp;)Ljava/util/Set;(RepositorySupport.java:241)
at com/sun/management/jmx/MBeanServerImpl.queryMBeans(Ljavax/management/ObjectName;Ljavax/management/QueryExp;)Ljava/util/Set;(MBeanServerImpl.java:1042)
^-- Holding lock: weblogic/management/internal/RemoteMBeanServerImpl@0x2000000008e78fc0[fat lock]
at weblogic/management/internal/RemoteMBeanServerImpl.queryMBeans(Ljavax/management/ObjectName;Ljavax/management/QueryExp;)Ljava/util/Set;(RemoteMBeanServerImpl.java:911)
at com/sun/management/jmx/MBeanServerImpl.queryNames(Ljavax/management/ObjectName;Ljavax/management/QueryExp;)Ljava/util/Set;(MBeanServerImpl.java:1075)
at weblogic/management/internal/MBeanHomeImpl.mbeanServerQuery(Ljavax/management/ObjectName;Ljavax/management/QueryExp;)Ljava/util/Set;(MBeanHomeImpl.java:487)
at weblogic/management/internal/MBeanHomeImpl.getMBeansByClass(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/Set;(MBeanHomeImpl.java:311)
at weblogic/management/internal/MBeanHomeImpl_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source)
at weblogic/rmi/internal/BasicServerRef.invoke(Lweblogic/rmi/extensions/server/RuntimeMethodDescriptor;Lweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;)V(BasicServerRef.java:492)
at weblogic/rmi/internal/BasicServerRef$1.run()Ljava/lang/Object;(BasicServerRef.java:435)
at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)
at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)
at weblogic/rmi/internal/BasicServerRef.handleRequest(Lweblogic/rmi/spi/InboundRequest;)V(BasicServerRef.java:430)
at weblogic/rmi/internal/BasicExecuteRequest.execute(Lweblogic/kernel/ExecuteThread;)V(BasicExecuteRequest.java:35)
at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:183)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
Then a big number of other threads are blocked by this lock. An example is:
"ExecuteThread: '1' for queue: 'HZOZMsgEjbExecuteThreadQueue'" id=17 idx=0x30 tid=5123 prio=5 alive, in native, blocked, daemon
-- Blocked trying to get lock: weblogic/management/internal/RemoteMBeanServerImpl@0x2000000008e78fc0[fat lock]
at jrockit/vm/Threads.waitForSignal(J)Z(Native Method)
at jrockit/vm/Locks.fatLockBlockOrSpin(JLjrockit/vm/ObjectMonitor;II)V(Unknown Source)
at jrockit/vm/Locks.lockFat(Ljava/lang/Object;JLjrockit/vm/ObjectMonitor;Z)Ljava/lang/Object;(Unknown Source)
at jrockit/vm/Locks.monitorEnterSecondStage(Ljava/lang/Object;I)Ljava/lang/Object;(Unknown Source)
at jrockit/vm/Locks.monitorEnter(Ljava/lang/Object;)Ljava/lang/Object;(Unknown Source)
at com/sun/management/jmx/MBeanServerImpl.internal_addObject(Ljava/lang/Object;Ljavax/management/ObjectName;)V(MBeanServerImpl.java:2379)
at com/sun/management/jmx/MBeanServerImpl.registerMBean(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;(MBeanServerImpl.java:876)
at weblogic/management/internal/RemoteMBeanServerImpl.private_registerMBean(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;(RemoteMBeanServerImpl.java:614)
at weblogic/management/internal/RemoteMBeanServerImpl.registerMBean(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;(RemoteMBeanServerImpl.java:554)
at weblogic/management/runtime/RuntimeMBeanDelegate.register()V(RuntimeMBeanDelegate.java:166)
at weblogic/management/runtime/RuntimeMBeanDelegate.<init>(Ljava/lang/String;Lweblogic/management/runtime/RuntimeMBean;Z)V(RuntimeMBeanDelegate.java:122)
at weblogic/management/runtime/RuntimeMBeanDelegate.<init>(Ljava/lang/String;Lweblogic/management/runtime/RuntimeMBean;)V(RuntimeMBeanDelegate.java:85)
at weblogic/jms/frontend/FEConnection.<init>(Lweblogic/jms/frontend/FEConnectionFactory;Ljava/lang/String;Lweblogic/jms/common/JMSID;Lweblogic/jms/dispatcher/Dispatcher;IIJJJJLjava/lang/String;JZZIIIZZ)V(FEConnection.java:183)
at weblogic/jms/frontend/FEConnectionFactory$1.run()Ljava/lang/Object;(FEConnectionFactory.java:434)
at weblogic/security/acl/internal/AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(AuthenticatedSubject.java:363)
at weblogic/security/service/SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManager.java:147)
at weblogic/jms/frontend/FEConnectionFactory.connectionCreateInternal(Lweblogic/jms/dispatcher/DispatcherWrapper;Z)Lweblogic/jms/client/JMSConnection;(FEConnectionFactory.java:430)
at weblogic/jms/frontend/FEConnectionFactory.connectionCreate(Lweblogic/jms/dispatcher/DispatcherWrapper;)Lweblogic/jms/client/JMSConnection;(FEConnectionFactory.java:371)
at weblogic/jms/client/JMSConnectionFactory.createConnectionInternal(Ljava/lang/String;Ljava/lang/String;Z)Lweblogic/jms/client/JMSConnection;(JMSConnectionFactory.java:148)
at weblogic/jms/client/JMSConnectionFactory.createQueueConnection()Ljavax/jms/QueueConnection;(JMSConnectionFactory.java:75)
at gr/cosmote/common/util/UtilLib.putObjToQueue(IILjava/io/Serializable;JLgr/cosmote/common/bus/LoginInfo;)V(UtilLib.java:664)
at gr/cosmote/common/util/UtilLib.putObjToQueue(IILjava/io/Serializable;Lgr/cosmote/common/bus/LoginInfo;)V(UtilLib.java:636)
at gr/cosmote/bus/session/HZOZQueueBean.handleMozartCallbackVO(Lgr/cosmote/common/bus/mozartVOs/MozartCallbackVO;)V(HZOZQueueBean.java:418)
at gr/cosmote/bus/session/HZOZQueueBean.onMessage(Ljavax/jms/Message;)V(HZOZQueueBean.java:191)
at weblogic/ejb20/internal/MDListener.execute(Lweblogic/kernel/ExecuteThread;)V(MDListener.java:400)
at weblogic/ejb20/internal/MDListener.transactionalOnMessage(Ljavax/jms/Message;)V(MDListener.java:333)
at weblogic/ejb20/internal/MDListener.onMessage(Ljavax/jms/Message;)V(MDListener.java:298)
at weblogic/jms/client/JMSSession.onMessage(Ljavax/jms/MessageListener;Lweblogic/jms/common/MessageImpl;)V(JMSSession.java:2686)
at weblogic/jms/client/JMSSession.execute(Lweblogic/kernel/ExecuteThread;)V(JMSSession.java:2598)
at weblogic/kernel/ExecuteThread.execute(Lweblogic/kernel/ExecuteRequest;)V(ExecuteThread.java:224)
at weblogic/kernel/ExecuteThread.run()V(ExecuteThread.java:183)
at jrockit/vm/RNI.c2java(JJJJ)V(Native Method)
-- end of trace
What is this 'weblogic.admin.RMI' queue?
What I understand so far is that the object that appears as locked (RemoteMBeanServerImpl) is used to initiate and instantiate ejb/rmi calls from the managed servers. Does it attempt some sort of connection to the admin? Something else quite interesting that I read somewhere, that when this call (queryMBeans) is performed, the result is handled by a non thread-safe collection object which could (as a result of a weblogic bug) result in an infinite loop.
By the way, our set up is 1 cluster, 4 managed servers in 4 different machines. The admin is installed along with one of the managed. All servers are configured to start/stop/run independently.
Anybody any ideas?

hi,
What is this 'weblogic.admin.RMI' queue has the threads executing the calls from remote managed servers to the Admin Server and from the Admin Server to the managed servers for internal status updates.
There was a bug in wls 8.1 where the call the to the admin server from all the managed server in the cluster used to create a thread lock state.
Contact the Oracle support for the related CR and the patch.
thanks,
Sandeep

Similar Messages

  • WLS Container Threads LOCKED

    Apologize for this cross-post but I posted in in probably wrong group
    Found several WLS Jrockit Threads LOCKED. We are using jrockit81sp2rp1_141_06
    System got HUNG
    All MUXERS are LOCKED show SocketResetException that seems funny ?
    Thanks
    Harish
    [enablersthreaddump.txt]

    Hi,
    I'm also facing the same problem, but my server is WLI 8.1 SP2. When we restarted the server for couple of times, it started working fine. but why it is coming? also restarting production server is not a possible solution.
    Any one has answers?
    Thanks,
    Chandra. T

  • Thread Locking Exception

    Hi All,
    Many times while working on MDM via MDM API's I received Thread Locking Exception. This Exception is so severe that it leads MDM Data Manager in  hanged state and get resolved only by restarting the server. Sometimes I do not get this exception but Data Manager gets hanged, even I am unable to open Console also. Please answer this question.
    Thanks ..
    Vibha

    Hello All,
    Still we haven't able to resolve this issue. We already have SR with oracle. So many logs were captured.
    Below is the snippet of seedSchedulerdata.log
    ${work.dir}Entered Validate methodExiting Validate method------------------------------------------------------------
    Start seeding task
    job name--> Password Expiration Task
    schTaskName--> Password Expiration Task
    task class name--> com.thortech.xl.schedule.tasks.tcTskPasswordExpiration
    task job disable--> 0
    task frequency--> DAILY
    task maxRetries--> 5
    task retryCount--> 0
    task paramName--> Email Definition Name
    task paramValue--> Password Expired
    task paramTpe--> String
    Updating Job :Password Expiration Task with keys
    java.lang.Exception: Unable to seed scheduler data due to configuration problems. Contact System Administrator
         at oracle.iam.scheduler.seed.SeedSchedulerData.startSeeding(SeedSchedulerData.java:770)
         at oracle.iam.scheduler.seed.SeedSchedulerData.main(SeedSchedulerData.java:113)
    If any of them faced such issue please help.
    Thanks
    DK

  • Thread lock

    Dear Moderator,
    I wanted to know the answers of some questions which were asked to me during interview. So I posted those questions in the Forum on 1st December. But today when I logged in to check the answers, I found the thread locked. Can you please let me know  on what basis a thread is locked.
    Regards,
    D. Mallick
    Moved from Test and Playground forum.
    Edited by: kishan P on Dec 3, 2010 11:22 PM

    I can remember moving one of them which several forum members where complaining about (understandably).
    I mean... I can imagine encountering a thread called "questions" even although it is a meaninglessly stupid subject title, but what are we to find usefull in answers ??
    Get some fresh air over the weekend. You have some reading to do next week.
    Cheers,
    Julius

  • Threads/Locks within EJBs

    I'm trying to get a good handle on the reason there are restrictions on threading/locking
    semantics used from within application code dealing with EJBs. I think the idea
    is the application code shouldn't do anything to interfere with the locking of
    the ejbs done from within the container at various stages in their lifecycle.
    So, I shouldn't subject the bean implemenation class to any explicit synch. But
    what about spawning threads from within my EJBs? In 3rd party classes used by
    my EJBs?
    Any clear explanation is gratefully appreciated.
    Max

    Max
    See section 24.1.2 "Programming restrictions" in the ejb20 final release specification.
    Thanks
    Jim
    Max wrote:
    I'm trying to get a good handle on the reason there are restrictions on threading/locking
    semantics used from within application code dealing with EJBs. I think the idea
    is the application code shouldn't do anything to interfere with the locking of
    the ejbs done from within the container at various stages in their lifecycle.
    So, I shouldn't subject the bean implemenation class to any explicit synch. But
    what about spawning threads from within my EJBs? In 3rd party classes used by
    my EJBs?
    Any clear explanation is gratefully appreciated.
    Max[Reply.vcf]

  • Weblogic threads locked

    We are noticing performance issue with our production environment. Production environment has a cluster of 6 weblogic instances and the server hangs very often and entire system go down. I have attached thread dump collected from one of the weblogic server. Any idea where is the issue? can you help please.
    "ExecuteThread: '19' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x04f92f38 nid=0xb8c runnable [0x0713e000..0x0713fd94]
         at java.lang.Throwable.fillInStackTrace(Native Method)
         - waiting to lock <0x164ec610> (a java.lang.ClassNotFoundException)
         at java.lang.Throwable.<init>(Throwable.java:217)
         at java.lang.Exception.<init>(Exception.java:59)
         at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java:65)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         - locked <0x173b3428> (a sun.misc.Launcher$AppClassLoader)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         - locked <0x173b3428> (a sun.misc.Launcher$AppClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
         - locked <0x173c1900> (a weblogic.utils.classloaders.GenericClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
         - locked <0x17387ed8> (a weblogic.utils.classloaders.GenericClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
         - locked <0x17dc9028> (a weblogic.utils.classloaders.GenericClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
         - locked <0x17db3a88> (a weblogic.utils.classloaders.ChangeAwareClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
         - locked <0x17db3a88> (a weblogic.utils.classloaders.ChangeAwareClassLoader)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         - locked <0x17db3a88> (a weblogic.utils.classloaders.ChangeAwareClassLoader)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:197)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171)
         at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:112)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerMethod(BaseDeserializerFactory.java:201)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getGetDeserializer(BaseDeserializerFactory.java:289)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:171)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:115)
         at org.apache.axis.encoding.ser.SimpleDeserializerFactory.getDeserializerAs(SimpleDeserializerFactory.java:107)
         at org.apache.axis.encoding.DeserializationContextImpl.getDeserializer(DeserializationContextImpl.java:452)
         at org.apache.axis.encoding.DeserializationContextImpl.getDeserializerForType(DeserializationContextImpl.java:467)
         at org.apache.axis.message.MessageElement.getValueAsType(MessageElement.java:571)
         at com.axeda.sdk.webservices.handlers.LoginHandler.findLogin(LoginHandler.java:153)
         at com.axeda.sdk.webservices.handlers.LoginHandler.handleRequest(LoginHandler.java:99)
         at com.axeda.sdk.webservices.handlers.LoginHandler.invoke(LoginHandler.java:78)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:287)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7047)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3902)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

    Try setting the 'Inactive connection timeout' value on the jdbc data source. Looks like your data source hangs. Also would be a good idea to set the 'test connections on reserve' on with test table sql.

  • "Remember me" not working - Thread locked, no answer???

    I'm having an issue where the remember me button on the wiki doesn't seem to have ANY effect on users. I would have replied to this thread, but isn't been locked with no resolution.
    http://discussions.apple.com/thread.jspa?threadID=2369660&tstart=150

    Not nice,
    Dear Apple just by ignoring the bug it doesn't go away ! Don't be evil ..
    So please open the thread again dear Admins

  • Another Thread Locked

    "new intel imac 7.2 where have my plugins gone!!!! argh"
    seemed like a reasonable one to me, though the last post said something like "internal logic AUs are good, but I can't use them" which isn't correct. First, Logic's plugins aren't AU, second, the Logic plugins in 7.2 should be Universal, third, all the AU's which come with OS X on Intel should be Universal Binaries. I wonder what he was referring to?
    The locked thread also discussed performance comparisons between Logic on the Intel iMac and PowerPC systems. Another reasonable topic of interest here.
    Uh-oh... I hope I haven't crossed the line...

    I don't think it's so bad that the old thread was locked, since an answer to the original question had been established and the thread was accumulating misinformation and complaints. But I'll take advantage of this thread to (1) clarify a comment I made on the old thread and (2) ask a closely related question.
    (1) First the clarification: someone pointed out that AUs and VSTs need to be universal binaries to run inside a UB host. In response, I wrote "I don't know about VSTs", but I only wrote that because I was focusing on Logic (which doesn't run VSTs at all, of course). I didn't mean to call into question whether a UB host could run non-UB VSTs; I expect one couldn't.
    (2) Now the question: I understand that (ignoring the Rosetta option) an Intel Mac running Logic 7.2 can't host AU plug-ins unless those plug-ins are Universal Binaries. That makes sense to me. But what about Logic 7.2 running on the older G4/G5 architecture? Am I right to assume that Logic 7.2 running on a G5 (not an intel Mac) can host the same non-UB AUs as Logic 7.1?
    Dual G5 2.0GHz   Mac OS X (10.4.2)  

  • Why was "Mail not remembering passwords" thread locked out?

    The problem wasn't resolved, yet the thread has been locked out! Does Apple monitor this board? If so, could someone from Apple at least acknowledge that there is a Mail-related problem and that someone is looking into it? The problem wasn't resolved with the latest Leopard release and even a cursory reading through the aforementioned thread reveals a lot of very frustrated users!

    I had the same problem every once in a while with Tiger and now with Leopard. Sometimes, it works properly, i.e. remembering the passord. Sometimes, I am asked for my password repeatedly whether I check the "save" box. I have two different e-mail providers (gmail.com and gmx.net). I only get the troubles with the second one from time to time over a period of time.
    I could "fix" it with the following workaround:
    Mail > Preferences > General > Check for new mail: every 5 minutes.
    Before, I had had set it to "check every 1 minute" what often resulted in the "loss" of the password.

  • Why is a thread locked?

    I'm just wondering if someone can tell me why the thread at "http://discussions.apple.com/thread.jspa?threadID=564703&tstart=0" has been locked?
    Apple has taken my computer for repair, so I was intending to provide an update (a positive one, I hope) once I receive it back; I can't do that now.
    Thanks

    Thanks for your reply.
    I was hoping my experience would help other people decide whether or not to ask for a fix. If the noise doesn't bother you, then why would you want to have random parts of your otherwise working computer replaced? But it bothered me, so I was willing to take the risk.
    I note that another thread discussing problematic macbooks (http://discussions.apple.com/thread.jspa?threadID=567126&tstart=0) has been locked.
    I was hoping to hear something from whoever locked it...

  • Synchronized methods and thread locking

    Hi can someone please explain the difference between these two examples in the context of object locking
    public void method1(){
        synchronized(this){
    }And
    StringBuffer aStringBufferObject = new StringBuffer("A");
    public void method2(){
        synchronized(aStringBufferObject){
    }I know the first example will obtain a lock on the this instance and the second will obtain a lock of the aStringBufferObject instance. But i dont really understand what the effect or the difference of teh two is.
    For example, in the second example, will threads still be able to execute the code inside the synchronized block because the lock is not related to the 'this' instance?
    I know that synchronizing a method or a block of code prevents multiple threads to access that block/method at the same time but what is the purpose of specifying the object to lock on and what is the difference in the way the object is specified as in teh above examples.
    Thanks
    Edited by: ziggy on Jul 24, 2011 3:23 PM

    Shortly put, the synchronized(object) doesn't lock the object reference in any way. It locks the code inside the synchronized's brackets, so that code can run it only when they have locked object (or in truth, when they have acquired object's monitor).
    Since only one thread at a time can lock an object (obtain an object's monitor), this means that 2 threads executing blocks that synchronize on the same object can't run at the same time, ensuring thread safety (among other things).

  • Multiple threads generated on jms processing - thread locked?

    Hi,
    One of the applications we use is deployed on Oracle App Server 10g. The server runs fine until a certain time when the application receives around 50 JMS messages at the time, the server starts to slow down and becomes inoperable and only a restart fixes this. Here's the thread dump which looks like there are quite a few threads being spawned all waiting on some process. Is there any way we could figure out what is causing this slow down from this thread dump. There seems to be some thread that is locked that is causing all the other threads to wait.
    "SystemThreadGroup-88" prio=10 tid=0x00002aab45154000 nid=0x4422 in Object.wait() [0x0000000049193000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaaed94e028> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:376)
         - locked <0x00002aaaed94e028> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:787)
         at com.evermind.util.ReleasableResourcePooledExecutor.myGetTask(ReleasableResourcePooledExecutor.java:266)
         at com.evermind.util.ReleasableResourcePooledExecutor.access$000(ReleasableResourcePooledExecutor.java:42)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:302)
         at java.lang.Thread.run(Thread.java:619)
    "MetricCollector:METRICCOLL50:5" daemon prio=10 tid=0x00002aab48bd8000 nid=0x4156 in Object.wait() [0x0000000048f91000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaad5432e30> (a oracle.sysman.emSDK.emd.rt.MetricCollectorThread)
         at oracle.sysman.emSDK.emd.rt.MetricCollectorThread.run(MetricCollectorThread.java:351)
         - locked <0x00002aaad5432e30> (a oracle.sysman.emSDK.emd.rt.MetricCollectorThread)
         at java.lang.Thread.run(Thread.java:619)
    "RMICallHandler-50" prio=10 tid=0x0000000045c56800 nid=0x36a8 in Object.wait() [0x0000000049092000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aab2f89a6b0> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:376)
         - locked <0x00002aab2f89a6b0> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:787)
         at com.evermind.util.ReleasableResourcePooledExecutor.myGetTask(ReleasableResourcePooledExecutor.java:266)
         at com.evermind.util.ReleasableResourcePooledExecutor.access$000(ReleasableResourcePooledExecutor.java:42)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:302)
         at java.lang.Thread.run(Thread.java:619)
    "RMICallHandler-49" prio=10 tid=0x0000000046064000 nid=0x7fc1 in Object.wait() [0x0000000048e90000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aab2038edb0> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:376)
         - locked <0x00002aab2038edb0> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:787)
         at com.evermind.util.ReleasableResourcePooledExecutor.myGetTask(ReleasableResourcePooledExecutor.java:266)
         at com.evermind.util.ReleasableResourcePooledExecutor.access$000(ReleasableResourcePooledExecutor.java:42)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:302)
         at java.lang.Thread.run(Thread.java:619)
    "JMSRequestHandler[311:AppServ2.compass.ontario.ca:34199]" prio=10 tid=0x0000000045a50000 nid=0x5f8e runnable [0x0000000048385000]
    java.lang.Thread.State: RUNNABLE
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         - locked <0x00002aaac7177a70> (a java.io.BufferedInputStream)
         at java.io.DataInputStream.readInt(DataInputStream.java:370)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.processRequest(TCPHandler.java:555)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.process(TCPHandler.java:521)
         at com.evermind.server.jms.TCPHandler.run(TCPHandler.java:204)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    "JMSRequestHandler[310:AppServ2.compass.ontario.ca:23953]" prio=10 tid=0x00000000454dd800 nid=0x4953 runnable [0x0000000048183000]
    java.lang.Thread.State: RUNNABLE
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         - locked <0x00002aaac7177d78> (a java.io.BufferedInputStream)
         at java.io.DataInputStream.readInt(DataInputStream.java:370)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.processRequest(TCPHandler.java:555)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.process(TCPHandler.java:521)
         at com.evermind.server.jms.TCPHandler.run(TCPHandler.java:204)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    "OracleTimeoutPollingThread" daemon prio=10 tid=0x00002aab440b9800 nid=0x44ff waiting on condition [0x0000000048284000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
         at java.lang.Thread.sleep(Native Method)
         at oracle.jdbc.driver.OracleTimeoutPollingThread.run(OracleTimeoutPollingThread.java:157)
    "RMICallHandler-35" prio=10 tid=0x00002aab4411e000 nid=0x4379 in Object.wait() [0x0000000048082000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aab2f93af88> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.SynchronousChannel.poll(SynchronousChannel.java:376)
         - locked <0x00002aab2f93af88> (a EDU.oswego.cs.dl.util.concurrent.LinkedNode)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(PooledExecutor.java:787)
         at com.evermind.util.ReleasableResourcePooledExecutor.myGetTask(ReleasableResourcePooledExecutor.java:266)
         at com.evermind.util.ReleasableResourcePooledExecutor.access$000(ReleasableResourcePooledExecutor.java:42)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:302)
         at java.lang.Thread.run(Thread.java:619)
    "RMIConnectionThread" prio=10 tid=0x0000000045487800 nid=0x2c64 runnable [0x0000000047b7d000]
    java.lang.Thread.State: RUNNABLE
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         - locked <0x00002aaac717afd8> (a java.io.BufferedInputStream)
         at com.evermind.io.IOUtils.readCompressedInt(IOUtils.java:313)
         at oracle.oc4j.rmi.RmiTransport$DiscreteMessageIn.<init>(RmiTransport.java:241)
         at oracle.oc4j.rmi.RmiTransport.createDiscreteMessageIn(RmiTransport.java:232)
         at com.evermind.server.rmi.RMIProtocol$Version_1_3.getMessageIn(RMIProtocol.java:540)
         at com.evermind.server.rmi.RMIProtocol.getMessageIn(RMIProtocol.java:172)
         at com.evermind.server.rmi.RMIServerConnection.receiveInputMessage(RMIServerConnection.java:385)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:127)
         at com.evermind.server.rmi.RMIServerConnection.listenForOrmiCommands(RMIServerConnection.java:390)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:107)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    "TimerThread300000" daemon prio=10 tid=0x00002aab483a9800 nid=0x2c03 in Object.wait() [0x0000000047a7c000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaac52b3510> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer._doSleep(Unknown Source)
         - locked <0x00002aaac52b3510> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)
    "oracle.dms.aggregator.Timer@15000" daemon prio=10 tid=0x00002aab483a8000 nid=0x2bfa in Object.wait() [0x000000004797b000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaac56ade18> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer._doSleep(Unknown Source)
         - locked <0x00002aaac56ade18> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)
    "oracle.dms.aggregator.Timer@300000" daemon prio=10 tid=0x00002aab4883c000 nid=0x2bf9 in Object.wait() [0x000000004762c000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaac56ecf90> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer._doSleep(Unknown Source)
         - locked <0x00002aaac56ecf90> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)
    "oracle.dms.aggregator.Timer@30000" daemon prio=10 tid=0x00002aab4883b000 nid=0x2bf7 in Object.wait() [0x000000004752b000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaac56ae408> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer._doSleep(Unknown Source)
         - locked <0x00002aaac56ae408> (a oracle.dms.aggregator.Timer)
         at oracle.dms.aggregator.Timer.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
         - locked <0x00002aaabe661a78> (a java.io.BufferedInputStream)
         at java.io.DataInputStream.readInt(DataInputStream.java:370)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.processRequest(TCPHandler.java:555)
         at com.evermind.server.jms.TCPHandler$JMSRequestHandler.process(TCPHandler.java:521)
         at com.evermind.server.jms.TCPHandler.run(TCPHandler.java:204)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:619)
    "Thread-19" daemon prio=10 tid=0x0000000045f54800 nid=0x2757 waiting on condition [0x0000000043873000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
         at java.lang.Thread.sleep(Native Method)
         at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:85)
    "Thread-17" daemon prio=10 tid=0x0000000045f5a800 nid=0x2755 waiting on condition [0x0000000043671000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
         at java.lang.Thread.sleep(Native Method)
         at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:85)
    "Thread-15" daemon prio=10 tid=0x0000000045f59800 nid=0x2753 waiting on condition [0x0000000043570000]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
         at java.lang.Thread.sleep(Native Method)
         at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:85)
    "Timer-6" prio=10 tid=0x00002aab4463b800 nid=0x2751 in Object.wait() [0x000000004346f000]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on <0x00002aaabf31c868> (a java.util.TaskQueue)
         at java.util.TimerThread.mainLoop(Timer.java:509)
         - locked <0x00002aaabf31c868> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:462)
    "VM Thread" prio=10 tid=0x000000004512a000 nid=0x270d runnable
    "GC task thread#0 (ParallelGC)" prio=10 tid=0x00000000450b8800 nid=0x2709 runnable
    "GC task thread#1 (ParallelGC)" prio=10 tid=0x00000000450ba800 nid=0x270a runnable
    "GC task thread#2 (ParallelGC)" prio=10 tid=0x00000000450bc800 nid=0x270b runnable
    "GC task thread#3 (ParallelGC)" prio=10 tid=0x00000000450be000 nid=0x270c runnable
    "VM Periodic Task Thread" prio=10 tid=0x00000000452da000 nid=0x2718 waiting on condition
    JNI global references: 3476
    Heap
    PSYoungGen total 717696K, used 558827K [0x00002aab0e200000, 0x00002aab3e200000, 0x00002aab3e200000)
    eden space 652224K, 84% used [0x00002aab0e200000,0x00002aab2f9bac88,0x00002aab35ef0000)
    from space 65472K, 15% used [0x00002aab35ef0000,0x00002aab368f0000,0x00002aab39ee0000)
    to space 62336K, 0% used [0x00002aab3a520000,0x00002aab3a520000,0x00002aab3e200000)
    PSOldGen total 1310720K, used 783099K [0x00002aaabe200000, 0x00002aab0e200000, 0x00002aab0e200000)
    object space 1310720K, 59% used [0x00002aaabe200000,0x00002aaaedebecb8,0x00002aab0e200000)
    PSPermGen total 135168K, used 134152K [0x00002aaaae200000, 0x00002aaab6600000, 0x00002aaabe200000)
    object space 135168K, 99% used [0x00002aaaae200000,0x00002aaab6502318,0x00002aaab6600000)
    I've pasted just certain extracts of the dump file. What is causing all these threads to wait? Any information on how to interpret this log file will be really helpful!
    Thanks,
    Anita

    It was caused by the 2nd threads' classloader.
              The 2nd thread uses the bootstrap classloader by default when attached to jvm, which loads the 'core' java classes only, not even extended classes.
              <p>
              This cause JNDI factory initialization failed.
              <p>
              The solution is to set the 2nd thread's context loader as the system class loader using JNI. See java.lang.Thread#setContextLoader and java.lang.ClassLoader#getSystemClassLoader.

  • Thread locked without use

    Hi ,
    I posted thread  and the thread was locked . It has been said to me i must search on sdn.
    My question i wanted to find i couldnot find on sdn and was bit confused so wanted to ask exactly.
    I think its unfair.
    Regards,
    Shruti

    I found the following posts of yours in the Abuse Reports system:
    >>OM PA test scripts 
    ><<Don't ask for documents>>
    >
    >Can somebody send me
    >>  Re: OM PA test scripts  OM PA test scripts
    ><<Don't post your email address>>
    >my address is
    >xxx xxx at xxx dot com
    >>  SAP course material 
    ><<Dont' ask for COPYRIGHT material>>
    >
    >Hi ,
    >Can somebody send me course material of SAP books which we done in academy.
    >Regards,
    >Shruti
    >> Chief position in MSS 
    ><<Don't ask for documents and don't post your email address>>
    >
    >Do u have any configration document regarding the MSS and ESS.
    >Pls send me at xxx xxxxat xxxdot com.
    >Kind Regards,
    >Shruti
    >>  Transactions  Transactions 
    >Hi,
    >i want to print a file from the SAP to email.
    >how can i do this.
    >shruti
    >>  Re: Transactions  Transactions 
    >I am se37, function module, want to print entire list , ow can i do this.
    >what is transaction SP01,ssot for.
    >shruti
    >
    >Sikinder,
    >I want to know how to create
    >function module group
    >function module
    >how to save ur own function module
    >what kind of modules are available
    >what is porpose of creating it.
    >should i open new thread or u will reply in this thread only.
    >Regards,
    >Shruti
    >>central user administration ( cua)  central user administration ( cua) 
    >Hi,
    >Can somebody tell details about Central user administration and ALE
    >How will be they used exactly.
    >Regards,
    >Shruti
    Please confirm that you have read the forum rules.
    Cheers,
    Julius

  • Why my previous thread locked?

    I searched the forum but I didnt got the answer.
    If you are an expert then tell me the answer.
    Moderator does not mean that you can lock as your wish.
    Did you read what was inside and What is the issue?
    First give a thought and act.
    You may block my user id but remember what you have done is wrong.
    Try to help as much as you can but dont put break on the people who are trying to help .

    Reason for locking your previous thread is cleary mentioned in the thread itself. Solution to your question is easily searchable ( or by reading the documentation ).
    [Please read Forum Rules of Engagement before posting|Please read "The Forum Rules of Engagement" before posting!  HOT NEWS!!;
    Regards, Vinod

  • Thread Locked

    Dear Moderator,
    My Thread -  Account determination for entry INT GBB ____ VBO 3000 not possible    Locked. My problum is solved by Mr. lokeshvictor's Post. I want to give points to him.
    Please unlock it.
    Sumit

    Hi Sumit
    we have to follow rule and regulation of forum,one rule is
    You do not ask or answer questions that have been asked many times. A little search should verify this,your question was general question which asked many  times in this forum you should serach it in forum before posting
    check following link for rules and regulation
    [IMPORTANT information regarding posting in this forum - please READ;
    Regards
    Kailas

Maybe you are looking for

  • A series of recent problems with new MacBook Pro

    Hi, I bought a new MacBook Pro last May.  The spec is: Retina, 13-inch, Late 2013 Processor: 2.4 GHz Intel Core i5 I installed Yosemite in November (I think) and the Mac has been giving problems ever since.  I'm not sure whether the problems are rela

  • No more categories in numbers 3.0?

    I have a worksheet full of categories. Now I have a bunch o useless tables.

  • Widescreen or fit to screen choice...

    HI! I saw this option in different movie dvd menu and I want to know how to do this... I want to know how we can put a choice to the viewer to choose between: play it widescreen or fit to screen 4:3... is it a script who tell how play the track..? it

  • XDB.DBMS_XMLDOM crashes

    Oracle 9.2.0.1.0 here's the test procedure create table aclob (res clob); create or replace procedure xmltest is    outDoc dbms_xmldom.DOMDocument;    outNode dbms_xmldom.DOMNode;    curNode dbms_xmldom.DOMNode;    xmlElem dbms_xmldom.DOMElement;   

  • File to idoc logic

    HI friends i am doing file to idoc scenario, i need to do some changes like in  the source file i have the field  DATE and it has to be mapped to the target field idoc and my logic is the mapping program needs to take the Delivery date that is in the