WebLogic threading in the webcontainer

Hi.
How does a long running servlet execution work with regards to threading in WebLogic6.1sp3.
I know there is a thread pool and that new incoming requests are put in a workqueue
to await to be assigned to a thread.
If a servlet has a long running request can there be switching of the thread instance
assigned to a request? With a request being "interrupted" after a while of execution,
the "workload" returned to the workqueue and made ready to be assigned a different
running thread until completion?
The alternative would be the guaranteed execution of the request by the same thread
instance. (Wouldn't this destroy the notion of having more concurrent requests
being processed, not queued, than the total number of threads assigned to the
server? )

Yup, you can use it with long running requests :
http://groups.google.com/groups?selm=3c1fab45%40newsgroups.bea.com&oe=UTF-8&
output=gplain
On the other hand this is only useful if you can execute request
asynchronously (server push for example).
"Trond Strømme" <[email protected]> wrote in message
news:[email protected]..
>
But is this done with long lived requests?
trond
"Dimitri I. Rakitine" <[email protected]> wrote:
"Trond Strømme" <[email protected]> wrote in message
news:3d934796$[email protected]..
Hi.
How does a long running servlet execution work with regards to
threading
in WebLogic6.1sp3.
I know there is a thread pool and that new incoming requests are putin a
workqueue
to await to be assigned to a thread.
If a servlet has a long running request can there be switching of thethread instance
assigned to a request?Yes, there is a way to detach ServletResponse from an execute thread,
but,
unfortunately, this
functionality is not documented ;-(
With a request being "interrupted" after a while of execution,
the "workload" returned to the workqueue and made ready to be assigneda
different
running thread until completion?
The alternative would be the guaranteed execution of the request bythe
same thread
instance. (Wouldn't this destroy the notion of having more concurrentrequests
being processed, not queued, than the total number of threads assignedto
the
server? )
Dimitri
Dimitri

Similar Messages

  • RFC: Introduce new 'Article/Tutorial (Comment) Threads' in the Web Dynpro Forum

    Some time ago I've suggested on SCN Support is both forum moderator and most active articles wrtiter
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net
    Message was edited by: Bertram Ganz
    This thread was branched from forum thread: How to print the data of a Model node.

    Hi Valery,
    thanks for this great idea. Indeed, there is no channel set up to communicate feedback/suggestions/questions to Web Dynpro tutorials or articles in a standardized way.
    WebLogs can be commented on the WebLog page itself and they are announced in a special ;\ New Web Dynpro Weblogs which can be opened via the <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">Web Dynpro Feature2Sample Matrix</a>. Actually the section 'Further Information' lists all related articles, WebLogs etc. These links are regularly updated so that the Sample Description Pages helps to keep all links to valuable information in a central place.
    The 'Sample Description Page' should additionally comprise a section <b>'Discussion'</b> with a link to the above 'Article Comment Thread' in the Web Dynpro forum. The reader downloads the material from the sample description page and also finds a link to the related 'Article Comment Thread' there.
    For all new articles (which are combined with a related 'Article Comment Thread') the <i>Further Information</i> links could point to the 'Article Comment Thread' (which then itself links to the article) but not directly to the article resource. The reader can then also have look at the existing comments to the related resource. As an alternative the article PDF itself should have a permanent link to the 'Article Comment Thread' in the Web Dynpro Forum.
    Please post your comments on this idea.
    Regards, Bertram

  • 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.

  • Weblogic patch for the "Authentication for user wlsadmin denied" issue

    Hi Everyone,
    When I try to login to the weblogic console using the weblogic user id and password, I got below issue in the production server..Sometime back I saw a thread that Oracle has provided a patch for this issue. If any of you is aware of it then could you please provide us the patch file and its location please. This is quite a bit urgent. Awaiting for your response. Thanks in advance.
    <Apr 3, 2011 10:41:02 PM ICT> <Critical> <Security> <BEA-090403> <Authentication for user wlsadmin denied>
    <Apr 3, 2011 10:41:02 PM ICT> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication for user wlsadmin denied
    I need to communicate to onsite members about the patch details etc.
    Edited by: user11290902 on May 13, 2011 1:27 AM

    Faisal, Thank you for your response. Here the weblogic console id & password are known to few people so the guess you are making might be correct. Could anyone might have tried with incorrect credentials couple of times before we face this issue, I am not sure though. The moment we provide the credentials and upon click on Log In button we are getting j_security_check.
    http://asdo0002:9683/console/j_security_check
    Authentication Denied.
    The username or password has been refused by WebLogic Server. Please try again.
    Any information about the work--arounds or patches from weblogic would be helpful to me... Thanks a lot.

  • Weblogic thread issue

    I am using Weblogic portal server 7.0 SP2
    Lately, whenever there is a backend system failure (database or any other system), eventually, all weblogic threads wait for the backend connection and get stuck. I get following message for all threads
    ExecuteThread: '28' for queue: 'default' has been busy for "785" seconds working on the request "Http Request: XXXXXX, which is more than the configured time (StuckThreadMaxTime) of "600" seconds.>
    Any idea why such a thing can happen?

    You have a contention problem at back end ...

  • 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.

  • How to run 2 weblogic instance in the same machine

    is it possible to run 2 weblogic instance in the same machine ?
    I have created 2 domains ...domain-1 and domain-2 in my hard disk and both of them have startWeblogic.cmd in them..
    but i cant run them simultaneously though individually they run.
    they differ by HTTP port and Debug port but still they dont run simultaneously
    can you please comment ?

    yea...i thought about it .
    but as both of them are same application and they are using the same DB connection pool , JMS queue ....i just dont want to mix all these.
    so i have created two seperate domian . and i run them individually and they work fine.
    However , they are having different ports though .
    But when i run the second one while the first one is running ....the second one does not starts up
    here is the error when i click on startsWeblogic.cmd when the other is already running.
    java version "1.4.2_08"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)
    BEA WebLogic JRockit(TM) 1.4.2_08 JVM R24.5.0-61 (build ari-49095-20050826-1856-win-ia32, Native Threads, GC strategy: pa
    Starting WLS with line:
    d:\bea\JROCKI~1\bin\java -jrockit -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.
    === Debugging ===
    This window is necessary for debugging code using WebLogic Workshop
    ERROR: Proxy already running...
    weblogic.debugging.comm.TransportException
    at weblogic.debugging.comm.ServerConnectInfo.createTransport()Lweblogic/debugging/comm/CommTransport;(ServerConne
    at weblogic.debugging.engine.ProxyThread.run()V(ProxyThread.java:77)
    at java.lang.Thread.run()V(Unknown Source)
    at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Source)
    Caused by: java.net.BindException: Address in use
    at jrockit.net.SocketNativeIO.bind(ILjava/net/InetAddress;I)I(Unknown Source)
    at jrockit.net.SocketNativeIO.bind(Ljava/io/FileDescriptor;Ljava/net/InetAddress;I)I(Unknown Source)
    at java.net.AbstractSocketImpl.bind(Ljava/net/InetAddress;I)V(Unknown Source)
    at java.net.PlainSocketImpl.bind(Ljava/net/InetAddress;I)V(Unknown Source)
    at java.net.ServerSocket.bind(Ljava/net/SocketAddress;I)V(ServerSocket.java:318)
    at java.net.ServerSocket.<init>(IILjava/net/InetAddress;)V(ServerSocket.java:185)
    at java.net.ServerSocket.<init>(I)V(ServerSocket.java:97)
    at weblogic.debugging.comm.ServerConnectInfo.createTransport()Lweblogic/debugging/comm/CommTransport;(ServerConne
    ... 3 more
    Could not bind to Weblogic server (Error attaching to Weblogic Server.).
    Message was edited by:
    Unknown_Citizen

  • 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

  • Weblogic Thread hogging at  java.io.WinNTFileSystem.getBooleanAttributes at high loads

    Hi,
    At high loads, we are seeing that one WebLogic thread is active on a windows native call for quite some time.. I can see the following stack statements in thread dumps taken at 10 minutes interval. This has led to slow server performance. 
    This happens on WebLogic 10.3.2 that is hosted in Windows Server 64 bit 2008 Enterprise Edition SP1.
    The JDK used is JRockit jdk1.6.0_20-R28.3.2 (64 Bit)
    Also this happens at high user loads only and also irregularly.
    Our eclipse link versions are (Implementation-Version: 1.0.1-20080905, Specification-Version: 1.0.1)
    Any recommendation or pointer is appreciated.
    Now the thread dump details
    "[ACTIVE] ExecuteThread: '13' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE
                java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
                java.io.File.isDirectory(File.java:754)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive$1.accept(DirectoryArchive.java:91)
                java.io.File.listFiles(File.java:1134)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:89)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.init(DirectoryArchive.java:95)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.<init>(DirectoryArchive.java:73)
                org.eclipse.persistence.internal.jpa.deployment.DirectoryArchive.<init>(DirectoryArchive.java:55)
                org.eclipse.persistence.internal.jpa.deployment.ArchiveFactoryImpl.createArchive(ArchiveFactoryImpl.java:76)
                org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.findPersistenceArchives(PersistenceUnitProcessor.java:184)
                org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initialize(JPAInitializer.java:132)
                org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:104)
                org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:64)
                javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78)
                javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
                -- Our internal class calls
                org.jbpm.graph.def.Action.execute(Action.java:123)
                org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:235)
                org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
                org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
                org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
                org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:120)
                org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:372)
                -- Our internal class calls
                sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                java.lang.reflect.Method.invoke(Method.java:597)
                org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
                org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                javax.faces.component.UICommand.broadcast(UICommand.java:106)
                org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
                org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
                org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:346)
                org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                -- Our internal class calls
                javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
                weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
                weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
                weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
                org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                com.anychart.servlet.ResourceFilter.doFilter(ResourceFilter.java:53)
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                -- Our internal class calls
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                -- Our internal class calls
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
                weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
                weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
                weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
                weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
                weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
                weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
                weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    Hi,
    Maybe this thread could help, if it addresses your problem correctly:
    Performance issues with class loader on Windows server
    Regards,
    Mohab

  • About SQLServer hanging weblogic threads during XA recover...

    Hi. There have been requests for MS documentation about it's bug in XA recover,
              that can cause weblogic to hang.
              Apparently the bug will not be mentioned until the doc for QFE30, which
              contains the patched MS DTC dlls, goes public. The MS contact said the doc
              will indicate the following:
              "During the xa_recover operation, a hang condition occurs on one or more SQL
              threads making the xa_recover call through the DTC Proxy."
              The support rep did not have an ETA on when this doc would be publicly
              available though. Sorry for the inconvenience.
              Joe
              

    Hi Joe,
    Thanks for the quick response.
    1. As I mentioned, we're using WebLogic 10.3.0.
    2. So what you're saying is that when not using an XA data source, an administration thread can only roll back the transaction while the target business-logic thread is not using the connection, because the connection's API is synchronized. When using an XA data souce, however, the administration thread can request a rollback from the DBMS itself - an operation that should always return relatively fast (when a connection is available in the pool). Is this correct?
    Thanks for the help,
    Amnon
    Edited by: Amnon G. on Jun 30, 2010 11:55 PM

  • Weblogic threads getting killed

    Hi,
    We are facing a problem where after few hours of usage all the threads
    in the 'default' queue are getting killed i.e the server hangs and if
    you take a thread dump, none of the threads in the default queue are
    visible ...
    Using WL 6.1 SP 3 on RH Linux.
    What could be the reasons why this would happen ?
    Any inputs would be appreiciated.
    Regards
    Vipul Kapadia

    Hi Gautier,
    We were able to solve the problem. It was to do with the JVM
    configuration.
    We were using Sun JDK 1.3.1_03.
    Set the parameter in the Java command line
    -XX:MaxPermSize=128m
    See if this works for you.
    Also go thru the Weblogic Server Performance and tuning guides which
    has some useful information.
    Regards
    Vipul Kapadia
    "Gautier Lobry" <[email protected]> wrote in message news:<3def348d$[email protected]>...
    We are facing the same Problem for ten days and could not find out what leads to
    that. For some reason, a number of the pool's threads are getting lost within
    a few minutes, after the server had been running for hours.
    If you've found something, it would be nice if you could help.
    Thanks
    Gautier
    "Cameron Purdy" <[email protected]> wrote:
    We are facing a problem where after few hours of usage all the threads
    in the 'default' queue are getting killed i.e the server hangs andif
    you take a thread dump, none of the threads in the default queue are
    visible ...
    Using WL 6.1 SP 3 on RH Linux.Check your WL logs.
    Typically this points to a serious JVM or config issue.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Vipul Kapadia" <[email protected]> wrote in message
    news:[email protected]..
    >

  • Weblogic: threads hang on getConnection()

     

    What about Weblogic 5.1?
    Q Vincent Yin | Repeat
    (416) 271-6432 | delete(next->bug);
    [email protected] | Until 0 = 1;
    Architecture and Component Services, BEA Systems, Inc.
    Joseph Weinstein <[email protected]> wrote in message
    news:[email protected]...
    Hi. We've worked around all references to synchronized DriverManager
    calls in the next service pack, but until then, rename your currentversion
    of weblogic\jdbcbase\jts\Driver.class with a .orig suffix, and put the
    attached version it it's place. Restart the server and let me know...
    Joe
    KB Sriram wrote:
    We are using
    WebLogic Build: 4.5.1 Service Pack 7 02/16/2000 15:17:50 #63218
    The deployment platform is:
    SunOS bucks 5.7 Generic_106541-10 sun4u sparc SUNW,Ultra-4
    The JDK version is:
    java version "1.2.1"
    Solaris VM (build Solaris_JDK_1.2.1_04, native threads, sunwjit)
    The JDBC driver is:
    oracle.jdbc.driver.OracleDriver, (and using the thin driver)
    Database is: Oracle 8i
    Ok. we run some tasks in an appserver, and every once in a while
    (generally
    after a db restart) the tasks stop
    running. Restarting the app-server usually makes everything all right,but
    it seems too heavy-handed
    to have to bounce the thing to make the tasks run again.
    I took a stack dump of the jvm, and here is a representative trace ofone of
    the threads spawned by
    the scheduler. [All the threads spawned by the scheduler are blocked onthe> > getConnection() method.
    "CImageManagerRequestHandler" (TID:0x7c250c, sys_thread_t:0x7c2450,
    state:MW, thread_t: t@996, threadID:0xf6c81dc8, stack_bottom:0xf6c82000,
    stack_size:0x20000) prio=5
    [1] java.sql.DriverManager.getConnection(DriverManager.java:104)
    [2]
    TOPLink.Public.Sessions.DefaultConnector.connect(DefaultConnector.java:56)
    [3] TOPLink.Public.PublicInterface.JDBCLogin.connect(JDBCLogin.java:158)
    [4]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.Ã?(DatabaseAccessor.java)
    [5]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.incrementCalls(DatabaseAcces
    sor.java)
    [6]
    TOPLink.Private.DatabaseAccess.DatabaseAccessor.executeCall(DatabaseAccessor
    .java)
    [7]
    TOPLink.Public.ThreeTier.ServerSession.executeCall(ServerSession.java:321)
    [8]
    TOPLink.Private.QueryFramework.CallQueryMechanism.executeCall(CallQueryMecha
    nism.java:125)
    [9]
    TOPLink.Private.QueryFramework.CallQueryMechanism.executeCall(CallQueryMecha
    nism.java:113)
    Looking at the source code for java.sql.DriverManager, the place wherethese
    threads are hung is
    this piece of code:
    public static synchronized Connection getConnection(String s,Properties
    p)
    throws SQLException
    => ClassLoader cl = getCallerClassLoader();
    return getConnection( s, p, cl );
    Now, getCallerCLassLoader() is a native method, so that's where my chase
    ended.
    Here is what we do to configure the connection pool:
    weblogic.jdbc.connectionPool.oraclePool=\
    url=jdbc:oracle:thin:@XXX:nnnn:XXX,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=1,\
    initialCapacity=4,\
    maxCapacity=1000,\
    capacityIncrement=2,\
    allowShrinking=true,\
    shrinkPeriodMins=15,\
    refreshMinutes=10,\
    testTable=dual,\
    props=user=XXX;password=XXX
    Toplink itself (which we use to provide the O/R mapping layer) uses
    [Database]
    url=jdbc:weblogic:jts:oraclePool
    driver=weblogic.jdbc.jts.Driver
    user=XXX
    password=XXX
    to gain access to the connection pool.
    Has anyone seen such behavior? Any ideas on why this happens?
    Thanks,
    -kb---
    PS: Folks: BEA WebLogic is in S.F., and now has some entry-level positionsfor
    people who want to work with Java and E-Commerce infrastructure products.Send
    resumes to [email protected]
    The Weblogic Application Server from BEA
    JavaWorld Editor's Choice Award: Best Web Application Server
    Java Developer's Journal Editor's Choice Award: Best Web ApplicationServer
    Crossroads A-List Award: Rapid Application Development Tools for Java
    Intelligent Enterprise RealWare: Best Application Using a ComponentArchitecture
    http://weblogic.beasys.com/press/awards/index.htm

  • Can multiple threads share the same cursor in berkeley db java edition?

    We use berkeley db to store our path computation results. We now have two threads which need to retrieve records from database. Specifically, the first thread accesses the database from the very beginning and read a certain number of records. Then, the second thread needs to access the database and read the rest records starting from the position where the cursor stops in the first thread. But, now, I cannot let these two threads share the same cursor. So, I have to open the database separately in two threads and use individual cursor for each thread. This means I have to in the second thread let the cursor skip the first certain number of records and then read the rest records. However, in this way, it is a waste of time letting the second thread skip a certain of records. It will be ideal for us that the second thread can start reading the record just from the place where the first thread stops. Actually, I have tried using transactional cursor and wanted to let the two threads share the same transactional cursor. But it seems that this didn't work.
    Can anyone give any suggestion? Thank you so much!
    sgao

    If your question is really about using the BDB Java Edition product please post to the JE forum:
    Berkeley DB Java Edition
    If your question is about using the Java API of the BDB (C-based) product, then this is the correct forum.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Multiple Threads at the same time

    I am new to threads but what I am attempting to do is start a new thread for each report frequency. Each thread will be on a timer to loop at that frequency. Say, for example, I had reports defined to run at 60, 90, and 1440 minute frequencies. I want to kick off a thread for each of those frequencies. While this code does work, it does not start the next thread until the first one is done. Can I get this loop to spawn threads without caring if the preceeding one is finished or not?
    Here is the code.
    public class Monitor {
    public Monitor() {
    super();
    public static void main(String[] args) throws Exception {
    try {
    ResourceBundle properties = ResourceBundle.getBundle("report");
    String db_driver = properties.getString("DB_DRIVER");
    String db_url = properties.getString("DB_URL");
    String db_user = properties.getString("DB_USERNAME");
    String db_pwd = properties.getString("DB_PASSWORD");
    long freq = 0;
    Class.forName(db_driver);
    String url = db_url;
    Connection con = DriverManager.getConnection(url, db_user, db_pwd);
    EventLog.log("Connection Succeeded");
    String qryString = "select distinct report_freq as report_freq from reportapp";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(qryString);
    ResultSetMetaData rsmd = rs.getMetaData();
    EventLog.log("Query Succeeded");
    boolean moreReports = rs.next();
    while (moreReports) {
    freq = rs.getLong("report_freq");
    new MonitorThread(freq).start();
    moreReports = rs.next();
    rs.close();
    con.close();
    } catch (Exception fatal) {
    EventLog.log("Monitor Exception: " + fatal.getMessage());
    return;
    }//end of main//
    //Thread Code//
    public class MonitorThread extends Thread {
    public MonitorThread(long sleepfor) {
         super();
         run(sleepfor);
    public void run(long sleepfor) {
    try {
    boolean isReportActive = true;
    while (isReportActive) {
    long n = sleepfor * 1000L * 60L;
    //Call class that runs the reports//
    Report.PerformSystemChecks(sleepfor);
    Thread.sleep(n);
    } catch (Exception fatal) {
    EventLog.log("Monitor Exception: " + fatal.getMessage());
    return;
    }

    Here how I would do it... I left few parts open, but you should get the idea.
    abstract class ScheduledThread extends Thread
      long freq, nexttime;
      public ScheduledThread(long freq)
        nextTime=System.currentTimeMillis()+freq;
        this.freq=freq;
      public long getNextTime()
        return nexttime;
      abstract void scheduledRun();
      public void run()
        nextTime+=freq;
        scheduledRun();
    class Scheduler extends Thread
      Vector sceduled=new Vector();
      public synchronized void addSchedule(...)
        scheduled.add(sched);
        notifyAll();
      public long getNextTime()
        // get the lowest time returned from all the sceduled threads
      public void run()
        while (true)
          long nextCall=getNextCall();
          synchronized (this)
            // using wait we can break out of the wait loop if new schedules are added with notify.
            long time=nextCall-System.currentTimeMillis();
            if (time>0)
             this.wait(time);
          // go through all the threads and run those that getNextTime()<System.currentTimeMillis()
    }

  • Multiple threads access the same method.

    Hello,
    I have been trying for a long time to find out multiple threads access the shared data.
    I have written a sample code, there I my intention is that method has to be accessed
    onlny one thread at a time., mean one thread finished the job, then next thread can
    access the shared source. But for this code I am not getting the desired out put what I want. But if I am using synchronized block I am getting the output. Please correct where I got mistake. Please see my code.
    public class TestThread implements Runnable {
         Shared r;
         public TestThread() {
              r = new Shared();
         public static void main(String args[]) {
              Thread t1 = new Thread(new TestThread());
              Thread t2 = new Thread(new TestThread());
              t1.setName("A");
              t2.setName("B");
              t1.start();
              t2.start();
          * (non-Javadoc)
          * @see java.lang.Runnable#run()
         @Override
         public void run() {
              // TODO Auto-generated method stub
              r.count();
    class Shared {
         public synchronized void count() {
              String name = Thread.currentThread().getName();
              System.out.println(name + ":accessed...");
              try {
                   for (int i = 0; i < 5; i++) {
                        System.out.println(name + ": " + i);
              } catch (Exception e) {
                   // TODO: handle exception
    }Thanks
    Bhanu lakshmi.

    It depends on what you synchronize. Non-static methods synchronize on the object, so if you're using several objects, you'll be able to call each from their own thread.
    Make your method synchronized or use only a single object and see the difference.

Maybe you are looking for