Advantage of using Spring Context over Java Embedding

Hi ,
Is there any advantage of using Spring Context over Java Embedding?
--Steve                                                                                                                                                                               

Hi All,
Anybody can answer my question?
--steve                                                                                                                                                                                                           

Similar Messages

  • Advantages of using Bex WAD over Bex Query Designer?

    Can anyone tell me the advantages of using Bex WAD over Bex Query Designer?

    Hi Shiva,
    WAD has many advantages when compared with Query Designer. few of those are
    You can include Radio Buttons, Push Buttons, Check Boxs.....
    You can include more than one report in one WAD Report
    Completely u can make fancy as much as requried ....
    Many graphs  and chars are can be included .....
    data from Views can be viewed
    Many..many....

  • How to encrypt file on linux using Gnupg command in Java Embedding in BPEL.

    Hi All,
    I am trying to invoke a command script using the java embedding in BPEL Process.I am using the below code to execute the particular command to encrypt the file :-
    try {    
            Runtime rt = Runtime.getRuntime();    
    Process pr = rt.exec(new String[] {"/bin/bash", "-c", "/u01/GnuPG/bin/gpg", "-e", "-r", "Developer","/u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv"});    
             int exitVal = pr.waitFor();            
            String result = "SUCCESS: Process exit with " + exitVal;         
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    } catch(Exception e) {    
            e.printStackTrace();      
      String result = "FAILURE: Exception with " + e.toString();    
            addAuditTrailEntry("result = "+result);      
            setVariableData("outputVariable","payload","/client:processResponse/client:result",result);    
    The above statement does nothing. I am not sure what command i need to use to access to the command line.
    When i try this particular statement from linux machine command prompt :- /u01/GnuPG/bin/gpg -e  -r  Developer /u01/oracle/ConfigFiles/Adapter_controlDir/abc.csv
    It works absolutely fine and it creates the encrypted files also.
    Please suggest , which command i need to use from the java embedding.
    Please suggest!!
    Regards,
    Shah

    I think, you can try, writing these commands into a separate shell script and call that shell script from bpel via Java embedding. However, you might not get a return response.. but you can still give a shot.
    Hope it helps.

  • Add & use custom jars in "Java embedding" component

    I need to generate pdf file in process.
    So I included "Java embedding" component, and write my code. For clarity example:
    com.itextpdf.text.Document document = new com.itextpdf.text.Document( 
                        com.itextpdf.text.PageSize.A4, 50, 50, 50, 50); 
              try { 
                   com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter 
                             .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf")); 
                   document.open(); 
                   document.add(new com.itextpdf.text.Paragraph("This is test message")); 
                   catch (com.itextpdf.text.DocumentException de) { System.err.println(de.getMessage());  }
                   catch (Exception de) { System.err.println(de.getMessage());}
              document.close();Im using external jar file, of course I add it to classpath (right click soa project -> properties -> libraries and classpath ->add jar).
    But I get folowing error (no during compilation, but during deploying):
    Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "SimpleProcess" of composite "default/SOAProject!1.0*soa_9f8e80a4-346d-424e-9e12-1b69e2024e58"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    [04:35:23 PM] Check server log for more details.
    [04:35:23 PM] Error deploying archive sca_SOAProject_rev1.0.jar to soa_server1 [[fe80:0:0:0:5968:cb45:2001:f6ce]:8001] 
    [04:35:23 PM] ####  Deployment incomplete.  ####
    [04:35:23 PM] Error deploying archive file:/C:/Projects/SOAProject/deploy/sca_SOAProject_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)where ist the problem???
    Edited by: user1175491 on Nov 2, 2010 4:39 PM

    Ajaykumar, can u please write me what exactly append to bpel:exec part (which classes include?)? it looks now:
    <bpelx:exec name="GeneratePDF" version="1.5" language="java">
    <![CDATA[
                  com.itextpdf.text.Document document = new com.itextpdf.text.Document(  
                        com.itextpdf.text.PageSize.A4, 50, 50, 50, 50);  
              try {  
                   com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter  
                             .getInstance(document, new java.io.FileOutputStream("c:\\text.pdf"));  
                   document.open();  
                   document.add(new com.itextpdf.text.Paragraph("This is test message"));  
                   catch (com.itextpdf.text.DocumentException de) {System.err.println(de.getMessage());}
                   catch (java.lang.Exception de) {System.err.println(de.getMessage());}  
              document.close();]]>
    </bpelx:exec>Edited by: user1175491 on Nov 2, 2010 5:07 PM
    Edited by: user1175491 on Nov 2, 2010 5:08 PM

  • StackOverflowError using spring WS over JMS on Weblogic 9.2

    Hi,
    We are using Spring WS to poll a JMS queue fro new messages.
    On deployment this works fine. After some time however (e.g. if I leave the system running overnight), it starts to fail.
    (There are no requests going through the system in this time)
    This is running in a dev environemnt.
    The environment is running on Weblogic 9.2.1 on windows xp, and also on linux.
    We are using Spring 2.5.5, spring ws 1.5.2, jdk 1.5_06
    Has anybody seen this error?
    Is there something we should be doing to refresh the JMS connection ?
    Below is the stack trace.
    10:12:31 INFO [org.springframework.jms.listener.DefaultMessageListenerContainer
    ] - Successfully refreshed JMS Connection
    10:12:31 DEBUG [org.springframework.jndi.JndiTemplate] - Looking up JNDI object
    with name [java:comp/env/jms.queue.provisioning.request]
    10:12:36 INFO [org.springframework.jms.listener.DefaultMessageListenerContainer
    ] - Setup of JMS message listener invoker failed - trying to recover
    java.lang.StackOverflowError
    at java.lang.String.indexOf(String.java:1564)
    at java.lang.String.indexOf(String.java:1546)
    at weblogic.jndi.internal.AbstractURLContext.removeURL(AbstractURLContext.java:24)
    at weblogic.jndi.factories.java.javaURLContextFactory$JavaURLContext.rem
    oveURL(javaURLContextFactory.java:130)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.j
    ava:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
    ntextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.j
    ava:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyCo
    ntextWrapper.java:45)

    Doing some more investigation the initial cause seems to be TransactionRolledBackException
    2008-07-26 00:14:08,679 DEBUG org.springframework.jms.listener.DefaultMessageListenerContainer - Consumer [weblogic.jms.client.WLConsumerImpl@14f7bad] of session [weblogic.jms.client.WLSessionImpl@15015db] did not receive a message
    2008-07-26 00:14:08,696 INFO org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover
    weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-11D22EBAEF18F82704CC:error resuming transacted session's internal transaction
    at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:110)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)
    at weblogic.jms.client.JMSSession.receiveMessage(JMSSession.java:797)
    at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:579)
    at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:167)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:404)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:285)
    at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
    at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:874)
    at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
    at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:259)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Caused by: weblogic.jms.common.TransactionRolledBackException: Attempt to resume an inactive transaction: BEA1-11D22EBAEF18F82704CC:error resuming transacted session's internal transaction
    at weblogic.jms.frontend.FESession.transactedException(FESession.java:2024)
    at weblogic.jms.frontend.FESession.throwTransactedException(FESession.java:2039)
    at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2140)
    at weblogic.jms.frontend.FEConsumer.receive(FEConsumer.java:527)
    at weblogic.jms.frontend.FEConsumer.invoke(FEConsumer.java:780)
    at weblogic.messaging.dispatcher.Request.wrappedFiniteStateMachine(Request.java:759)
    at weblogic.messaging.dispatcher.DispatcherServerRef.invoke(DispatcherServerRef.java:276)
    at weblogic.messaging.dispatcher.DispatcherServerRef.handleRequest(DispatcherServerRef.java:141)
    at weblogic.messaging.dispatcher.DispatcherServerRef.access$000(DispatcherServerRef.java:36)
    at weblogic.messaging.dispatcher.DispatcherServerRef$2.run(DispatcherServerRef.java:113)
    ... 2 more
    Caused by: javax.transaction.InvalidTransactionException: Attempt to resume an inactive transaction: BEA1-11D22EBAEF18F82704CC
    at weblogic.transaction.internal.TransactionManagerImpl.resume(TransactionManagerImpl.java:360)
    at weblogic.transaction.internal.ServerTransactionManagerImpl.resume(ServerTransactionManagerImpl.java:356)
    at weblogic.jms.frontend.FESession.transactedInfect(FESession.java:2085)
    ... 9 more
    2008-07-26 00:14:08,709 INFO org.springframework.jms.listener.DefaultMessageListenerContainer - Successfully refreshed JMS Connection
    2008-07-26 00:14:08,713 DEBUG org.springframework.jndi.JndiTemplate - Looking up JNDI object with name [java:comp/env/meteor.jms.queue.provisioning.request]
    2008-07-26 00:14:13,758 INFO org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover
    java.lang.StackOverflowError
    at java.lang.String.indexOf(Ljava.lang.String;I)I(Unknown Source)
    at java.lang.String.indexOf(Ljava.lang.String;)I(Unknown Source)
    at weblogic.jndi.internal.AbstractURLContext.removeURL(AbstractURLContext.java:24)
    at weblogic.jndi.factories.java.javaURLContextFactory$JavaURLContext.removeURL(javaURLContextFactory.java:130)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
    at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
    at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)

  • How to use   spring context  in sca

    hi can anyone tell me how to use the spring context in bpel and how the functionality of spring context in service composite architecture(sca)

    Thanks Arun Pareek
    Hope u will also send me the link and tell me how to expose the bpel as webservice and how to connect the multiple bpel process with mediator.Sorry for troubling u much times (hope u don't mind ).
    If u don't mind in other way can i ask u r phone number as i need to talk with u ( if u don't mind only)and i will call to u only when u feel free.

  • Advantage of using SAP product over third party products

    Hi All,
    I want to know whether there is any advantage of creating SAP product over the third party products in SLD.And if we want to remove Product at later stage can we do that ?
    Thanks,
    Amit

    Hi Amit,
    Are you talking about creating an SAP product under SLD? For client developements it is suggested to create only 3rd party products in SLD for developing the interfaces.
    VJ

  • Advantages of using Oracle JVM over JPDA for Remote Debugging?

    What are the "additional features" that the documentation hints at when using the Oracle JVM for remote debugging vs. the JPDA protocoL? Can a member of the JDEV briefly address this? What exactly am I losing when using JPDA?

    I am not getting anywhere with 'NCOMPing' the stuff. Attempts to NCOMP keeps erroring out . The first of the errors is
    'Error while determining classes contained in jsch-1.29_minimalClassListAndTCD
    mper.java
    Exception oracle.aurora.sqljdecl.ParseException: Encountered "-" at line 14
    column 18.
    Was expecting one of:
    "extends" ...
    "implements" ...
    The following operations failed
    jsch-0.1.29_minimalClassListAndTCDumper.java: creation
    exiting : Failures occurred during processing
    Kuassi, I have looked at a few of your posts where you make mention of a file titled 'Settings_os.properties'. I see no such file in my Oracle installation. What am I missing here ?

  • Advantage of using SAP XI over webservices to interact with Biztalk

    HI everyone,
    We have biztalk as integration tool. I would like to know is it feasible to implement Biztalk with SAP XI to communicate with our SAP ECC server. I heard it will be over weight to use both Biztalk and SAP XI coz each will have its own message box and leads to more process time. So we are planning to use Biztalk with SAP webservices. So please let me know which is better as cost wise and work wise biztalk with SAP XI or Biztalk with SAP Web services.
    SAP Guys please take some time to provide some useful information. it will be much appreciated.
    cheers
    ram

    Ram,
    This is a contentious issue.
    In principle a middleware to middleware integration is against the basic ideas of EAI. We need to integrate applications and not middlewares, but in reality this is in most cases an inevitable situation.
    This blog discusses a similar middleware- middleware integartion ( XI and WebMethods) . Use the tips and tricks in this blogs to understand the issue you need to address , etc,
    /people/abhy.thomas/blog/2007/04/19/sap-xi--webmethods-integration-150-challenges-and-migration-strategies
    Regards
    Bhavesh

  • Encoding music video for Youtube - any advantage of using Pro (AME) over Elements?

    I am in the process of encoding some music videos for youtube.  I'm currently using Steve Grisetti's suggested settings from mid-2011 here:  http://forums.adobe.com/thread/623549
    What I'm wondering is if the Adobe Media Encoder provided with Premiere Pro (or another such program with more features than the Premiere Elements 7 encoder) would provide better results?   For example, I noticed those programs have options such as 256kbps audio, 2-pass, and Variable Bit Rate (which PE7 doesn't seem to have).  Would that provide better quality?  Of course, I need the very best audio possible. 
    Also, I've read from various other people's suggestions, that FLV is a better export choice than h264 since less recoding by Youtube is done- any truth to that?
    Lastly, would exporting to 1080 instead of 720 (and therefore giving youtube users the option of choosing either 1080 or 720) be better for the long term, or is there any reason why 720 is suggested?
    My videos are short and were edited from DVD vob files.  I've very new to encoding so really appreciate the suggestions!
    Thanks!

    I doubt that even a discerning ear to tell the original source Audio, after YouTube gets through Transcoding it for display. Also, viewers will be listening through their computer's speakers, and not a full home theater setup, where the Bit-Rate might make a slight difference. Also, most folk today, think that MP3's through ear-buds are "high fidelity."
    The only plus for using AME is that once you have queued the Project up, you can do other things, while it is processing the file.
    Good luck,
    Hunt

  • What is the advantage of using Wrapper Classes ?

    Hi friends,
    I am happy to join Java/J2EE tech. My project is scaled over the network. MVC-II struts, EJB based architecture, we are using.
    We are asked to use Wrapper Classes in in Java programs and not the primitive data types. I could not understand the reason.
    Pls tell me what is the advantage of using Wrapper Classes over the primitive data types ?
    means Integer instead of int, etc....

    Hi friends,
    I am happy to join Java/J2EE tech. My project is
    scaled over the network. MVC-II struts, EJB based
    architecture, we are using.
    We are asked to use Wrapper Classes in in Java
    programs and not the primitive data types. I could
    not understand the reason.
    Pls tell me what is the advantage of using Wrapper
    Classes over the primitive data types ?
    means Integer instead of int, etc....I am not sure why use Integer over int; but Wrapper classes are used to remove coupling between classes and create one hand doesn't know what the other hand does effect.
    for example:
    when you have a SFTP java package but doesn't do everything that your application needs to do in one step and you need to do sftp stuff at many places in your application, it would be wise not to use SFTP java package directly from all the classes that need to do sftp stuff. Because if you were to change the SFTP package later due to say some bug fix or newer version or ... you would have to go and modify all the classes that had sftp stuff to update.
    Instead you could write a custom sftp wrapper that handles all the sftp stuff for your application needs and that wrapper deals with the SFTP java package. So all the classes don't need to know which SFTP java package is being used only the custom-wrapper needs to know.

  • Regarding SOA Spring Context

    Hi guys,
    I am not aware of using Spring Context. Please suggest how to use it and in which context we use it and what are the required changes we have to make to work with it.

    Hi,
    The spring component in SOA could be used if you want to call a Java class in your service.Basically it would create a sessoin bean and call the java method. There are number of blogs that demonstrate how to use spring components. You could use this
    http://redstack.wordpress.com/2011/04/05/using-javaspring-components-in-soabpm-11g/
    Regards,
    Ajay

  • Java Embedding setVariableData not working - Urgent

    Hi Guys,
    I tried a simple HelloWord/Echo Kinda example, accessing input variable using getVariableData and assigning it to output variable using setVariable data in Java Embedding. It's throwing an error.
    JavaEnbedCode :
    String xmlData = ((oracle.xml.parser.v2.XMLElement) getVariableData("inputVariable","payload","/client:HelloJavaEmbedBPELProcessRequest/client:input")).getFirstChild().getNodeValue();
    setVariableData("outputVariable","payload","/client:HelloJavaEmbedBPELProcessResponse/client:result",xmlData);
    Imports:
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.rmi.RemoteException"/>
    <bpelx:exec import="javax.naming.NamingException"/>
    <bpelx:exec import="org.w3c.dom.Element"/>
    <bpelx:exec import="java.math.*"/>
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="java.net.*"/>
    Error:
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {}
    parts: {{summary=&lt;summary>XPath query string returns zero node.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity &amp;amp;lt;to&amp;amp;gt; part query should not return zero node.
    Please check the BPEL source at line number "" and verify the &amp;amp;lt;to&amp;amp;gt; part xpath query.
    &lt;/summary>
    </summary>
    </part></selectionFailure>
    I am using Jdev 10.1.3.3 and SOA Suite 10.1.3.3
    Thanks in adavance.

    I gave up trying to reference elements, especially those that are accessed through the input and output messages and leave that up to BPEL Assigns. So my inline Java looks like this and it works in 10.1.3.3.
    Hopefully the forum leaves enough of the formatting intact for you to get the idea.
    /*Write your java code below e.g.
         System.out.println("Hello, World");
    try{                                                              
    String in = (String)getVariableData("Input_Value");
    addAuditTrailEntry("You Entered: " + in);
    int InvalidCharsFound = 0;
    String ValidChars="0123456789.";
    String FilteredChars="$ ,";
    String TempChar="";
    String Tempstring="";
    int innum;
    double inval;
    innum=in.length();//get string length
    for (int i=0;i<innum;i++){         
    TempChar = in.substring(i,i+1);
    if (ValidChars.contains(TempChar)){         
    Tempstring+=TempChar;
    else {         
    if (FilteredChars.contains(TempChar)){   
    //filtered char was found
    addAuditTrailEntry("A filtered character was found such as: " + FilteredChars);
    else{   
    //invalid chars
    InvalidCharsFound = 1;
    addAuditTrailEntry("An invalid character was found");
    if (InvalidCharsFound == 0){  
    //clean number input was detected so proceed.
    inval = Double.valueOf(Tempstring).doubleValue();
    inval *= 100;//multiply by 100
    addAuditTrailEntry("Times 100 is: " + inval);
    double out = Math.rint(inval);
    addAuditTrailEntry("Rounded is: " + out);
    out /= 100;
    addAuditTrailEntry("Divided by 100 is: " + out);
    DecimalFormat myFormatter = new DecimalFormat("###.00");
    String output = myFormatter.format(out);
    addAuditTrailEntry("Formated is: " + output);
    setVariableData("Output_Value",output);
    else
    // The number input was not a good clean number
    setVariableData("Output_Value","ERROR the input was not a number");
    catch(Exception e){                                                                    
    addAuditTrailEntry(e);
    If you actually find this Java example that I made usefull keep in mind the Math.rint
    function incorrectly rounds 100.5 to 100 instead of 101. Or in other words with this program if you try to round 100.245 it will produce 100.24. This is not a problem for what I'm using it for as I'm simply trying to correct small inaccuracies found when adding 2 currency numbers using BPEL see Bug No. 6451541
    As far as the Math.rint "bug" I have found this same issue duscussed on the sun java forums and as far as I can tell someone who is mathematically brilliant (compared to me) decided that this was the correct way to round. I'm glad I'm not in school any more.
    Oh the complete BPEL source looks like this (I probably should have included this instead)
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Tue Sep 04 10:45:03 PDT 2007
    Author: RTaylor
    Purpose: Synchronous BPEL Process
    -->
    <process name="BPEL_Round_Currency"
    targetNamespace="http://xmlns.oracle.com/BPEL_Round_Currency"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:client="http://xmlns.oracle.com/BPEL_Round_Currency"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:BPEL_Round_Currency"
    myRole="BPEL_Round_CurrencyProvider"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="inputVariable"
    messageType="client:BPEL_Round_CurrencyRequestMessage"/>
    <variable name="outputVariable"
    messageType="client:BPEL_Round_CurrencyResponseMessage"/>
    <variable name="Input_Value" type="xsd:string"/>
    <variable name="Output_Value" type="xsd:string"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in BPEL_Round_Currency.wsdl) -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:BPEL_Round_Currency" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <assign name="Copy_Input">
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:BPEL_Round_CurrencyProcessRequest/client:input"/>
    <to variable="Input_Value"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:BPEL_Round_CurrencyProcessRequest/client:input"/>
    <to variable="Output_Value"/>
    </copy>
    </assign>
    <bpelx:exec import="java.text.DecimalFormat"/>
    <bpelx:exec name="Round_Output" language="java" version="1.3">
    <![CDATA[/*Write your java code below e.g.                                       
         System.out.println("Hello, World");                                      
    try{                                                              
       String in = (String)getVariableData("Input_Value");                                                                   
       addAuditTrailEntry("You Entered: " + in);  
       int InvalidCharsFound = 0;  
       String ValidChars="0123456789.";   
       String FilteredChars="$ ,";   
       String TempChar="";         
       String Tempstring="";         
       int innum;         
       double inval;         
       innum=in.length();//get string length         
       for (int i=0;i<innum;i++){         
              TempChar = in.substring(i,i+1);         
              if (ValidChars.contains(TempChar)){         
                  Tempstring+=TempChar;         
    else {         
    if (FilteredChars.contains(TempChar)){   
    //filtered char was found
    addAuditTrailEntry("A filtered character was found such as: " + FilteredChars);
    else{   
    //invalid chars
    InvalidCharsFound = 1;
    addAuditTrailEntry("An invalid character was found");
    if (InvalidCharsFound == 0){  
    //clean number input was detected so proceed.
    inval = Double.valueOf(Tempstring).doubleValue();
    inval *= 100;//multiply by 100
    addAuditTrailEntry("Times 100 is: " + inval);
    double out = Math.rint(inval);
    addAuditTrailEntry("Rounded is: " + out);
    out /= 100;
    addAuditTrailEntry("Divided by 100 is: " + out);
    DecimalFormat myFormatter = new DecimalFormat("###.00");
    String output = myFormatter.format(out);
    addAuditTrailEntry("Formated is: " + output);
    setVariableData("Output_Value",output);
    else
    // The number input was not a good clean number
    setVariableData("Output_Value","ERROR the input was not a number");
    catch(Exception e){                                                                    
    addAuditTrailEntry(e);
    }]]>
    </bpelx:exec>
    <assign name="Copy_Output">
    <copy>
    <from variable="Output_Value"/>
    <to variable="outputVariable" part="payload"
    query="/client:BPEL_Round_CurrencyProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client"
    portType="client:BPEL_Round_Currency" operation="process"
    variable="outputVariable"/>
    </sequence>
    </process>

  • Advantage of using SAP SRM

    Hi,
    Could any one please explain the advantages of using SAP SRM over MM module. As per me we can de most of the activities in MM except some vendor related activities (and that even if SUS is used).
    Thanks in advance.
    Regards,
    Lalit

    Hi Lalit,
    All advantages of using SRM and MM module is in Plan-Driven Procurement documentation on service.sap.com/instguides -> SRM.
    Generally planning in APO or MRP in an ERP system calculates the quantity and materials required. This requirement can be transffered to the EBP system. Requisitions from SAP Plant Maintanance or Project System are also possible requirements.
    The requisitions are passed to EBP. If the data is complete and unique, purchase orders can be created automatically. If the data is missing, the proffesional purchaser has to complete the missing information in Sourcing or via Process Purchase Orders. An option for the professional buyer is to assign un-sourced PO to an RFQ and send it out for bids.
    The proffesional purchaser completes the orders, assings source of supply, add or deletes item.
    Once the order is complete it is issued automatically to R/3. XML is the upcoming medium, since the data can be automatically integrated in more and more supplier's systes, or You can send orders by e-mail, fax or print them.
    Goods receipt is either done in EBP by supplier via an XML confirmation, by employee who requested the item by general goods recipient or in the backend system. Inventory is updated in backend.
    The invoice is processed in EBP manually by the requestor or an accountant submitted by the supplier via an XML invoice, possibly from SUS or backend system.
    You can also look in Self-Service Procurement documentation on:
    http://help.sap.com/saphelp_srm50/helpdata/en/8d/f6a93e08503614e10000000a114084/frameset.htm
    Regards,
    Marcin Gajewski
    Please assign points for useful answer.

  • What are the advantages of using firefox mobile

    I do not understand the advantage of using Firefox mobile over just clicking "internet" on my Android. Firefox mobile seems sluggish and slow. I would support it if I knew there was some sort of advantage. What might that be?

    Here is a list of some of the features you might like to try in mobile Firefox like add-ons, Firefox Sync, and more:
    http://www.mozilla.org/en-US/mobile/features/
    I'm sorry that it's sluggish on your Android device! We are working on making it faster in future versions.

Maybe you are looking for