Concurrency & multiple processes in oc4j Insatnce

Hello,
We have 2 processes configured in one oc4j instace as per following opmn.xml entry
<oc4j instanceName="oc4jInstance1" numProcs="2">
We have a Log class that will write to log file in C: drive. We have addressed concurrent file write from within a PROCESS by making methods in Log class synchornized. But two users working on two processes could end up accessing the file concurrently. To avoid this we intend to make two log files, one for each process (like there are two opmn log files for the two diff process). We wish to append _1 or _2 to the file name depending on process.
Question is how do we find out in the application which process (1 or 2) it is running under??
Please help. Thanks in advance.
regards,

That's a pretty good question.
I don't know as that there is any form of API we have allow an app to identify which process-set id its running within.
What you might be able to do is to trigger this based on a System property.
Try dumping out the System properties from within the OC4J procs -- use a simple JSP to do it.
I don't have a 10.1.2 install handy, but from my running 10.1.3 instance, it looks like there may be a property which you could use:
oracle.ons.indexid = home.default_group.1
This seems to contain all the relevant detail you want -- the instance name, the group name, and what suspicously looks like a instance id.
Again, I don't know if its present in 10.1.2, but its worth looking into.
Be forewarned though, properties aren't official APIs, so they may be subject to change without notice from release to release.
But if you're in a bind then it might be your way home.
cheers
-steve-

Similar Messages

  • Concurrent Manager Processes Load Balancing....

    Hi,
    Could a concurrent managers process be spread across multiple application nodes in a PCP and RAC environment...?

    Hi;
    Please check below thread&notes and see its helpful for your issue:
    Advanced Configurations and Topologies for Enterprise Deployments of E-Business Suite 11i [ID 217368.1] ( part: Option 2.5. Concurrent Layer Load Balancing )
    Also see:
    Re: Configuring Parallel Concurrent Processing with ssh
    Load Balancing for EBS R12
    Steps to setup load balancing
    Re: Load Balancing for EBS R12
    Regard
    Helios

  • BOM Explosion for Multiple Process Orders

    Hi,
    I hope someone can assist me with the following: Is there a report I can run or transaction I can do to have BOM explosion for multiple Process Orders? I would like to input process orders for a week and see the BOM details per PO.
    Thanks

    Dear Sukendar,
    1.For this requirement you have to go for a Z report and you can give the Functional Spec's to prepare
    this report to your ABAP consultant.Prepare the input format,logic of the program and the output format.
    In the logic part you can make use of this Functional Modules's CSAP_MAT_BOM_READ or 
    CSEP_MAT_BOM_READ  or CS_BOM_EXPLOSION   or CS_BOM_EXPL_MAT_V2 .
    2.Using CEWB helps you to identify all the material that's having the BOM,but here the report does not
    shows you the level by level by BOM for a FERT.
    Check and revert back.
    Regards
    Mangalraj.S

  • Target Vs Acual Cost Comparison for multiple process orders

    Dear SAPians,
    I want to take a report for target vs actual cost for all process orders and product cost collectors created in a particular period. I have checked the standard report KKBC_ORD that serve my purpose but for a single order. I want the same report for multiple process orders and product cost collectors.
    Is there any standard report or should I create a report painter report. I have tried to create a report painter report based on library 7KO, but target cost was not showing for selected order.
    Kindly suggest.
    Shirazi

    Target Costs are available in library 601 for internal orders (and can be used for process/production orders).
    Regards,
    Adrian

  • How to delete multiple process at a time in a Process chain

    Hi,
    Is there any option to delete multiple processes at once in a Process chain in BI 7.0 ?

    Hi Swetha,
    If u want to stop a perticular proces go to sm37 give user ID (If process chain is schduled then give user ID as ALEREMOTE and if u have triggered it manually then give ur ID) select time and other options like type of process means whether it is active, canceled, ready etc. U will get ur running job.
    In sm37 at top of the screen u will get options to cancel or stop active job. But before deleting the active job just
    check the job log and also check the business impact.
    Also u can not use one process variant in multiple
    Regards,
    NR

  • Multiple processes accessing a replicated database

    Hi
    I am after some help with multiple processes and replicated databases.
    I have a primary and secondary database replicated across a pair of servers and this seems to be working well. I'm trying to run another process on one of the machines that opens the environment and databases to view and/or modify the data.
    The problem is that when I run this process it causes some sort of corruption such that the server process on the same box gets a DB_EVENT_PANIC the next time it accesses the database. I would like to understand what I am doing wrong.
    The servers and standalone process all use the same code to open and close the environment and databases (see below). Just calling
         open_env();
         open_databases();
         close_databases();
         close_env();
    in the utility process causes DB_EVENT_PANIC in the server process.
    Can anybody spot what I am doing wrong? I am using DB Version 4.7
    Thanks
    Ashley
    open_env() {
    db_env_create(&dbenv, 0);
    dbenv->app_private = &my_app_data;
    dbenv->set_event_notify(dbenv, event_callback);
    dbenv->rep_set_limit(dbenv, 0, REPLIMIT);
    dbenv->set_flags(dbenv, DB_AUTO_COMMIT | DB_TXN_NOSYNC, 1);
    dbenv->set_lk_detect(dbenv, DB_LOCK_DEFAULT)
    int flags = DB_CREATE | DB_INIT_LOCK |
              DB_INIT_LOG | DB_INIT_MPOOL |
              DB_INIT_TXN | DB_RECOVER | DB_THREAD;
    flags |= DB_INIT_REP;
    dbenv->repmgr_set_local_site(dbenv, listen_host, port, 0);
    dbenv->rep_set_priority(dbenv, 100);
    dbenv->repmgr_set_ack_policy(dbenv, DB_REPMGR_ACKS_ONE);
    for (x = 0; x < num_peers; x++) {
    dbenv->repmgr_add_remote_site(dbenv, peers[x].name, peers[x].port, &peers[x].eid, 0);
    dbenv->rep_set_nsites(dbenv, num_peers + 1);
    dbenv->open(dbenv, ".", flags, S_IRUSR | S_IWUSR);
    dbenv->repmgr_start(dbenv, 3, DB_REP_ELECTION);
    sleep(SLEEPTIME);
    close_env() {
    dbenv_p->txn_checkpoint(dbenv_p, 0, 0, 0);
    dbenv_p->close(dbenv_p, 0);
    open_databases() {
    db_create(&dbp, dbenv_p, 0)
    flags = 0;
    if (app_data->is_master)
    flags |= DB_CREATE;
    dbp->open(dbp, NULL, "primary", NULL, DB_HASH, flags, 0);
    ... Wait for db if slave and ENOENT ...
    primary = dbp;
    dbp->open(dbp, NULL, "secondary", NULL, DB_BTREE, flags, 0);
    ... Wait for db if slave and ENOENT
    secondary = dbp;
    while (app_data->client_sync) {
    sleep(SLEEPTIME);
    close_databases() {
         secondary->close(secondary, 0);
         primary->close(primary, 0);
         dbenv_p->txn_checkpoint(dbenv_p, 0, 0, 0);
    }

    Running recovery (DB_RECOVER flag to env->open()) must be done only in the first process to open the environment.
    This is a general rule of Berkeley DB, not specific to replication. You can read more about it in the Reference Guide, on the page entitled "Architecting Transactional Data Store applications".

  • Create a CR for multiple processing with me as the current processor

    Hi
    How to create a change request for multiple processing with myself as the current processor.
    I have created a change request for multiple processing and the ystem throws me the error that "There are no suitable change requests"
    Display help shows the below
    For the upload you need a change request that has the status Considered
    and Approved or To Be Revised and ideally has a type that does
    not have the property Object List Is Binding. If the
    change request does have this property, all the entities that are uploaded must
    already be assigned to this object list.
    Please can someoen guide me on how to fix this.
    I found few threads related to this but cudint understand on how to assign a status to CR
    Thanks,
    Sharma

    Hi Prateek,
    Please can anyone give any pointers on how to set the status of change request (for multiple processing):-
    For assigning the statuses to the change request:-
    Go to t code:- MDGIMG->General settings>Process Modeling>Change Request>Edit status of change request.
    the path you mentioned is to create and edit the existing Change request statuses, what I am looking for is when I create a CR for Multi record processing and try to upload a file I get the error "There are no suitable change requests". and when I check the Status of the change request I created I see that the status is Changes to be executed (Set automatically).
    how can i set myself as the processor.
    tcode: MDGIMG->General settings>Process Modeling>Change Request>Create Change request type. Ucheck the single object checkbox and assign your userid for that CR step.
    Single object is already Unchecked  and I am using BRF+ so when I am the processor First approver is say X, I am not sure if we have any place where we can set ourselves as the user. Please let me know if I missed sumting
    Thanks
    Hi Shephalika,
    Yes I am trying to upload a file and Single object is Unchecked in the Change request type.
    Thanks,
    Sharma

  • Launching Multiple Processes With JWS

    Is it possible to launch multiple processes with JWS? I'd like to specify in the jnlp 2 applications to run. Each application must run in its own java.exe process. Why you ask?
    I've created a mission critical application in JWS that requires the application to be active at all times. If the application crashes, the second application detects the crash and restarts the jnlp.
    How can this be accomplished? I'd like to stay away from created another JVM via JNI if possible.

    billmanhillman wrote:
    Invoking javaws from the application URL is not scalable. LOL! When people talk about 'scalable' they are usually referring to numbers of the order of '2000', not '2'.
    To cover something mentioned in another reply..
    Can you get the path to the jar by getResource()?Nope. Sun considers it not to be the business of apps., to know the location of the classes on disk. They have gone to considerable trouble to make it unavailable to applications.

  • Information Text for multiple process.

    Hi All,
    I have a page with multiple process.
    Process 1. Upload multiple files to table using Process Row
    Process 2. The Files are rearranged to another table, ready for analysis.
    Process 3. Uploaded file is analysed for errors 1,
    Process 4. Analyse for Error 2.
    The problem is when the upload file size growth with more number of uploads. It take quite a longer time to upload and then analyse.
    Is there a way i can pass back a value to the Page and display what process has been done and what process is running currently.
    or Any ideas ?
    Thanks in Advance
    Bala

    Hi,
    You can create background process
    See if this help you
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/advnc.htm#BABGHIFB
    Br, Jari

  • Implement Process order if there are multiple processes in production of FP

    Hi Experts,
    I have another scenario in which for a production of final product i need to go through
    multiple processes.
    For Eg.
    I have a raw product suppose as rubber and i want to make an Tyre
    for which i have to do 3 procedures followed one by the other in sequence
    So can u please explain me how can i achieve the same.
    Thanking you
    Regards,
    Ashish P.
    Edited by: Ashish@123 on Nov 14, 2011 2:06 PM

    ") expected" means exactly what it says. You must be missing brackets there. Correct those and you will prpbably find that the "Illegal start of expressions" will go away too.
    Rachel

  • Concurrent Msg Processing Problem

    hi all
              i am using weblogic 81 sp2 , websphere 5.2 as a foreign server. for Concurrent message processing , my MDB not able to pick up message at right time. it may take 3 seconds to 3 minuts. so i cant perform well.
              how to make it my MDB pick up all message at a right time.
              and one more thing
              if i declare user defined execute queue,and assing my MDB with execute queue (using <dispatch-policy>),i got jms exception.(JMS exception:MQJMS2005: failed to create MQQueueManager for 'localhost:UTSD11')
              is it possible to assign user-define execute queue?
              plz clear my problem
              thanx n advance
              regards
              muruganandam

    Use the second signature of the sort method:
    sort(List, Comparator)Write an object that implements Comparator that accepts your variable x in its constructor. Implement the compare() method the same way you did in your original implementation, changing it only to accept two objects of type ZZZ instead of 1:
    public int compare( Object obj1, Object obj2 ) {
        if ( x == 1 )
            // Compare depending on str1
            return ((ZZZ)obj1).str1.compareTo(((ZZZ)obj2).str1);
        else if ( x == 2 )
            // Compare depending on int1
            return ((ZZZ)obj1).int1.compareTo(((ZZZ)obj2).int1);
        else
            // Compare depending on str2
            return ((ZZZ)obj1).str2.compareTo(((ZZZ)obj2).str2);

  • Sharing in-memory database among multiple processes

    From the bdb document, due to disk-less operation, it is not possible to share in-memory among multiple processes.
    I am wondering, if it is possible to use DB_ENV but without DB->sync or any other sync() function call, such that the database, cache, etc in the shared region not flushed to the disk, to achieve disk-less operation. Please share your thought.

    See "Using the Resource Capping Daemon on a System With Zones Installed" in SystemAdministration Guide: Solaris Containers-Resource
    Management and Solaris Zones. You can get the manual from docs.sun.com.
    Chapter 10 discuss physical memory control.
    Regards

  • Concurrent multiple requests hitting action classes

    I have posted this issue in other forums, but i haven't got an answer that makes me satisfied.
    Here is the scenario.
    I have MVC architecture.
    I have several action classes forwarded to one JSP page. Basically, one JSP page is shared by multiple action classes. The model built in the action class is displayed in the JSP page something like request.getAttribute(DATA_MODEL_VAR). "DATA_MODEL_VAR" is just string variable. The JSP page is very simple.
    But I am just curious if there is any synchronization issue for JSP page. The JSP doesn't have isThreadSafe tag. I mean if there is any chance that the model built in A action class can be overriden by the model built in B action class if concurrent multiple requests are made to action class A and B. While I test some load testing, I found data (that doesn't even belong to a particular user) in JSP. That's why it makes me curious.
    It would be great if someone can give me some info or resources.
    Thank you.

    I have posted this issue in other forums, but i haven't got an answer that makes me satisfied.
    Here is the scenario.
    I have MVC architecture.
    I have several action classes forwarded to one JSP page. Basically, one JSP page is shared by multiple action classes. The model built in the action class is displayed in the JSP page something like request.getAttribute(DATA_MODEL_VAR). "DATA_MODEL_VAR" is just string variable. The JSP page is very simple.
    But I am just curious if there is any synchronization issue for JSP page. The JSP doesn't have isThreadSafe tag. I mean if there is any chance that the model built in A action class can be overriden by the model built in B action class if concurrent multiple requests are made to action class A and B. While I test some load testing, I found data (that doesn't even belong to a particular user) in JSP. That's why it makes me curious.
    It would be great if someone can give me some info or resources.
    Thank you.

  • Newbie: why are there multiple process started?

    Hi I have a simple question to ask...
    Q1. Why are there multiple process for webserver instance and http-admserv for a default installed web server? Please refer below:
    $ ps -ef | grep web
    root 931 930 0 Jan 21 ? 0:00 webservd -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-admserv/config -n https-adms
    root 930 1 0 Jan 21 ? 0:00 ./webservd-wdog -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-admserv/config -n htt
    root 948 1 0 Jan 21 ? 0:00 ./webservd-wdog -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-mta01.mydomain.com
    root 932 931 0 Jan 21 ? 0:03 webservd -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-admserv/config -n https-adms
    root 949 948 0 Jan 21 ? 0:00 webservd -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-mta01.mydomain.com/config
    root 950 949 0 Jan 21 ? 42:09 webservd -r /opt/SUNWwbsvr -d /opt/SUNWwbsvr/https-mta01.mydomain.com/config
    jes 6203 5994 0 10:52:36 pts/2 0:00 grep web
    I understand we need 1 watch dog for web server and 1 for admin server but why 2 process for "https-mta01.mydomain.com" and "https-admserv"?
    Q2. This is in relation to Q1. If I need to turn on CA Agent for monitoring, which process should I monitor for web server instance and also for http-admserv?
    Newbie.

    Ans1) That is by design and default behavior. There is one watch-dog process and 2 webservd processes that get started by default. The first webservd is called primordial and the second child webservd is the one that actually serves all the HTTP requests.
    Example:
    # ptree 6898
    6898 ./webservd-wdog -r /space/iws61sp2 ...
    6899 webservd -r /space/iws61sp2 -d ..
    6900 webservd -r /space/iws61sp2 -d ...
    In this example, the pid 6898 is called the watchdog process,
    6899 webservd process is called the primordial process
    and the pid 6900 is called the child webservd process that actually serves all the HTTP requests.
    Ans2) You would monitor the child webservd process.
    Thanks
    Manish

  • Multiple processes in the workflow

    Hello Everyone.
    Why do we require multiple Processes in a single Workflow? I see that in the seeded workflows, if i open a process, in the flow there will be another process which again might contain several different process attached to the same flow.
    In realtime when do we require to use this functionality?
    Thanks

    It is not a requirement - it is simply a way of modularizing - just like how any piece of code can call other pieces of nested codes.
    Srini

Maybe you are looking for