The different thread pools in 6.1

Boy am I just flooded with just 6.1 migration issues. Life was much
simpler with weblogic.properties file.
Looking at Config.Dtd I couldnt see the different thread pools that WLS
5.1 offered.
How do I do set up thread pools for
a) Servlets
b) RMI
c) JMS
In 5.1 you had a servletthreadpool, an executethreadcount(for RMI) and a
jms thread pool.

In 6.1
There isn't any seperate execute ThreadPool for servlets.
The only thread pool that you can tune is the default
queue which can be done via console. Ofcourse you can
configure user defined thread queues.
Also there are some internal thread pools that are not
exposed to the developers. for e.g. admin queue, replication
queue , console queue , rmi queue , jms queue etc....
If you still want to route your servlet requests via a
seperate thread queue, you have to specify
the dispatch policy & the queue name.
see below
http://e-docs.bea.com/wls/docs61/perform/AppTuning.html#1105201
Kumar
Aswin Dinakar wrote:
Boy am I just flooded with just 6.1 migration issues. Life was much
simpler with weblogic.properties file.
Looking at Config.Dtd I couldnt see the different thread pools that WLS
5.1 offered.
How do I do set up thread pools for
a) Servlets
b) RMI
c) JMS
In 5.1 you had a servletthreadpool, an executethreadcount(for RMI) and a
jms thread pool.

Similar Messages

  • How can I use the same thread pool implementation for different tasks?

    Dear java programmers,
    I have written a class which submits Callable tasks to a thread pool while illustrating the progress of the overall procedure in a JFrame with a progress bar and text area. I want to use this class for several applications in which the process and consequently the Callable object varies. I simplified my code and looks like this:
            threadPoolSize = 4;
            String[] chainArray = predock.PrepareDockEnvironment();
            int chainArrayLength = chainArray.length;
            String score = "null";
            ExecutorService executor = Executors.newFixedThreadPool(threadPoolSize);
            CompletionService<String> referee = new ExecutorCompletionService<String>(executor);
            for (int i = 0; i < threadPoolSize - 1; i++) {
                System.out.println("Submiting new thread for chain " + chainArray);
    referee.submit(new Parser(chainArray[i]));
    for (int chainIndex = threadPoolSize; chainIndex < chainArrayLength; chainIndex++) {
    try {
    System.out.println("Submiting new thread for chain " + chainArray[chainIndex]);
    referee.submit(new Parser(chainArray[i]));
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    executor.shutdown();
    int index = chainArrayLength - threadPoolSize;
    score = "null";
    while (!executor.isTerminated()) {
    score = referee.poll(10, TimeUnit.MINUTES).get();
    System.out.println("The next score is " + score);
    index++;
    My question is how can I replace Parser object with something changeable, so that I can set it accordingly whenever I call this method to conduct a different task?
    thanks,
    Tom                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    OK lets's start from the beginning with more details. I have that class called ProgressGUI which opens a small window with 2 buttons ("start" and "stop"), a progress bar and a text area. It also implements a thread pool to conducts the analysis of multiple files.
    My main GUI, which is much bigger that the latter, is in a class named GUI. There are 3 types of operations which implement the thread pool, each one encapsulated in a different class (SMAP, Dock, EP). The user can set the necessary parameters and when clicking on a button, opens the ProgressGUI window which depicts the progress of the respective operation at each time step.
    The code I posted is taken from ProgressGui.class and at the moment, in order to conduct one of the supported operations, I replace "new Parser(chainArray)" with either "new SMAP(chainArray[i])", "new Dock(chainArray[i])", "new EP(chainArray[i])". It would be redundant to have exactly the same thread pool implementation (shown in my first post) written 3 different times, when the only thing that needs to be changed is "new Parser(chainArray[i])".
    What I though at first was defining an abstract method named MainOperation and replace "new Parser(chainArray[i])" with:
    new Callable() {
      public void call() {
        MainOperation();
    });For instance when one wants to use SMAP.class, he would initialize MainOperation as:
    public abstract String MainOperation(){
        return new SMAP(chainArray));
    That's the most reasonable explanation I can give, but apparently an abstract method cannot be called anywhere else in the abstract class (ProgressGUI.class in my case).
    Firstly it should be Callable not Runnable.Can you explain why? You are just running a method and ignoring any result or exception. However, it makes little difference.ExecutorCompletionService takes Future objects as input, that's why it should be Callable and not Runnable. The returned value is a score (String).
    Secondly how can I change that runMyNewMethod() on demand, can I do it by defining it as abstract?How do you want to determine which method to run?The user will click on the appropriate button and the GUI will initialize (perhaps implicitly) the body of the abstract method MainOperation accordingly. Don't worry about that, this is not the point.
    Edited by: tevang2 on Dec 28, 2008 7:18 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Increasing size of the Server Thread Pool

    Whilst running a clustered JMS application with 3 servers, I get the
    following error from the client:
    <JavaSocketMuxer> <There are: '3' active sockets, but the maximum number of
    socket readers allowed by the configuration is: '2', you may want to alter
    your configuration.>
    The error occurs with both Native IO and Java IO.
    There are two parameters that appear to affect the number of socket readers,
    a parameter called:
    "ThreadPoolPercentSocketReaders"
    and
    "ThreadPoolSize"
    The first parameter is well documented, and is in the DTD for "config.xml".
    The second parameter is not. The only reference in the documentation I have
    found so far is in the FAQs document, where "ThreadPoolSize" is a parameter
    of the <Server> element (as you'd expect). However, when I tried to set this
    manually in "config.xml", the parameter was removed after a server restart.
    Anyone know about the error and/or the server "ThreadPoolSize" parameter?
    Thanks
    Alan

    This is a client-side configuration issue - you can configure it
    (I'm not sure about exact syntax) like this (when starting the client):
    java -Dweblogic.ThreadPoolSize=10 -Dweblogic.ThreadPoolPercentSocketReaders=60 ... your.client ...
    Alan Magrath <[email protected]> wrote:
    Whilst running a clustered JMS application with 3 servers, I get the
    following error from the client:
    <JavaSocketMuxer> <There are: '3' active sockets, but the maximum number of
    socket readers allowed by the configuration is: '2', you may want to alter
    your configuration.>
    The error occurs with both Native IO and Java IO.
    There are two parameters that appear to affect the number of socket readers,
    a parameter called:
    "ThreadPoolPercentSocketReaders"
    and
    "ThreadPoolSize"
    The first parameter is well documented, and is in the DTD for "config.xml".
    The second parameter is not. The only reference in the documentation I have
    found so far is in the FAQs document, where "ThreadPoolSize" is a parameter
    of the <Server> element (as you'd expect). However, when I tried to set this
    manually in "config.xml", the parameter was removed after a server restart.
    Anyone know about the error and/or the server "ThreadPoolSize" parameter?
    Thanks
    Alan--
    Dimitri

  • Multiple thread pools under single executor

    I would like to segregate the tasks running in an Executor so that certain tasks (perhaps identified by an annotation) could be restricted to a thread pool of a limited size while others run in a different pool.
    The intend is to limit certain crunchy tasks so that they don't saturate a limited resource.
    As far as I can tell I can't do this with a ThreadPoolExecutor even with a custom ThreadFactory. The original Callable is wrapped a couple of times by the time the ThreadFactory.newThread method is called so I can't inspect it at that time. Also, once the maximumPoolSize is reached the waiting tasks will get handed off to whichever thread finishes first, thus making my fixed pools useless.
    I have a feeling that I will need to write my own ThreadPoolExecutor but I thought that I would ask if there was a way to do this with the existing classes first.
    Thanks.

    I used to do this.
    The problem comes in managing the work that flows between the queues, and managing the results. I need to be able to take the output from one task and feed it into another, potentially running in a different thread pool.
    Multiple queues mean waiting for more than one blocking event, which means multiple management threads with a meta-event queue feeding back to an dispatcher that does the messaging.
    With multiple management threads you have to poison all of those queues so that the thing shuts down when you are done.
    By the time that I'm done I may be better off just modifyingThreadPoolExecutor to do what I want. One work queue keeps the shutdown problem under control.
    Thanks for the feedback.

  • Different execute queues with different thread priorities

    We are running WebLogic 6.1, SP2 on Solaris 2.8 and I have a question related to the
    use of Execute queues
    I'm aware that the administration console servlets, and the rest of requests given
    to the server run in separate execution queues each with their own pool of threads.
    There is an <executequeue> element in the config.xml that allows you to change the
    parameters of the default execute queue that most requests are handled in.
    My question is is it possible to create new execute queues, each with a given number
    of threads running at a different priority. Then one could assign a particular WAR
    deployment to a queue and hence control the priority that certain requests run at
    governed by the deployment that received the initial request.
    Essentially the problem that I'm trying to address is that I have a JAR with MDBs
    in it. I also have JARs with Entity and Session EJBs and WARs. They are all using
    the same pool of threads to execute. I want to be able to throttle the MDBs as they
    receive messages so they don't take over the machine and interfere with interactive
    use. Now I can limit the number of MDBs in the MDB pool, but then if the machine
    is not being used by users, then the machine resources are wasted only allowing one
    MDB to be active at a time when there are a lot of messages in the queue.
    What I want to be able to do is to have as many MDBs run as I can, up to a certain
    limit, say 15 for example, but not to pull from the same thread pool/execute queue
    as the requests for URLs in the WAR. Also I want the MDB threads to run at a much
    lower priority and always give preference to interactive requests.
    So interactive threads will always win and grab the processors if interactive use
    is high, but if it's not, the MDBs can run instead.
    Regs,
    Paul

    Hi,
    I had a chat with BEA support about my issue. You can create multiple ExecuteQueues
    and assign them to servlet definitions in WARs in the web.xml, and with an option
    to the EJBC compiler, you can assign a particular class of EJB to an ExecuteQeueue.
    For details see http://e-docs.bea.com/wls/docs61/perform/AppTuning.html#1106284
    Presumably it's the thread of the initial request that counts, i.e. if a WAR calls
    an EJB, then it's the thread in the execute queue of the WAR that will be used right
    the way through the request, not that of the EJB being called, assuming they are
    both deployed in the same WebLogic instance. If they were in different instances,
    you would obviously have a thread from the WAR queue on one instance, and a thread
    from the EJB queue on another instance.
    If a plain Java command-line client connected directly to an EJB, then it would be
    the thread from the ExecuteQueue of the EJB that would get used.
    I've been told that MDBs always run in the default queue, so it seems that the way
    for me to do what I want is just to create an ExecuteQueue, set the priority of the
    threads in this queue to be higher than that of the default queue, and assign this
    queue to my WARs. I can leave my EJBs running in the default queue.
    Regs,
    Paul
    "Dimitri I. Rakitine" <[email protected]> wrote:
    Don't know about 6.1 (One can find out very easily what the possible config
    parameters
    are by deploting
    http://dima.dhs.org/misc/listMBeans.jsp and
    http://dima.dhs.org/misc/showMBean.jsp
    abd looking at the XXXConfig mbeans), but in 7.0 there are quite a few
    things which
    can be tuned in the executequeue config (and priority is one of them. also
    interesting
    is that it is possible to configure it to increase number of execute threads
    when queue
    length exceeds some specified threshold) :
    QueueLength
    Returns the maximum length of this queue.
    ThreadPriority
    Returns the priority of the threads associated with this queue.
    ThreadCount
    Returns the number of threads assigned to this queue.
    QueueLengthThresholdPercent
    Returns the threshold percent for length of this queue, set in QueueLength.
    ThreadsIncrease
    Returns the number of threads to grow when a queue is within QueueLengthThresholdPercent
    of the set QueueLength.
    ThreadsMaximum
    Returns the maximum number of threads in the pool.
    ThreadsMinimum
    Returns the minimum number of threads in the pool.
    Dimitri

  • A good design for a single thread pool manager using java.util.concurrent

    Hi,
    I am developing a client side project which in distinct subparts will execute some tasks in parallel.
    So, just to be logorroic, something like that:
    program\
                \--flow A\
                           \task A1
                           \task A2
                \--flow B\
                            \task B1
                            \task B2
                            \...I would like both flow A and flow B (and all their launched sub tasks) to be executed by the same thread pool, because I want to set a fixed amount of threads that my program can globally run.
    My idea would be something like:
    public class ThreadPoolManager {
        private static ExecutorService executor;
        private static final Object classLock = ThreadPoolManager.class;
         * Returns the single instance of the ExecutorService by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getExecutorService() {
            synchronized (classLock) {
                if (executor != null) {
                    return executor;
                } else {
                    // TODO: put the dimension of the FixedThreadPool in a property
                    executor = Executors.newFixedThreadPool(50);
                return executor;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
    }The tasks I have to execute will be of type Callable, since I expect some results, so you see an ExecutorService interface above.
    The flaws with this design is that I don't prevent the use (for example) of executor.shutdownNow(), which would cause problems.
    The alternative solution I have in mind would be something like having ThreadPoolManager to be a Singleton which implements ExecutorService, implementing all the methods with Delegation to an ExecutorService object created when the ThreadPoolManager object is instantiated for the first time and returned to client:
    public class ThreadPoolManager implements ExecutorService {
        private static ThreadPoolManager pool;
        private static final Object classLock = ThreadPoolManager.class;
        private ExecutorService executor;
         * Returns the single instance of the ThreadPoolManager by means of
         * lazy-initialization
         * @return the single instance of ThreadPoolManager
        public static ExecutorService getThreadPoolManager() {
            synchronized (classLock) {
                if (pool !=null) {
                    return pool;
                } else {
                    // create the real thread pool
                    // TODO: put the dimension of the FixedThreadPool in a property
                    // file
                    pool = new ThreadPoolManager();
                    pool.executor = Executors.newFixedThreadPool(50);
                    // executor = Executors.newCachedThreadPool();
                    return pool;
         * Private constructor: deny creating a new object
        private ThreadPoolManager() {
        /* ======================================== */
        /* implement ExecutorService interface methods via delegation to executor
         * (forbidden method calls, like shutdownNow() , will be "ignored")
          // .....I hope to have expressed all the things, and hope to receive an answer that clarifies my doubts or gives me an hint for an alternative solution or an already made solution.
    ciao
    Alessio

    Two things. Firstly, it's better to use     private static final Object classLock = new Object();because that saves you worrying about whether any other code synchronises on it. Secondly, if you do decide to go for the delegation route then java.lang.reflect.Proxy may be a good way forward.

  • Cold Fusion in a generic thread pool and enabling JAVA don't mix

    I've got Cold Fusion MX installed on a server running Sun One 6.1. I ran into a problem trying to enable JAVA (for servlet support) which I had previous disabled because I didn't use it.
    Well, when I went to enable JAVA on the server last week, the service wouldn't restart and the error logs gave me no indication of the problem.
    Through a tedious trial-and-error process I've found that having Cold Fusion running under a generic thread pool while trying to have JAVA (the j2ee plugin) running under Sun One simply doesn't work (for whatever reason).
    Once I killed the pool, everything runs fine.
    Does anyone happen to know why this is? I keep CFMX under its own thread pool because there are certain elements to CFMX that aren't wholly stable and can result in CFMX crashing. If it crashes, the process keeps accepting requests, but never processes them. I'd like to keep the native thread pool free to keep accepting non-CFMX requests even when CFMX crashes.
    Thus the separate thread pool for CFMX.
    But now I can't run CFMX in a separate thread pool with JAVA enabled.
    Anyone have any insights into why this is?
    Thanks

    Two things. Firstly, it's better to use     private static final Object classLock = new Object();because that saves you worrying about whether any other code synchronises on it. Secondly, if you do decide to go for the delegation route then java.lang.reflect.Proxy may be a good way forward.

  • Log of execute thread pool status

    hi guys
    We are performing some performance analysis on a application and would
    like to log the status of the execute thread pool periodically to a
    log file.
    The performance tests run for a extended period of time and hence
    console is not proving to be effective in monitoring the behaviour
    over a long period of time.
    What other alternatives exist if I want to do this.
    Thanks for your time
    anand

    thanks guys,
    I found an answer in one of rob wollens old post.
    http://dev2dev.bea.com/resourcelibrary/utilitiestools/index.jsp
    Sorry for posting without doing a little research
    ~anand

  • Thread pool configuration for write-behind cache store operation?

    Hi,
    Does Coherence have a thread pool configuration for the Coherence CacheStore operation?
    Or the CacheStore implementation needs to do that?
    We're using write-behind and want to use multiple threads to speed up the store operation (storeAll()...)
    Thanks in advance for your help.

    user621063 wrote:
    Hi,
    Does Coherence have a thread pool configuration for the Coherence CacheStore operation?
    Or the CacheStore implementation needs to do that?
    We're using write-behind and want to use multiple threads to speed up the store operation (storeAll()...)
    Thanks in advance for your help.Hi,
    read/write-through operations are carried out on the worker thread (so if you configured a thread-pool for the service the same thread-pool will be used for the cache-store operation).
    for write-behind/read-ahead operations, there is a single dedicated thread per cache above whatever thread-pool is configured, except for remove operations which are synchronous and still carried out on the worker thread (see above).
    All above is of course per storage node.
    Best regards,
    Robert

  • Thread Pool Size

    What can be the maximum thread pool size used in java.
    What happens if i put up a thread pool size in range of 10k or 20k.
    how does affect system performance ???
    Its quite urgent for me to know. Can someone help out ???
    Regards
    Hrushi

    I'd say it depends on the machine you are running on, amount of memory and number of CPUs and such, not on Java itself. And with that many threads your implementation better be darn good in order not to be the bottleneck...

  • Thread pool tuning on J2ee NW04s...

    Hi,
    I have troubles in defining the number of threads in the pool of the server and dispatcher.
    First of all, I know that there are several thread pools depending on the node you are:
      - Server node: System and Application thread pool.
      - Dispatcher: System thread pool.
    I know that application pool is dedicated to client requests that come in and system is for the services, libs and core of the nodes.
    I'd like to know if I set to a server node a certain number of threads for the System and Application pool, what would be the value of the System thread pool of the dispatcher?
    As almost everything is going through the dispatcher before to reach the server node, what would be the number of System threads of the dispatcher if there are two or three server nodes? Should I multiply the number current threads of the dispatcher by the number of server nodes?
    If there are a lot of P4 calls (each call needs System 2 threads, one for the request and one for the response) should I deduce the number of thread of the dispatcher using this formula if there is one server node in the worse case:
    Dispatcher System Threads = Server App Threads + (Server System Threads x 2)
    Thanks in advance,
    Serge.

    Hi Serge,
    One way that you can size the number of threads is by using the monitoring stats in the VA.  VA -> cluster -> dispatcher/server -> services -> monitoring -> Runtime (tab) -> Monitor Tree (tab)
    then Root -> Kernel
    Check the Application Threads Pool and System Threads Pool. 
    As long as you DON'T experience CPU bottlenecking, then you can increase the number of threads, if:
    1) The ActiveThreadsCount is always at the MaximumThreadPoolSize
    2) You are noticing the WaitingTasksCount is always high.
    If you are experiencing CPU bottlenecking then increasing the number of threads is useless.
    Regards
    Anthony

  • JMS Thread Pool Size

    Hi,
              I'm using WLS 6.1. The console has a setting for: JMS Thread Pool Size. I wanted to tune the number of threads used by JMS. I thought JMS asynch consumers would use threads in this pool however that doesn't seem to be the case (they all use the default execute threads and queues). Why is this setting available?
              Note the BEA WebLogic JMS Performance Guide talks about tuning this value from version 6.1 up to 8.1 and states "On the server, incoming JMS related requests execute in the JMS execute queue/thread pool."
              Thanks in advance for any responses,
              Mich

    Disregarding what it is for, in my experience, tuning this setting rarely has much effect. For 6.1, the main thread pool related tunables to look at are the EJB thread pools and EJB max-beans... settings, the "default" thread pool, and the internal thread-pool for stand-alone clients -- all of which are mentioned in the performance guide.

  • Servlet thread pool

    Is there any way I can create my own init() for the threads in the servlet thread pool (by overriding some method or through other means)? (Not to be confused with the servlet's init().)

    web server itself is a thread pool implementation, unlesss your thread has other purpose, if not it is suited and enough for you do not implement another thread for it. If you want some init method, you can call from other class before start of your thread pooling.
    Hopefully can help you...

  • Can I give a certain JSP its own thread pool?

    Hey all,
              The application I'm working on needs to give a certain JSP its own thread pool so that it does not effect the performance of the other pools. I can create the new thread pool and am trying to set the value in web.xml. Here's my entry:
              <servlet>
              <servlet-name>??????</servlet-name>
              <jsp-file>/search/*.jsp</jsp-file>
              <init-param>
                   <param-name>wl-dispatch-policy</param-name>
              <param-value>search</param-value>
              </init-param>
              </servlet>
              Since this is just a JSP can you tell me what I should set the <servlet-name> to?
              Thanks for the help.

    you could also try it here:
    http://web.mac.com/madmax019/0/mx/Favicons%20%26%20URL%20Icons.html
    max

  • Setting Thread pool size

              Hi,
              I want to know if I set a system property "-Dweblogic.ThreadPoolSize", how will the
              WLS get to know that the pool size has been changed, at run time?
              E.g. I pass -Dweblogic.ThreadPoolSize=30 from the command-line. Then if I change
              the pool size to 40 at runtime, is there any event that I can fire for the change
              in property through APIs?
              Thnx in advance.
              Best Regards
              Ali
              

    Disregarding what it is for, in my experience, tuning this setting rarely has much effect. For 6.1, the main thread pool related tunables to look at are the EJB thread pools and EJB max-beans... settings, the "default" thread pool, and the internal thread-pool for stand-alone clients -- all of which are mentioned in the performance guide.

Maybe you are looking for

  • Viewing the users inbox for pending workitems..

    Hi all, I have a situation where in the management has asked me to look into a person's business workplace and report the number of pending workitems.Any suggestions... Regards, Sukumar.

  • Ship to party  name (despcription) change in Sales order

    The requirement is as follow: After entering the Sold to party in a sales order, user enters the Ship to party code and would like change the name (description) of the ship to party as he likes in sales order. But without maintaining / modifying chan

  • Multiple movies from large raw footage

    Newbie to Premiere Pro. I have about 4 hours of Super 8 movies scanned to ProRes format. There are 3 large .MOV files totaling about 500 GB. I successfully imported them into a new project. But what I want to do is create multiple edited movies of mu

  • Mail Merge Output Order

    When doing a mail merge in Pages from Address Book, there seems to be no order to the way the mail merge is outputted. I would really like my lists to be outputted in order of last name alphabetically. Is there a way to do this I'm not aware of?

  • PID band for power savings

    I'm running  a modified version of the some labview single input PID control to control the position of a linear actuator.  My processing variable is a voltage reading from an LVDT, which has a small ripple voltage associated with it.  My output vari