How to monitor process in Java

Dear All,
I am developing an application to monitor an external Java application.
My application will start an external java application.
I can start external Java application from my monitoring application.
Now I want to check that the external application is running previously or not.
If it is running previously, then my application will do nothing.
But if it is aborted normaly or abnormaly, my monitoring application will run it.
How to check if external application is runing or not.
Another thing I want to know that can we check arguments given to that external process.
As I am using for monitoring Java application on Windows, Windows Task Manager is showing only java.exe not the class name passed
as argument.
Can we check it?
Note: I am using Apache Tomcat on same machine.
So there will be one java.exe in Task Manager all the time.
Waiting for your response.

Yes. I am monitoring a Java application from another Java application.
I got suceess when my monitoring Java application starts another Java application.
But, I want to know that if another Java application is already running or not.
I am running Windows machine.
For example:
There is my monitoring application which runs like:
java package1.package2.MonitorThis application starts another Java application using ProcessBuilder Class and Process class.
I pass command line as java package.package2.ApplicationWhenever java package1.package2.Application terminates my monitoring application again restarts it.
Now, there are two situations I am thinking
#1) The external application java package1.package2.Application already started before starting my monitoring application.
My monitoring application must check the application is running or not. If it is running already, it must monitor previous application only.
#2) If anyone manually started my application java package1.package2.Application . At that time, my monitoring application must allow only one instance of application.
How in Java we can do that?
In Windows Task Manager, we can see only java.exe.
I want to know that parameters I have passed to that java.exe .
Does anyone know that?

Similar Messages

  • How to initiate process from Java?

    Hello,
    Does anyone knows how to initiate Process from java code???
    or Which API can start a new instance of Business process??

    If you are on Oracle BPM 10g, here's a link to a thread on this forum that might also help. It is a step-by-step.
    Creating a new work item instance in a process using PAPI
    Dan

  • Where to find documentation on Oracle BPM 11g processes from Java

    As in the title I can't find documencation on hot to connect and use processes from Java application. I'm also interested in how to implement processes, in Java, that I can use than in modeling tools... what I wont to do is to implement some logic as Java classes and than use that logic in BPMN2.0 modeling and running.

    This is what you might need
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10224/bp_workflow.htm#BACHEFDH

  • How to monitor BPEL process..? i want to see HTTP request message..

    Hi all,
    Is there any way to monitor BPEL process. In Jdev there is tool call
    HTTP analyzer but it only monitors process which are invoked from Jdev.
    Like Java webservices can monitored via that tool. But i want to monitor BPEL
    process. I want to see Http request message. It that possible.?
    thanks a lot.
    /mishit

    Any requests you want to monitor should be routed through obtunnel. So the webservice that calls your bpel process should use the url of the machine where obtunnel is located, and obtunnel should be configured with the details of the machine where the bpel process is located.
    also, you may find this thread of interest How to capture SOAP message using TCP Monitor in JDev?

  • How to call a BPEL process from Java ?

    How can I call a BPEL process from Java?
    The Java client should be outside of the PEL engine.
    Does someone have a piece of sample code for
    a "Hello world" java-to-bpel call (+ java client src)?

    http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial7-InvokingBPELProcesses.pdf

  • How to get response from an asynchronous BPEL process in Java

    I'm experimenting with BPEL and doesn't seem to be able to get response from an asynchronous BPEL process. Here's the deal:
    I have a BPEL process that takes a string as input, and gives another string as output. This is a asyncronous process.
    I want to initiate this BPEL process as a web service so I generate a Webservice Proxy in JDeveloper 10g (10.1.3.0.4). The function to call the process is now called "initiate" and takes three arguments: the input string, a "org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo" and a
    "org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID".
    HTTP-Analyzer shows that invoking the BPEL process with initiate("somestring", null, null) results in sending a SOAP message to the BPEL process, which returns a "202 Accepted". How do I get the response from the process? My intuition tells me that I have to use that second argument, that EnpointReferenceType thing. How do I use that?
    Another question: If a asynchronous BPEL process does not exists (so the endpoint does not exist) the Java proxy does not throw an error when runned. It does not even sends a message. It exits with status 0! (This happens for example when deploying a new version of a process and when the "old" version is undeployed). Calling a non-existing synchronous BPEL process, the Java proxy DOES throw an error.

    Clemens,
    That all sounds logical. But somehow it is still a mystery for me ... Somehow I don't see what should be done.
    To call the async BPEL process I have the following procedure:
    initiate(String input, org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType replyTo, org.xmlsoap.schemas.ws._2003._03.addressing.AttributedURI messageID)
    The first argument is the input for my BPEL process. The second is the address to a webservice that should handle the callback, right? The third is a messageID (makes sense, but why of the type AttributedURI?).
    Here lies my problem. It is not clear to me how these EndpointReferenceType & AttributedURI work. I can't find anything on the net about it. The AXIS examples as where mentioned earlier use other types (namely the "org.xmlsoap.schemas.ws.addressing.MessageID" and "org.xmlsoap.schemas.ws.addressing.ReplyTo") which are completely different.
    What I did so far:
    - I created an webservice proxy that listens on the onResult endpoint of the BPEL process.
    - I created an webservice proxy that calls the BPEL process through the initiate procedure, but it is not completely clear to me how to construct the EndPointreferenceType replyTo, and the MessageID. I did something like this:
    EndpointReferenceType replyTo = new EndpointReferenceType();
    // callback service running on local machine
    // This URI class is the java.net's version
    URI replyToURI = new URI("http://vaccinatie:8988/syncro-callback-context-root/stringconcatCallbackBindingPort");
    // This AttributedURI is the org.xmlsoap.schemas.ws._2003._03.addressing's version
    AttributedURI address = new AttributedURI();
    // the only public methos that made sense to me:
    address.set_value(replyToURI);
    replyTo.setAddress(address);
    // call the BPEL process
    myPort.initiate("test123", replyTo, address);
    But the above doesn't work (largely because I don't know what I'm doing here prob.:-) ) It does send the "test123" message, and the BPEL process does process it, but I don't seem to get the callback right.
    I hope this makes my problems somewhat clearer. I hope someone can help me, because I'm just a beginner in this whole "web service area" and seems to do something terribly wrong here, because it should be very simple. Thx.

  • How to monitor RFC processing in XI

    Hi Friends,
    In the IDoc to RFC scenario please tell me How to monitor RFC processing in XI..
    Thanks and Regards
    Sri

    Sri,
      You can monitor in SXI_MONITOR/SXMB_MONI. If its Syncronous then u can see the request and response messages in the above mentioned transaction.
      To get more details you can go for RWB and select ur message and check for audit log's.
    Best regards,
    raj.

  • How to call BPM process from Java

    Hi All,
    Can anybody help how to call a BPMN process from java.Please give any sample exaple on this.
    Thanks,
    Ganesh

    For 11g BPM please look at this post. Re: Getting while running the BPEL process from java
    It references an ATeam example app that can start processes from a web client. But the Java APIs are described too.

  • How do i get the error detil within monitoring process .. ???

    Dear All,
    Hi all ... It's regarding monitoring
    If we monitor the extraction's request, than we go detail, we're gonna see the 3 tabs: Header, Status, and Details. You'll see the status of your data extraction request..
    Now, if i want to get the data in the details Or Status, does anyone know what table that keep that information??
    Or ..
    Is there a function to achieve that information ???
    Could you kindly share to me please .. ????
    Thanks in advance.
    Best regards,
    Niel.

    Dear Niel,
    Tcode: RSPC
    To create process chain go into RSPC there we have 4 views like
    1. planning view (to create process chain)
    2. checking view(to check the process chain)
    3. log view (to monitor process chain)
    4. detail view(to see which process type has which variants)
    You cant get the data in Monitor as it is used only for monitoring purpose
    you can get it information through mail.. for that
    try
    You can send messages to an application process of the chain, depending on the success or failure of the process.
    1. To do this, using the context menu for a process, create another process variant of type Send Message.
    2. If you maintain a message, first specify whether you want the message to be sent when the process has been completed successfully or unsuccessfully. Then choose Next.
    3. A dialog box appears, in which you can select an existing process variant or create a new one.
    4. If you create a new process variant, edit the document that is going to be sent and maintain a list of recipients.
    5. Save your process variant and go back.
    The message process variant is now assigned to your application process. When the message is sent, the status information and the process log are also sent.
    Note, you must configure SAPconnect in order to ensure that your system can send email - use transaction SCOT if this has not been configured.
    Thanks for any points you choose to assign (that is the way to say thansk in SDN).
    It's set as a property for an individual process in the chain. You would have to set on each process where you want notification.
    One technique you might consider, is that tou can create a "meta-chain" made up of local chains, and you can set a message on each of the "local chain" processes in the meta-chain
    Also go through these links
    How to Trigger an Alert from a Process Chain (NW7.0)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0f4e952-e46e-2910-1f9e-cae187cd16d1
    SAP Network Blog: Information Broadcaster Triggered by a Process Chain
    /people/anil.bavaraju/blog/2008/02/07/information-broadcaster-triggered-by-a-process-chain
    Hope it helps you,Revert me back if you have any queries
    Assign ponts if helpful
    Regards
    Bala

  • How to create parent and chile process in java

    i'm beginning in java, and i want to ask something, please help me...
    1. i want to ask how to create parent and child process in java???
    example :
    if have one window and explore menu, when i click the explore menu.
    new window come out.
    how if i close the parent window the child window will close too...
    2. what is the method from runtime class to get available memory and Active Threads count

    ONE way to do what you wanted is this.
    class Parent{
    Child c = new Child
    allChildren.add(c);
    //if close
    iterate through list
    (Child)allChildren.get(index).close();
    ArrayList allChildren;
    class Child{
    public void close(){ }
    i dont know if you can get the thread count. but you can
    get the current thread by using System.
    Memory: Runtime.freeMemory() .maxMemory() .totalMemory()
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    Careful though you have to do a calculation to get the
    actual memory because those 3 methods refer to freeMemory
    of the CURRENT heap not the total memory.
    i think its: total - (max - free)

  • How to monitor / shutdown processes and users?

    Hi,
    As you can see in my previous post i'm totally new to Arch and fairly new to Linux...
    Here's one thing that bothers me: I don't know how to keep track of all running processes (and end them if needed... I guess you need to 'kill' them but you first need to know their name, right...) and logged on users (even though that's only me, heh...)
    How can you do that in Linux? (something like task manager or another admin tool - or a command line version)
    Another thing... I think a wiki page 'securing the default Arch install' would be helpful...
    (flame me if there already is one, but I didn't find it )
    greetings,
    d.
    (I think Arch is going to be the one Linux distro to break the record of 1 month installation on my pc... woohoo!!!)

    Kern wrote:
    processes man ps
    Now only 2 questions are left: how to monitor logins, and how to secure Arch Wink
    Arch Wink, is this a subrelease of Arch? if so i've never heard of it. 
    I really don't know how that ended up in my post especially because I use semicolon, bracket instead of colon, wink, colon for my smiley...
    but as relates to securing Arch, of course I mean against network based attacks. The way you would try to secure Windows. I know how to own windows computers when I have physical access to them, and I guess it's the same thing with Linux pc's... but I want to feel secure that nobody from the internet is going to appropriate my box for illegal or other things, on those few occasions that i'm not behind a router/firewall (which I am not sure I trust either... it's a Linksys wireless/wired router with integrated firewall capability. How secure is that? I don't know!)
    Is there no way to deny all other pc's access to this pc? It's a laptop, not a server, so nobody has business accessing it remotely anyway... Actually, this is one of the reasons I had an eye on openBSD secure as hell...
    EDIT: since we're at it... another thing I don't find is how I can find out at what speed my cpu is running... is it going down to 600 MHz when Idle or isn't it? etc... That stuff is pretty easy to see in windows... must be feasible at least in Linux hey

  • How to invoke BPEL process from JAVA API

    Hi Guys
    Any idea if you can tell me how to invoke BPEL process from JAVA API ?
    What to do in BPEL process manager to achieve that?
    Regards
    Deepak

    See http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.

  • How to perform process chain monitoring

    Hi All,
    can u send me the steps how to perform process chain monitoring and what to do if we get any error in any process in the process chain. if possible if any one have the screen shots how to do kindly send me that link.
    Thanks & Regards,
    Naveen

    Transactions used to monitor the Process chains
    RSPCM
    SE38 >/SSA/BWT or ST13>BW-TOOLS
    --> clic on execute --> select the process chains radio button --> execute
    --> click on process chains -->if you want to monitor the specific process chain enter the process chain id or if you want to monitor the process chains that are running in a particular date and time interval simply enter the values and click on execute...
    it will display the process chains status and time of the runs etc...

  • How to kill a system process from java code.

    Hi,
    i need to kill or remove windows system process like cmd.exe from java code.
    like removing it from end process in task mgr.
    i tried below code but its not removed.
    is there a better way we can do this.
    killing a system process from java code will create any issues?
       public static void main(String[] args) throws Exception {
       String[] cmd = { "cmd.exe" };
       Process p = Runtime.getRuntime().exec(cmd);
       p.destroy();
    any suggestions or ideas are really appreciated.
    thanks.

    Hi  jtahlborn, mohan
    yes the process is created from my java code. 
    in my code iam creating a process like below and if it is running for a long i need to kill it from java.
    For that " Runtime.getRuntime().exec("taskkill /F /PID " +  7408); " is working fine.
    7408 is my process id in taskmgr created from java and iam manually passing the PID it to kill it.
    But i need to get the PID from java code.
    Thanks for your suggestions.
    Sample Code:
    public static void main(String args[])
            try {
              Process process = Runtime.getRuntime().exec(new String[]{"cmd.exe","/c","start"});        
              Field f = process.getClass().getDeclaredField( "handle");
              f.setAccessible( true);         
              long procHandle = f.getLong( process);
              System.out.println( "prochandle: " + procHandle );
              //Runtime.getRuntime().exec("taskkill /F /PID " +  procHandle);
            } catch( Exception e) {
              e.printStackTrace();

  • How to invoke Bpel process  from java using 'bpel process WSDL'

    I want to call bpel process from java using bpel wsdl.
    could any one point me to any url/sample.
    Thanks
    Nagajyothy

    Hi Seshagiri,
    Thanks for providing links and initial steps to create web service proxy(using Jdeveloper 11g).
    I created a web service proxy.
    provided the needed inputs.
    when I ran the client app, bpel process(has a human task) got invoked but faulted with exception as below
    Operation 'initiateTask' failed with exception 'EJB Exception: : java.lang.ExceptionInInitializerError[[
         at oracle.tip.pc.services.common.ServiceFactory.getAuthorizationServiceInstance(ServiceFactory.java:147)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:1159)
         at oracle.bpel.services.workflow.task.impl.TaskService.initiateTask(TaskService.java:502)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
    please help me in solving the above problem.
    Thanks
    Nagajyothy

Maybe you are looking for