How to use external Java API in Java Embedd inside BPEL

How to use external classes inside the BPEL in Java Embed Activity ? Any sample code availble ? Like i want to use log4j API inside BPEL.

No you dont have to change your startManagedServer.cmd/.sh everytime you need to have a Java Embedding activity. You only need it in case of using Log4J. As log4j requires a configuration xml viz log4j.debug.xml and log4j.dtd you need to let the soa managed server know about it. The best way to load this configuration files is using the JAVA_OPTIONS command during server startup.
Hope the explanation helps.

Similar Messages

  • How to use external java files into my project

    Hi all,
    I need your help to import my external java files in to my project.
    The files are in package folder.
    So how to tell the import command with the path of the folder.
    I read also that I can make a jar file and integrate it into the project.
    How can I make jar file.
    Best regards...

    there is one utility in j2se jar and check the option also
    put that jar file in lib folder of yr application folder
    [email protected]

  • How to use the Java embedding activity in BPel

    hi all,
    How to use the java embedding activity in BPEL
    pls can u provide sample example

    1 Use [Oracle BPEL Process Manager Client Java API Reference|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/overview-summary.html] and especially [com.collaxa.cube.engine.ext|http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/com/collaxa/cube/engine/ext/BaseBPELXExecLet.html]
    Instead of System.Out.println use addAuditTrailEntry(java.lang.String message)
    2. If you want to import a package write in code (Source View) of bpel process
    +<bpelx:exec import="package_name"/>+ for example +<bpelx:exec import="java.util.regex.Matcher"/>+
    example 1:
    String bodyAsString;
    StringBuffer myStringBuffer = new StringBuffer();
    try {
    bodyAsString = (String)getVariableData("BodyString");
    addAuditTrailEntry("bodyAsString1: "+ bodyAsString);
    Pattern pattern = Pattern.compile("goodDay");
    Matcher matcher= pattern.matcher(bodyAsString);
    while (matcher.find()) {   
    matcher.appendReplacement(myStringBuffer, "shitDay");
    matcher.appendTail(myStringBuffer);
    bodyAsString = myStringBuffer.toString();
    addAuditTrailEntry("bodyAsString2: "+ bodyAsString);
    } catch (Exception ex) {
    addAuditTrailEntry("Failed+bodyAsString",ex.getMessage());
    I put in code (Source View) the following
    <bpelx:exec import="java.util.regex.Matcher"/>
    <bpelx:exec import="java.util.regex.Pattern"/>
    example2:
    Object temp;
    try {
    temp = ((XMLElement)getVariableData("inputVariable","payload","/ns2:FiscalisMessage/ns2:Body")).getChildNodes().item(1);
    setVariableData("AdjReceipt",temp);
    addAuditTrailEntry("ok",temp.toString());
    catch (Exception ex) {
    addAuditTrailEntry("Failed :",ex);
    I put in code (Source View) the following
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • How to use external jars in NW2004

    Hello Experts,
    can i use the same approach mentioned in the below Weblog for using the external jars in NW2004.
    /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
    and if not then what will be the best way to achieve it in  NW2004.
    Please provide your inputs on above.
    Regards,
    Siddharth

    Hi Sidharth,
    If you are using web dynpro DC perspective then you need to follow the following points to use the external jar files in it.
    1. Create a external library project.
    2. copy the external jars in the library folder os the projects.
    3.) Select all the jars from the u201CLibrariesu201D folder, Right click and then select Development Component and click on Add to Public Part
    4.Select the first Radio Button (Provides an API)and give some nameto it.
    5. Repeat the step no 3 but now select the second radio button other than as selected in step no 4.
    6. Now build your lirary DC.
    7. Now create a j2ee DC project.
    8. ) Expand the node DC Definition and Right Click on Used DC. Select Add Used DC.
    9. Select the External Library DC with build time dependency.
    10.Right click on the J2EE DC and then select Development Component followed by Build
    11. Right click on the J2EE DC and then select Development Component followed by Deploy
    now you can use both the libary DC and the j2ee DC in your web dynpro DC as used DC.
    But if you have created a web dynpro project only(but not DC) than you can directly add the external jars in java build path
    hope this will help
    regards
    Narendra
    Edited by: Narendra Singh on Oct 27, 2009 11:22 AM

  • How to use external hard drive and iTunes together?

    how to use external hard drive and iTunes together?

    Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...

  • How to use external library(in .jar format) in netbeans project?

    How to use external library(in .jar format) in netbeans project?
    Thanks!

    How to use external library(in .jar format) in netbeans project?
    Thanks!

  • How to use External Tables

    Hi, I want to know how to use external tables? The procedure i follow for SQL*Loader in my shell script is:
    Call the sqlldr
    Check return code
    If return code = 2. get count of records from bad file and exit.
    If return code != 0 and != 2 then exit as fatal error
    If return code = 0 then continue.
    But i don't understand how to use external table as it is not invoked and does not have a return code.

    Hello,
    What do you mean alogrithim, do you mean to invoke external table as you invoke sqlldr? You can generate external table script from sqlldr and use it to load data but you might have to modify the table name and datafile name . You can see if any bad file generated from sqlldr and if yes then you can generate external table (using sqlldr) or based on your bad file. May be if you can list what exactly you want in bullet points, then it will be easier to suggest you.
    Regards

  • How to use the java native api

    i am new to the java native api, can anyone tell me how to use it in order for me to use the c++ file in the java file?please explain it if possible, thanks

    Try this out to learn the basics :
    http://java.sun.com/docs/books/tutorial/native1.1/index.html
    You can't go wrong from there.

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • How to use a Java Resource in my java source

    Hello,
    I need to know how to use my external JAR I loaded in the database using this line below:
    CREATE OR REPLACE JAVA RESOURCE NAMED "MyJar" USING BFILE (BFILE_DIR,'MyExternal.jar');
    In fact, I have a Java file using this JAR, but I do not know how to tell to the java source that it have to use this JAR.
    ==========Java Source importing the Jar===================
    package com.gemalto.ws.snmp;
    import java.io.IOException;
    import java.util.Vector;
    import org.snmp4j.Snmp;
    import org.snmp4j.smi.*;
    import org.snmp4j.TransportMapping;
    import org.snmp4j.transport.DefaultUdpTransportMapping;
    import org.snmp4j.CommunityTarget;
    import org.snmp4j.mp.SnmpConstants;
    import org.snmp4j.PDU;
    import org.snmp4j.event.ResponseEvent;
    public class SNMPAgent
    ==========================
    Could you give the SQL request or loadjava command line permitting to do use my java resource file?
    Thks

    The JAR is already load by using CREATE JAVA RESOURCE ... or "loadjava -resolve –force -user p/p@SID –genmissing -jarasresource MyJar.jar"
    If we can create a resource by SQL or loadjava, how can I use it in my java code?
    Edited by: 847873 on 28 mars 2011 06:05
    Edited by: 847873 on 28 mars 2011 06:07

  • Using External java within web dynpro DC

    Hi
    I'm new in web dynpro and I'm facing a problem.
    I'm doing a web dynpro DC application and I want to use some external java classes I have created into my DC. But I don't really know how to do it, I tried EJB but I don't exactly how it works.
    by the way, I was using a stand along web dynpro before and this worked fine, I just needed to create a package within my web dynpro project with all my class architecture to have them directly. but now with the DC stuff, it's not the same at all. so please help
    thanks

    Hi
    Better you create a Java Development component and add all your java classes to that DC and build it.
    Create a webdynpro DC to develop front end and add the java DC in used DC's of your Webdynpro DC.
    This is the way you can use the java classes effectively with out redundancy.
    If you create a package inside a normal webdynpro project, then you can not reuse them later in other webdynpro proj
    Go with SAP component model by creating 2 development components one for java and other for webdynpro and define the reusability (Used DC's) in DC Metadata.
    Regards
    Kalyan

  • Setting bpel variable using external java code

    Hi all
    I would like to ask if there is a way to set bpel process variable during process execution from external java code using java api without using java embedding code?!!
    Thnx in advance

    Hi, I wanna to know if it is possible at all to edit/update value of variables in a process instance via external java code?
    In fact I don't believe that we can set a variable remotely using java APIs.Am I right?
    For example,is it possible to change the value of a field in the user task form(that is sent to a user to fill and complete the task)?

  • How to use a Java Resource??

    Hello,
    I need to know how to use my external JAR I loaded in the database (hosted in Oracle 10.2.04) using this line below:
    CREATE OR REPLACE JAVA RESOURCE NAMED "MyJar" USING BFILE (BFILE_DIR,'MyExternal.jar');
    In fact, I have a Java file using this JAR, but I do not know how to tell to the java source that it have to use this JAR.
    ==========Java Source importing the Jar===================
    package com.gemalto.ws.snmp;
    import java.io.IOException;
    import java.util.Vector;
    import org.snmp4j.Snmp;
    import org.snmp4j.smi.*;
    import org.snmp4j.TransportMapping;
    import org.snmp4j.transport.DefaultUdpTransportMapping;
    import org.snmp4j.CommunityTarget;
    import org.snmp4j.mp.SnmpConstants;
    import org.snmp4j.PDU;
    import org.snmp4j.event.ResponseEvent;
    public class SNMPAgent
    ==========================
    Could you give the SQL request or loadjava command line permitting to do use my java resource file?
    Thks

    Hi,
    I think you should not load the jar as java resource.
    And I think there is no need to tell to the java source that it have to use the JAR. It will automatically look for the library.
    You should load the jar file using the loadjava utility.
    If it can helps, here is how I proceed :
    /* LOAD .JAR FILE */
    loadjava -user your_user/password@host -resolve -verbose -nodefiner C:\jdevstudio1013\jdev\lib\your_lib.jar
    /* LOAD PROGRAM */
    loadjava -user your_user/password@host -resolve -verbose -nodefiner C:\jdevstudio1013\jdev\mywork\your_program.java
    /* CREATE THE PL/SQL FUNCTION */
    create or replace procedure your_function(arg1 in varchar2, arg2 in varchar2) authid current_user as
    language java name 'your_program.your_function(java.lang.String, java.lang.String)';
    /* EXECUTE */
    select your_function('hello','world') from dual;

  • How to use another java program to stop this running prpgram???

    Dear Sir:
    I have following code and I run it success,
    import java.util.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    public class CertainAndRepeatTime{
      public static void main(String[] args) throws IOException{
        int delay = 1;
        Timer timer = new Timer();
        ActionListener actionListener = new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
              System.out.println("Hello World Timer");
        System.out.println("What do you want (Certain time or Repeat time)?");
        System.out.print("Please enter \'C\' or \'R\' for that: ");
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ans = in.readLine();
        System.out.print("Please enter  ans=" + ans  + " IsTrue=  " + (ans.equals("R") || ans.equals("r")) +"\n");
        if (ans.equals("C") || ans.equals("c")){
          //System.out.println("This line is printed only once start...");
          timer.schedule(new TimerTask(){
            public void run(){
              System.out.println("This line is printed only once.");
          },delay,1);
        else if(ans.equals("r") || ans.equals("R")){
            timer.scheduleAtFixedRate(new TimerTask(){
              public void run(){
                System.out.println("This line is printed repeatedly.");
            },delay, 1000);
          while(true){
               //System.out.println("Charles print This line is printed repeatedly.");          
          } //This will make your main thread hang.
        else{
          System.out.println("Invalid Entry.");
          System.exit(0);
        System.exit(0);
    }But I hope to use another java program to stop it when it is running instead of pressing CRTL + C to stop it.
    How to do it??
    Any example??
    Thanks a lot!!

    Sorry, I think i did not express cearly. It is my fault.
    I re-write my requirements again:
    I have
    Class AAA1.java,
    Class AAA2.java,
    Class AAA3.java,
    Class AAA20.java...
    etc
    they all look like the program I posted first time,, once executed, they will run for ever, and they will be stopped until I press CRTL + C;
    Now I hope to use another java class StopProgram.java to stop them 1 by 1 or at once instead of pressing CRTL + C;
    In this case, how to code this StopProgram.java ??
    Thanks

Maybe you are looking for

  • ICal on a second user account won't work

    I recently purchased a new iMac with OS Lion. Software is fully updated.  Using the Time Machine copy from my laptop, I basically cloned my laptop to this computer. All my services work fine.  I set up a new user account for my wife. We are not able

  • Mac os 10.4

    which is the best phone that works with mac os 10.4 and that can be used as a external modem to navigate on internet? thanks

  • Just a thought on Creative

    Hello Creative customers and mainly addressed Creative employees, I can notice that there is a huge problem with you and windows 7. On most of general help guidelines many times you go only up to windows XP. Somehow Win95 is included but Vista or 7 a

  • IOS 8.0.1 Has Been Pulled by Apple

    Due to the stuck at "No Service" and breaking of Touch ID, Apple pulled the iOS 8.0.1 update from the update servers - it is no longer available. I wonder how quickly they are going to be able to come out with an iOS 8.0.2 and fix all these phones th

  • Making High Res YouTube videos from Keynote

    Using the "export" function, how can I make high-resolution videos to take advantate of YouTube's better resolution functionality? I'm baffled by all the options and settings and don't know which setting to use to be able to upload the right video fo