Creating our own Thread Pool

We have an application running on WLS6.1 with WLI2.1. We're using WLI2.1 to define
workflows; we interface to the workflow definitions with custom EJB/JSP code.
Without getting too detailed, we would like to spawn a thread when a user submits
some of our forms. From the point of submittal onwards, there is nothing in the
execution of the workflow that requires user intervention.
We initially tackled this problem with the use of internal JMS messages in the
workflow. However, the way our workflow is structured we would really like to
manually spawn threads instead of embedding JMS messages in the flow. (For instance,
we may want to obtain multiple workflow instances and execute them all at once
with the same action).
Is there any downside to us developing our own ThreadPool? Is there a pre-canned
Thread Pool service that is available as part of the WLS package?
I've already got a ThreadPool implementation working and it seems to be doing
the right thing. There's just some concern in our company that we should be using
a WLS service instead of rolling our own.
Details of our threadpool:
- it's a long-lived Singleton that is instantated at application startup.
- A predefined number of Worker threads are created, and they can be set with
a Runnable object to execute.
- I have synchronized LinkedList containers for idleThreads, busyThreads, and
tasksToRun (Runnables that have not yet been assigned to a thread).
Thanks!
Ron

Hi,
You have to configure these things.
Goto System Admin>System Configuration>Universal Worklist & Workflow-->WorkFlow, it shows subareas like
Engine
Mail
Scheduler
User Interface
Workflow Notification Settings
To follow this link
http://help.sap.com/saphelp_nw04/helpdata/en/57/5b781705184211a4ba344387a992e5/frameset.htm
Regards,
Senthil K.

Similar Messages

  • How to create our own fields in workarea in internal tables

    hai
    can u help me out in creating our own fields in workarea in an internal table (without header line..................)

    what kinda theory do u want???
    * Internal table with HEADER LINE
    DATA : BEGIN OF it_output occurs 0 with header line,
              c_icon  TYPE icon-id,
              bukrs   TYPE anla-bukrs,
              anln1   TYPE anla-anln1,
              anln2   TYPE anla-anln2,
              grufl   TYPE anla-grufl,
              grufl_n TYPE anla-grufl,
              leabg   TYPE sy-datum,
              leabg_n TYPE sy-datum,
              message TYPE bapiret2-message,
            END OF it_output.
    The above declaration is same as the below declaration in relation to the previous thread.
    * Data declarations for ty_output
    DATA : it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0, " Internal table declaration
           is_output TYPE ty_output." Work Area declaration
    Please reward for useful answers with appropriate points
    Regards
    Gopi
    "  Internal table without HEADER LINE
    DATA : BEGIN OF it_output occurs 0,
              c_icon  TYPE icon-id,
              bukrs   TYPE anla-bukrs,
              anln1   TYPE anla-anln1,
              anln2   TYPE anla-anln2,
              grufl   TYPE anla-grufl,
              grufl_n TYPE anla-grufl,
              leabg   TYPE sy-datum,
              leabg_n TYPE sy-datum,
              message TYPE bapiret2-message,
            END OF it_output.
    Message was edited by:
            Gopi Narendra

  • 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

  • How to use Synchronized method when creating our own controls

    I don't know how to use the synchronized method when creating our own activex like controls to speed up the application.

    [url http://java.sun.com/docs/books/tutorial/essential/threads/multithreaded.html] here you go 

  • Can we create our own loops? Basic question.

    Hi,
    Can we create our own loops in Logic Pro. I see in all the tutorials. They are either taking input from external instruments OR use existing apple loops.
    I have tried FL studio demo to create our own loops. But there is no trial version for Logic Pro. Need your inputs before I purchase it.
    Thank you.
    Anji

    Yes you can!
    It is as simple as selecting a Region (optional trimming recommended) and choose the Export command.
    A Dialog window opens up that lets you enter the metadata
    Apple had its separate "Apple Loop Utility" app (now only available in the developer package) that allowed you to create loops in a standalone app. The built-in loop capability in Logic uses part of that engine.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • My wife and I have shared one iTunes account for 6  years.  We want to create our own Apple IDs, so when we sync to our new iMac we won't see each others contacts, photos, calendar, music, etc.  Is there a way to move music/apps from one ID to a new ID?

    My wife and I have shared one iTunes account for 6  years.  We want to create our own Apple IDs, so when we sync to our new iMac we won't see each others contacts, photos, calendar, music, etc.  Is there a way to move music/apps from one ID to a new ID?

    JoeyV325 wrote:
    Is there a way to move music/apps from one ID to a new ID?
    No.
    One of you create a new AppleID and one use the existing AppleID.
    But you can still use the items in each iTunes library.
    Create separate computer logins for each of you.
    This will give you each your own data. Contacts, calendars, photos, etc. (and your own iTunes library).

  • We have three Apple devices. They are all have the same name and are on the same apple ID. We would like to back up our Notes to the cloud. If we each create our own Apple email address will they create two separate Notes flies on the cloud or merge?

    We have three Apple devices 2 IPhone 4's and one Ipad2. Only the Ipad2 is running the latest OS. They are all have the same name and are on the same apple ID. We would like to back up our Notes to the cloud. If we each create our own Apple email address (we don't have one yet) will they create two separate Notes flies on the Cloud or merge them?

    Welcome to the Apple Community.
    Separate Apple ID's will result in separate notes. However when you first start with separate ID's unless one of you erases the notes you have, you will both start off with the same set of notes, but from then onwards each set won't sync with each other.

  • How to create our own XML Schema (.xsd) in Weblogic WorkShop

    Hi,
    I am new to Weblogic Workshop.I want to create one xml schema with custom elements.
    when I am creating a file xml schema(.xsd).The file contains default namespace and no child elements in it.I don't know how to add elements to that file.
    please tell me how to add parent elements and child elements and also our own xml namingspace.

    Hi Sivaram,
    Unfortunately, the 8.1 IDE did not have special tooling for schema generation.
    You will need to create it by hand or using an external tool
    If you are using an external tool to create the file within the schema project, you might want to disable the schema project auto build, which will be triggered every time a file save takes place
    cheers
    Raj

  • How to remove the default theme from "Revolution theme" to create our own movies and put our own background..

    how to remove the default theme from 'Revolution theme" to create movies of our own and a background..
    how to create chapter maker for movies...

    Are you using iDVD? Or iMovie?
    If iDVD, post in -> https://discussions.apple.com/community/ilife/idvd.
    If iMovie, post in -> https://discussions.apple.com/community/ilife/imovie.
    Good luck,
    Clinton

  • How to create our own web application on apache tomcat

    I am using Tomcat's default location to place my servlets.
    "E:\Program Files\Apache Group\Tomcat 4.1\webapps\ROOT"
    But day by day my classes are increasing. Now i am feeling to have my own location to place my servlets.
    Ex. "E:\myservlets"
    How to create and activate our own web application on apache tomcat except from tomcat's directory structure? Please guide me in this regard.
    Thanks in advance.

    hi,
    you can place your own application in any where
    then you to open under tomcat/conf/server.xml file
    add
    <Context path="/examples" docBase="e:/examples" debug="0"
             reloadable="true" ......./>

  • How to create our own taglib

    hi,
    i want to create my own simple JSTL.....
    what i am doing is i hv created my own tld file say 'com-myTag.tld' in web-inf folder .
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>com</shortname>
    <uri>WEB-INF/com-myTag.tld</uri>
    <tag>
    <name>xhtml</name>
    <tagclass>com.myTag.Display</tagclass>
    <bodycontent>empty</bodycontent>
    </tag>
    </taglib>And java class file say 'Display' in com.mytag package........
    public class Display extends TagSupport
         public int doStartTag() throws JspException
              try
                   pageContext.getOut().print("This is my first Tag Lib");
              catch(Exception e)
                   System.out.println(" exception occur inside Display " + e.getMessage());
              return SKIP_BODY;
         public int doEndTag() throws JspException
              return EVAL_PAGE;
    }But when i use this tag lib in my JSP it even not complied........
    its giving compilation error ...............
    JSPTranslate runtime: error classDefNotFound .......
    can anybody help me
    thanxs

    Probably means you didn't add the jar containing TagSupport.class to you class path. This should be shipped with your application server / servlet container. In tomcat 5, the file is jsp-api.jar and can be found in common/lib
    Also you may prefer to extend SimpleTagSupport. It's a bit more friendly.

  • 3 people have been using the same Apple ID for years.  How do we separate the information and create our own Apple IDs?

    Brand new to the community.    I'm confused as to how all of this works, but since we're using the same Apple ID, we seem to be getting eachother's information synced to our phones including contacts, music, etc.  I'd like to separate our accounts, but how do we retain the appropriate information for each individual?

    On person can keep the current account and the other two can migrate their devices to new accounts.  To migrate a device to a new accoun, start by saving any photo stream photos that you want to keep to your camera roll (unless already there) by opening your my photo stream album, tapping Select, tapping the photos, tap the share icon (box with upward facing arrow), then tapping Save to Camera Roll.  If you are syncing notes with iCloud that you want to keep, you'll need to open each of your notes and email them to yourself so you can later copy and paste the text into new notes created in your new account.  Then go to Settings>iCloud, tap Delete Account (which only deletes it from this device, not from iCloud; the person keeping the current account will not be effected by this), provide the password to turn off Find My iDevice and choose Keep on My iDevice when prompted .  Then sign back in with a different Apple ID to create your new account and choose Merge to upload your data.  If the same person has other devices to migrate to this new account, on the other devices they can save the photo stream photos to the camera roll, delete the iCloud account, choose Delete from My iDevice (since the data is already in the new account), the sign into the new account.
    Once you are all on separate accounts, you can go to icloud.com and delete any data that you don't want in your accounts (such as other people's contacts).
    If you're getting each other's music it may be because you have automatic download turned on, which automatically downloads purchases made any other device signed into the same iTunes ID.  To prevent this, go to Settings>iTunes & App Store and turn Music off under Automatic Downloads.

  • How to Create our own Custom Design for UI Elements in WebDynpro Java

    Hi Experts,
    As of now i am using the Standard design for the  UI Elements in the WebDynpro Java Applications.
    For example:
    header1,header2,monospace etc are available in design for UI Elements.
    Now i want to give my custom design to the UI Elements.
    So how can i create this. and Is it possible to create in NWDS.
    Thank You.
    DS

    Hi DS
    Eclipse Theme Editor for NetWeaver 2004
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a026b4ce-de48-2a10-7285-fb457ee6c7ed
    Eclipse Theme Editor for NetWeaver 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/136dd890-0201-0010-1b9d-bd09a0d3b1d8
    Hope this will be use ful for u
    Regards
    sriram

  • Using AsyncEventHandlers as a RTJ buildin thread pool

    Hi David
    1. I would like to use AsyncEventHandler mechanism as a thread pool. Would there be a way in future version to access the AsyncEventHandler's RT Thread pool API ?
    2. I am using the BoundAsyncEventHandler for long duration task (since the BoundAsyncEventHandler is bound to a specific Thread) - Would there be a way in future version to bound a specific RT Thread to this handler ? - for example a RT Thread that was created by my own Thread pool ?
    Thanks

    Gabi wrote:
    1.We need our code to access the AEH's "thread pool" and check the pool's availability; increase/decrease the pool size dynamically; check pool size for enough free threads to run any given number of tasks and so on...There are no API's for this. How a VM supports AEH execution is an implementation detail, and while a "pool" is the logical form of implementation the details can vary significantly so there's no real way to define an API to control it without defining what form it must take. For example in Java RTS the pool threads are initially at the highest system priority and then drop down to the priority of the AEH they execute. In a different design you might have a pool of threads per priority level (or set of priority levels) so even the notion of increasing/decreasing the pool size is not necessarily straight-forward. In Java RTS the pool will grow as needed to service outstanding AEH activations. You can control the initial number of threads - and there are two pools: one of heap-using and one for non-heap AEH.
    2. I was thinking about adding the BAEH class with the next method:
    void setBoundThread(RTThread t) throws IllegalArgumentExceptionand also in the Ctor add the RTThread as a parameter.
    Inside this method, the thread should be check if started and is so should throw an IllegalArgumentException.Sure, but why do you need to do this? What is different about the RTT that you pass in? The thread executing an AEH acquires the characteristics of the AEH.
    An API like this raises some questions such as: when would the thread be started? It also has a problem in that the run() method of the thread has to know how to execute an AEH, which means we'd (the RTSJ expert group) probably have to define a class BoundAEHThread that has a final run() method and you'd then subclass it.
    3. Additional question, what do you think about using lock (CountdownLatch) during the AEH's executions ?
    I've seen somewhere that AEH should only be used for short live tasks - is it true ? (in the JavaDoc it says there is no problem doing so but I want to be sure)If an AEH blocks for any length of time and additional AEH are activated then the pool management overhead may increase (unless you already sized it appropriately). But otherwise there's no restriction on what the code in an AEH can do. But note that none of the java.util.concurrent synchronization tools support priority-inversion avoidance, so you need to be careful if using them (ie only use them across threads of the same priority and don't expect FIFO access).
    David Holmes

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

Maybe you are looking for

  • Error Message using Tools, Reports

    Whenever I try to print a report for anything in this area, index, glossary, images etc I always get an error message "Adobe Robohelp 8 has encountered a problem and needs to close etc" and program closes. Anyone know how I can fix this.

  • RFC to read the attachment from PR05 and pass the doc to the PHP front end

    Hi Team, Our requirement : We are designing a new front end using PHP portal and pull the data from SAP-backend for travel expense/request. We are able to upload the document to PR05 using frontend portal. If employee/manger wants to read the attachm

  • Streaming audio / .pls files?

    I am trying to listen to KCDX's streaming audio feed. It takes me to a link to a .pls file. When I click the link it says "Safari cannot download the file." Any advice? Here's the link: www.kcdx.com/m/ thanks....

  • SharePoint 2013 Provider-Hosted App Installs, throws File Exists error.

    I have a SP2013 Provider-hosted app with DevExpress controls that was working fine until just recently. I am getting the following error when I try to F5 DEBUG: "Error occurred in deployment step 'Install app for SharePoint': The file exists." The ap

  • Segmental Reporting

    Can we make the Segmental Reporting according to AS 17 in SAP by any standard report?