Manage Processes in Java VM (Process Monitor, Firewall)

Hey there.
I asked myself today if there is a possibility to have a task-manager for the java vm (since windows task-manager shows only javaw.exe) and a VM-Firewall (since a common firewall only sees "any java programms wants to establish a connection"
thank you

Actually, you comments aren't necessarily unclear. They are more incomplete. You didn't really provide too much details as to what you are trying to do or experiencing. Genrally speaking, most firewalls will allow you to not only monitor and block/permit by application executible name, but also by the port used to make the exchange, the content type, and numerous other attributes. So if you have multiple java applications, but want to allow or restrict one in particular, simply block by a specific port or set of ports or one of the other attributes supported by your particular firewall.
As a simply example, take a look at the Windows Firewall for XP. Notice that you can define the app, the port, and protocol
http://support.microsoft.com/kb/842242
http://support.microsoft.com/Library/Images/2691294.png

Similar Messages

  • Problem with starting a sqlplus-process via java.lang.Process

    Hi,
    I want to start a sqlplus-Process from a java-application via java.lang.Process. Works great with XP. On a W2K-Machine, the process is started (I can see it in the Taskmanager), but it doesn't connect to the db - the OS-process hangs, also the java-application which invoked the process.
    If I start a sqlplusw.exe-Process instead of sqlplus.exe, it works as well.
    Does anybody know what's going wrong ?
    I'm using java 1.5.0_11 and Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    Thanks in advance
    Jens

    java.lang.Process can be used to perform an OS Shell to launch specific tasks. But why are you interested in specifically launching sqlplus from here?
    ~ Madrid
    http://hrivera99.blogspot.com/

  • Java Application Performance Monitoring - J2EE Transaction Monitoring

    Hi,
    Does SCOM 2012 R2 support J2EE transaction monitoring, ie how application behaves from end users. Apdex scores,response time and throughput , Execution method and SQL queries.I could not find transaction monitoring information in Java MP guide.
    Is that Java managment pack supports monitoring only Tomcat and not weblogic,websphere and jboss on Linux servers,
    Appreciate help in this
    Thanks in advance
    Bharath

    Hi Bharath,
    "Apdex scores,response time and throughput , Execution method and SQL queries."
    You're talking about the metrics similar to those which we have after configuring application monitoring in .NET Application Performance Monitoring (AVIcode APM) template, right? If so, this sort of APM profiling for Java apps introduced in SCOM 2012
    R2. But it's only for Tomcat5.5+ hosted Web Applications:
    http://blogs.technet.com/b/random_happy_dev_thoughts/archive/2014/01/07/system-center-2012-management-pack-for-java-application-performance-monitoring-released.aspx
    If you use another application server rather than Tomcat (WebLogic, WebSphere, JBoss), I would recommend you to take a look at BeanSpy instrumentation itself:
    http://www.systemcentercentral.com/demystifying-jee-app-performance-monitoring-in-opsmgr-2012-jee-faqs/
    Download link:
    http://www.microsoft.com/en-us/download/details.aspx?id=29270
    This is not AVIcode-like APM (AVIcode-like APM relies on it as a prerequisite), but if you are familiar with MBeans structure, you could configure quite interesting monitoring transactions for your java apps:
    http://blogs.inframon.com/post/2012/04/27/WebSphere-monitoring-with-the-JEE-Application-Performance-Monitoring-management-packs.aspx
    http://stefanroth.net/2012/04/10/scom-2012-jee-application-availability-monitor-template/
    Igor Savchenko, VIAcode Consulting LLC (http://www.viacode.com/)

  • Java Business Process Monitoring

    Hello Experts,
    I want to setup Business Process Monitoring between Solman and ECC system.
    Is it possible to setup the JAVA Based  Business process monitoring ?.
    If its possile how to setup for JAVA Busness process monitoring.
    Thanks
    Nikkil

    Hello Nikkil,
    there is no content currently shipped in order to perform Business Process Monitoring for Java components. Can you specify what kind of application you are looking at and what it would be that you owuld like to monitor as part of a business process?
    We could then evaluate in what way a corresponding enhancement for Business Process Monitoring could be also useful for other customers.
    Best Regards
    Volker

  • Two java.exe processes running in the Task Manager in Windows XP

    I tried to find the best possible place to post this and after spending about 20 minutes searching for an appropriate forum starting from java.com I ended up here. So forgive me if the is a wrong place and if there?s a more appropriate place for my question, please provide a pointer to it.
    I don't know much about java and what it does but as the title says when I open the Task manager there are two java.exe processes running at the same time with about 20 000 k each.
    One of the processes is coming from:
    C:\Program Files\Alias\Maya6.5\docs\jre\bin\java.exe
    and the other from:
    C:\Program Files\Alias\Maya7.0\docs\jre\bin\java.exe
    in addition to that a jusched.exe process is also running coming from
    C:\Program Files\Java\jre1.5.0_10\bin\jusched.exe
    I rarely open the Maya 6.5 and 7 documentations but the two java.exe process are running all the time and I would like to stop them running when I don?t need them but I don?t know how.
    I can't end these processes from the Task Manager; they reappear immediately after I end them.
    Any help with this is greatly appreciated.
    Thank you

    Try to see:
    http://forums.cgsociety.org/showthread.php?t=294973
    Bye,
    leo

  • Invoking asynchronous BPEL process from java ui

    Hi,
    I am invoking an asynchronous BPEL process from java ui.
    I read somewhere that i can obtain an instance handler uing the lookupInstance() method of class Locator using the conversation id provided by the class NormalizedMessage.
    My code looks like this
    // Connect to Oracle BPEL server
    Locator locator = new Locator("default","bpel");
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // Construct a normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    nm.addPart("payload", xml);
    // Initiate the BPEL process
    deliveryService.post("MyLoanFlow", "initiate", nm);
    //Obtain the instance handler
    IInstanceHandle handle = locator.lookupInstance(NormalizedMessage.CONVERSATION_ID);
    But this is giving the error - can not find any instance with conversation id 'conversationId'.
    Also, if i try to obtain a list of instance handles associated with a process , it does not contain the most recently created instance
    IBPELProcessHandle ph = locator.lookupProcess("MyLoanFlow");
    IInstanceHandle[] iHandler = ph.listInstances();
    out.println(iHandler.length + "<br>");
    if i invoke the process for the first time the output is 0.
    can you please help me. it is urgent.

    Hi Sudipto,
    Regarding your second question,
    deliveryService.post("MyLoanFlow", "initiate", nm);
    IBPELProcessHandle ph = locator.lookupProcess("MyLoanFlow");
    IInstanceHandle[] iHandler = ph.listInstances();
    out.println(iHandler.length + "<br>");
    ---- returns 0 ---
    This is because MyLoanFlow is an asynchronous process in your case. So the control is returned to your java block immediately after the request for a new instance is posted. And your second line of code(querying for the list of instances) is executed even before the instance is created on the server side. You can verify this in two ways:
    1. try creating an instance of a synchronous process using IDeliveryService.request - this will always result in the increment since the current thread is blocked till the new instance is created.
    2. for your case, you can try
    Thread.currentThread().sleep(500); - just allow the server some time for completing the instance before you query it for the list of instances..
    and wrt question 1,
    //Obtain the instance handler
    IInstanceHandle handle = locator.lookupInstance(NormalizedMessage.CONVERSATION_ID);
    But this is giving the error - can not find any instance with conversation id 'conversationId'.
    For setting the conversationId, you could do so by including the following inside your .bpel file
    <bpelx:exec name="test-setConversationId" language="java" version="1.4">
    <![CDATA[
    setConversationId("conversationId");
    ]]>
    </bpelx:exec>
    The code:
    IInstanceHandle ins = locator.lookupInstanceByConversationId(NormalizedMessage.CONVERSATION_ID);
    should fetch you the required instance in this case.
    HTH,
    Anuj

  • Dreaded "Operations Manager failed to start a process" error (2012 R2)

    I know this error has been covered many times, and on many topics, but this time mine is slightly different.   It's
    NOT the
    "SCOMpercentageCPUTimeCounter" error covered by Kevin Holman.
    Also, I am running SCOM 2012 R2 UR4 (7.1.10226.1046) and everything seems correctly patched (MS and agents), like
    suggested by Nicole Welch and Kevin Holman as well.
    So my environment is a fresh installation of SCOM 2012 R2, and I am transferring to this new Management Group, the monitored servers from our old SCOM 2012 "R1" (which I did not upgrade but rather made a brand new independent install).  So
    all servers aren't migrated yet, but I would like to solve this error before. This error did NOT happen in "R1", nor was it overridden (I imported the exact same Management Packs anyway).
    On 2012 R2, it happens on almost all new monitored machines, mainly Read-Only Domain Controllers (RODCs).
    Here is the kind of alert text I am getting:
    Het om 10:10:15 gestarte proces is beëindigd als gevolg van een uitvoerverzamelfout als gevolg van fout 0x80070057 :
    The parameter is incorrect.
    ; mogelijk zijn er gegevens verloren gegaan.
    Opdracht die is uitgevoerd: "C:\Windows\system32\cscript.exe" //nologo "C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 193\24788\AD_Global_Catalog_Search_Response.vbs"
    RODC02.mydomain.be (objectCategory=DMD) false 4 {9E253FCB-8AAF-491F-CCA3-E632C6C2800C}
    Werkmap: C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 193\24788\
    Dit is van invloed op een of meer werkstromen.
    Werkstroomnaam: Microsoft.Windows.Server.2008.AD.DomainController.GCSearchTime.Monitor
    Exemplaarnaam: RODC02
    Our servers have Belgian (Dutch) regional settings, hence the language. But check out the highlighted info in bold.
    The related event Number (in Alert Context) is 21404. Most other articles about this, mention 21402 or 21403. I suppose they all must be related but still, it's a new one here.
    There you have the failing VBS file. I checked all alerts and there seem to be different files concerned overall. Other examples:
    C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 233\22737\AD_Database_and_Log.vbs    (from almost all RODCs)
    C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 196\19876\Microsoft.Windows.Server.Legacy.FreeSpace.vbs
      (also from an RODC)
    C:\Program Files\Microsoft System Center 2012 R2\Operations Manager\Server\Health Service State\Monitoring Host Temporary Files 5891\338282\Microsoft.Windows.Server.CPUUtilization.Monitortype.vbs 95 15
    SCOM02.mydomain.be 1.4119384288787842     (this one is from my second Management Server..)
    Repeat count of the alert is 1 to 2 a day, so it's not nightmareish, but still, requires to be fixed. I suspect that even if there is a different VBS file concerned, since the eventID and the alert text are the same, the repeat count will just increase,
    not showing the last actual VBS concerned.
    I connect to each of these servers, and browse to the directory containing the file, and the folder is there, the file is there.  The error text mentions incorrect parameters but they still seem OK to me. 
    I found something which might be worth noting:  when browsing to the directory, be it on an RODC or on the SCOM server, I get a permission popup requiring some admin rights to do so - although I am using my domain admin (+SCOM+SQL+local
    admin everywhere) account:
    SCOM services use the Local System account to run, on every machine. I thought Local System shouldn't be concerned with these permissions popups, but normally the domain/local admins aren't either, yet I am.
    The "Health service" folder is the only one from the "C:\Program Files\Microsoft Monitoring Agent\Agent" folder to be concerned with this; I can browse without trouble to any other directory there.
    After a SCOM service stop, I renamed the "Health Service state" folder (as you can see on the screenshot, there is a "Health Service State bak" folder) and let the service recreate it after a restart, to ensure it was clean and with
    appropriate permissions , but it doesn't help.
    Might that be a clue?
    Or else what?  I'm getting confused and don't find a suitable solution.
    dd
    Bix

    On Thu, 4 Dec 2014 14:20:22 +0000, Bixessss wrote:
    I know this error has been covered many times, and on many topics, but this time mine is slightly different.   It's*NOT* the "SCOMpercentageCPUTimeCounter" error covered by Kevin Holman <http://blogs.technet.com/b/kevinholman/archive/2010/02/23/a-new-script-error-scompercentagecputimecounter-vbs-invalid-class.aspx>.
    Also, I am running *SCOM 2012 R2 UR4* (7.1.10226.1046) and everything seems correctly patched (MS and agents), likesuggested by Nicole Welch <http://nicolewelchscom.wordpress.com/2013/10/01/operations-manager-failed-to-start-a-process/>
    and Kevin Holman as well.
    This forum is for security issues related to Windows Server and not for
    System Center questions.
    Post your question in one of the following forums:
    https://social.technet.microsoft.com/Forums/systemcenter/en-US/home?category=systemcenteroperationsmanager
    Thanks.
    Paul Adare - FIM CM MVP
    Never trust a computer you can't lift. - Stan Masor

  • Error processing createOrderBySpecification java.lang.NullPointerException

    Hi there,
    I am trying to create order in OSM through SoapUI using CreateOrderBySpecification request. SoapUI is throwing error in response. Message is shown below:
    It is a simple request with 2 parameters.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
       <env:Header/>
       <env:Body>
          <env:Fault>
             <faultcode>env:Server</faultcode>
             <faultstring>Failed to invoke end component oracle.communications.ordermanagement.ws.OrderManagementWSPortImpl (POJO), operation=CreateOrderBySpecification
    -> Failed to invoke method
    -> java.lang.NullPointerException</faultstring>
             <detail>
                <java:string xmlns:java="java.io">java.lang.RuntimeException: java.lang.NullPointerException
    java.lang.NullPointerException</java:string>
             </detail>
          </env:Fault>
       </env:Body>
    </env:Envelope>
    The Managed Server logs is throwing error as shown below:
    ####<Mar 9, 2015 2:24:51 PM EDT> <Notice> <Stdout> <osmtest1.test.com> <OSMTEST1_MS1> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <9a934abad3e137b8:-48d8df11:14bffbf45e8:-8000-00000000000003c7> <1425925491273> <BEA-000000> <<09-Mar-2015 2:24:51,272 EDT PM> <ERROR> <ws.c> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <Error processing createOrderBySpecification>
    java.lang.NullPointerException
            at oracle.communications.ordermanagement.ws.k.a(Unknown Source)
            at oracle.communications.ordermanagement.ws.c.a(Unknown Source)
            at oracle.communications.ordermanagement.ws.OrderManagementWSPortImpl.createOrderBySpecification(Unknown Source)
            at oracle.communications.ordermanagement.ws.OrderManagementWSPortImpl.createOrderBySpecification(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:112)
            at weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:84)
            at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
            at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
            at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
            at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
            at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
            at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
            at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
            at java.security.AccessController.doPrivileged(Native Method)
            at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
            at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
            at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
            at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
            at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1491)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)>
    Any help is appreciated.
    Thanks
    Archana Sheshachalam

    Hey There,
    It is resolved. The problem was with the request message for CreateOrderBySpecification. Remove the unwanted tags and keep only the required tags.
    Thanks
    Archana

  • SCOM 2012 Operations Manager Failed to start a process

    We have recently upgraded from SCOM 2007 to SCOM 2012. We are not getting a great deal of “Operations Manager Failed to start a process”. The process varies including:
    DiscoverSQL2008ASDiscovery.vbs
    DiscoverSQL2008DBEngineDiscovery.vbs
    DiscoverSQL2008ASDiscovery.vbs
    Microsoft.Windows.Server.NetwokAdapter.BandwidthUsed.ModuleType.vbs
    I have researched and researched. I know that you can try to run the scripts locally on the machine but it seems the scripts never make it to the machine. I go to the path in the error, no luck. I look in the other folders as I know that SCOM moves the scripts,
    and I even search the entire C drive but the scripts are not getting to the server. The folder is not even making it. For example:
    Command executed: "C:\Windows\system32\cscript.exe" /nologo "Microsoft.Windows.Server.NetwokAdapter.BandwidthUsed.ModuleType.vbs" SERVER true Working Directory: C:\Program Files\System Center Operations Manager\Agent\Health Service State\Monitoring
    Host Temporary Files 11606\1759\
    The script is not there and the folder \1759 is not there either.
    I have removed and reinstalled the client.
    Antivirus is fine, up to date and not blocking on any of the machines.
    I have stopped the “System Center Management service” and renamed the “Health Service State” folder and it recreates fine but not long after I get the warning in SCOM about “Operations Manager Failed to start a process”.
    I look in event viewer for Operations Manager on this particular one and I see a lot of:
    Performance data from the Health Service could not be collected since required registry keys could not be read, the error was 2L (The system cannot find the file specified.). Event ID 6001.
    I tried the fix of
    "lodctr MOMConnectorCounters.ini" and "lodctr HealthServiceCounters.ini" but I get “error
    encountered while updating text in registry. Status: 0”. Again I am using SCOM 2012.
    Do I need to look at each failed script or is there a overall issue because the scripts are not making it to the machines. Any ideas?

    I guess you might need to run "mofcomp sqlmgmproviderxpsp2up.mof".
    Thanks, S K Agrawal

  • Images processed in lightroom on calibrated monitor then viewed on non calibrated monitors

    I process my images to look good on on my calibrated monitor, then export them to my website for viewing. When I show people my images on their monitors which generally are not calibrated, the images of coarse look washed out and way too light. How do you guys compensate for a situation like that? Of coarse you want your images to look the way you want them too on everyones computer that looks at them. Is it best to darken and over saturate in lightroom to compensate for the difference?
    Curt

    The histogram represents the numerical values of lightness and color that are stored in the file or in the XMP-data or in the LR Catalog.
    Different (uncalibrated) monitors interpret these numerical values differently, so an image from one and the same file would look different on these monitors.
    But the (uncalibrated) monitors do not shift the black or white point; they just display the tonal values different. So for instance an image file with correct black and white point would have blown-out highlights on a monitor that is too bright. Or the darks could block-up on a monitor that is too dark.
    But the monitor doesn't change your image file and doesn't change the histogram.
    The purpose of calibrating the monitor is to give you a standard when you edit your images. If your monitor is not calibrated and  - for instance - has a white point of 5000 K instead of the standard of 6500 K,  then your images would appear too red (too warm in photographic terms) on  your monitor. If you then corrected your image (its numerical values) so that it appears "normal" on your screen, it would have a blue cast (too cold) on a calibrated monitor.
    So basically we calibrate our monitors to create a standard (a) between different devices (monitors, printers, etc) and (b) between your own images edited at different points in time. Without calibration your monitor would not only display "wrong" colors but display the same numerical color value differently at different time (monitors "drift" and thus have to be re-calibrated at regular intervals).
    But naturally, the color management does not work for uncalibrated monitors. So, even if you have a color-managed workflow, you  never know how your images that are posted on the web will look on other people's monitor. And there is no help for that as long as uncalibrated monitors exist.
    WW

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

  • Java.exe process

    I've been searching high and low to figure out how to set a java.exe process to high all the time. Its for a server that i run and im learing java in school just havent gotten to that class yet. Its a batch file but when i set it to start/high it doest alow the server to restart, just shuts it down. with out the comand its fine, but id have to go to task manager to set the priority to high. Is there a way to make it High all the time??? thanks.

    Grimm0ne wrote:
    I've been searching high and low to figure out how to set a java.exe process to high all the time. You mean thread priority?
    Its for a server that i run and im learing java in school just havent gotten to that class yet. Its a batch file but when i set it to start/high it doest alow the server to restart, just shuts it down. with out the comand its fine, but id have to go to task manager to set the priority to high. Is there a way to make it High all the time??? thanks.I don't know of any such thing.
    %

  • Terminate a BPEL Process using Java Code

    Hi,
    How can I achieve the forcible termination of a BPEL process via Java code??
    Thanks
    Pramod

    I guess I'll not be able to use event handlers because if I set an OnMessage, the process wont get kicked off till I receive a message, isnt it?
    My requirement is that I want the BPEL to keep executing as normal but as soon as I send a request to Stop, then it should terminate.
    Actually, is it possible to achieve the following? That is, I want to keep running a bpel process but at the same time keep monitoring for an input message(sent from another partnerlink maybe). As soon as I receive my input message, a different scope is executed and in this scope I can then put a terminate.
    Thanks
    Pramod

  • Handling an external (Windows) process from Java.

    There is an example program in the 3rd edition of "The Java Language" by Gosling, et. al. The example is a simplified shell to handle an external executable. This is the code:
    public static Process userProg(String cmd) {
        Process child = Runtime.getRuntime().exec(cmd);
        plugTogether(System.in, child.getOutputStream());
        plugTogether(System.out, child.getInputStream());
        plugTogether(System.err, child.getErrorStream());
    }I have tried various means to make this skeleton work but to no avail. Is anybody aware of an example that would show how to not only startup an external executable but manage it with I/O? I have plenty of examples that startup something like:
    String[] cmdLine = {"ls", "-l" "dir"};
    Runtime.getRuntime().exec(cmdLine);
    ...But none of them control an external application like ftp that require an interactive session. If anyone can point me towards a book, website url, example here at Sun, I'd appreciate it but it needs to be an example that controls an external executable through input and output. Thanks.
    -John

    OK.
    This is not exactly an "example"; it is actual code from a production program. Names have been changed to protect proprietary info, so it is not clear that this will even compile. (Also: I would write this differently today, so please don't show this to anyone:-)
    Key limitations as an example:
    o The server is proprietary, so you can't see it.
    o The scripting language is proprietary, so you can't see it.
    This is a fragment of the interface between a large java application and a session-based server. The server was fed scripts - lines of interpreted code; the server executed the script. Key points:
    o If the script terminated with an "execute"command, then the server would hang around waiting for more scripts.
    o If the script terminated with an end, then the server process would exit.
    o What the server "said" in response was controlled by print statements in the script it was fed.
    Note the goofy print statements that allow my client to detect when the server completed a given transmission.
    import java.util.Enumeration;
    import java.util.Vector;
    import java.io.*;
    import Logger;
    * Provides data from proprietary server.
    public class ServerAccess {
          * Class to write script to server.
         private class Writer implements Runnable {
              Vector script;
              PrintStream p;
               * Constructor - establish a print stream to server.
              Writer(OutputStream s) {
                   p = new PrintStream(s);
               * Save the script to be written and start the writer.
              public void init( Vector script) {
                   this.script = script;
                   new Thread(this).start();
               * Thread to write script lines.
              public void run() {
                   for (Enumeration e = script.elements(); e.hasMoreElements(); ) {
                        p.println((String)e.nextElement());
                   // Make sure everything gets written out.
                   p.flush();
              public void finalize() {
                   // Shut down the print stream.
                   p.close();
         public boolean init() {
              // Access runtime so process can be created.
              Runtime r = Runtime.getRuntime();
              // Execute server.
              try {
                   p = r.exec("server.exe");
                   return true;
              catch(Exception e) {
                   Logger.logAlways("ServerAccess: Couldn't execute server. " + e.toString());
                   return false;
          * Terminate access to server.
         public void terminate() {
              Vector script = new Vector();
              script.add("end");
              // Write script to server process.
              Writer w = new Writer(p.getOutputStream());
              w.init(script);
              BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
              try {
                   String line;
                   while ((line = b.readLine()) != null) {
              catch (Exception e) {
                   Logger.logAlways("ServerAccess: Couldn't terminate server. " + e.toString());
              return;
          * Test method.
         public void runTest() {
              // Create test script.
              Vector script = new Vector();
              script.add(....);
              script.add("print END_OF_OUTPUT %RET");
              script.add("execute");
              // Write script to server process.
              Writer w = new Writer(p.getOutputStream());
              w.init(script);
              BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
              try {
                   String line;
                   while (true) {
                   line = b.readLine();
                   if (line.equals("END_OF_OUTPUT"))
                        break;
                        System.out.println(line);
              catch (Exception e) {
                   System.err.println(e.toString());
         * Test.
        public static void main(String[] args) {
            ServerAccess a = new ServerAccess();
              try {
                   a.init();
              catch(Exception e) {
                System.err.println(e.toString());
                return;
            a.runTest();
            a.terminate();
         // Object attributes.
        private Process p = null;
         String END_OF_PACKAGE = "END_OF_CONTENT";
         String END_OF_OUTPUT = "END_OF_OUTPUT";

  • Error Occured while Invoking a BPEL Process from JAVA

    Hi.....
    When initiating a BPEL process from JAVA the code is working fine and the Process is getting initiated.But while using that code in J2EE project as a java code and while calling that method Error is occuring.....
    Here by i am attaching my JAVA Code which runs as an applicateion and package which runs in Server....
    JSP and Java Method Used:
    JSP Code:
    ===============
    <%@ page import=" bo.callbpel" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>FEATT - I30</title>
    </head>
    <body>
    <%
    String input=request.getParameter("dnvalue");
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    out.print("The Input Given to the BPEL Process is : "+input);
    %>
    <BR><BR><BR><BR><BR><BR>
    <%
    out.print("The Reply from BPEL Process is : "+Output);
    %>
    </body>
    </html>
    Java Code:
    package bo;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import java.util.Map;
    import java.util.Properties;
    import oracle.xml.parser.v2.XMLElement;
    /*import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession; */
    //import java.util.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class callbpel {
         public String Initiate(String value){
              String replyText=null;
              String input = value;
              System.out.println(input);
              String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
              String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
              xml=xml+"<ns1:input>"+input+"</ns1:input>";
              xml=xml+"</ns1:BPELProcess1ProcessRequest>";
              try{
              Properties props=new Properties();
              props.setProperty("orabpel.platform","ias_10g");
              props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
              props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
              props.setProperty("java.naming.security.principal","oc4jadmin");
              props.setProperty("java.naming.security.credentials","oc4jadmin");
              props.setProperty("dedicated.rmicontext", "true");
              Locator locator = new Locator("default", "bpel", props);
              String uniqueBpelId = com.collaxa.cube.util.GUIDGenerator.generateGUID();
              //System.out.println(uniqueBpelId);
              //java.util.Map msgProps = new HashMap();
              System.out.println("After creating the locator object......");
              IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
              System.out.println("Before creating the NormalizedMessage object......");
              NormalizedMessage nm = new NormalizedMessage();
              System.out.println("After creating the NormalizedMessage object.*.*.*...");
              //msgProps.put("conversationId",uniqueBpelId);
              //nm.setProperty("conversationId",uniqueBpelId);
              nm.addPart("payload", xml);
              System.out.println("Before creating response object......");
              NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
              System.out.println("After calling the BPELProcess1 .*.*.*...");
              Map payload = res.getPayload();
              System.out.println("BPEL called");
              XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
              replyText=xmlEl.getText();
              System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
              catch (Exception e) {
              System.out.println("Exception : "+e);
              e.printStackTrace();
              return replyText;
    While Creating and Object for the Class callbpel and Whilw Calling that Method
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    Its throwing an Error:
    Error Occured is:
    After creating the locator object......
    Before creating the NormalizedMessage object......
    After creating the NormalizedMessage object.*.*.*...
    Before creating response object......
    Apr 24, 2008 9:12:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NoClassDefFoundError: javax/ejb/EJBException
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at bo.callbpel.Initiate(callbpel.java:55)
         at org.apache.jsp.output_jsp._jspService(output_jsp.java:55)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Unknown Source)
    For Running JSP i am Using Eclipse 3.2.0 and apache-tomcat-5.5.25
    Please Provide me a Solution......
    Thanks in Advance.....
    Regards,
    Suresh K

    Have got the same problem. Scenario at my end is little different though.
    I am trying to invoke a BPEL process from an ESB Service.
    I am trying to look into it..
    However, would be grateful, if someone can give some insight into this since many are running into this issue without being able to fix.
    Ashish.

Maybe you are looking for

  • "The attempt to burn a disc failed. The device failed to calibrate...."

    Using my "new" used 20inch-iMac G5, I just successfully burned my first music cd. Moments later, I tried (repeatedly, with a half-dozen different blank cds) to burn a second music cd, and got the following message each time: "The attempt to burn a di

  • Uninstall help needed. Cloud help needed

    Bought cloud Application manager wouldn't work. Was given link to CS6 Master Collection to download. At 91% install, it froze. Tried to uninstall using adobe CS cleaner tool so that I could try again. No good. Is there a way on UNinstalling CS6 folde

  • AD Connector 11.1.1.5 having a issue

    Hi, I am trying to configure AD connector it is giving following error. My environment is:- OIM 11.1.15 BP02. AD Connector - 11.1.1.5. When I installed it was success full when I am trying to provision any user it gives below error. ]] Root cause of

  • Growing PDF File Size is Pathetic

    Hey all, I have been using Acrobat for a number of years but ever since my organization updated me to v9, this growing file size is pathetic! If I move a button on a form, the file size grows 100k. If I add a field, the file size grows 100k. I starte

  • About the runtime repository?

    Hi, I'm confused by the runtime repository? what was stored in the runtime repository when i deployed a map to a location? i have two warehouse targets in my owb project.when i was deploying a map,a error occured. following was the error description: