How to prevent java mapping from reloading before each message?

Hi!!!
I've written a simple java mapping (XI 2.0): "Content Enricher" transformation
(source system doesn't send some key information required by target system).
It works fine.
Then I wanted to put some parametrization data into the database.
I added some code to load this data only once into my data structures in the memory.
I also works fine.
But the problem is that SAP XI uses MappingLoader/MappingResolver
to load jar file during transformation of every message.
In a such situation I lose all data and my code has to connect
to the database again (what is not good because of performance).
The question is:
how to configure SAP XI/where to put my code
to achieve a such behaviour: only once my code would load
parametrization from db and then "normal" java mapping could
use it during messages transformation without impact
on the performance?
Regards,
Andrzej Filusz

Hi!!!
Thanks for your answer, but I'm afraid that your solution: singleton pattern doesn't solve my problem.
When XI reload my java mapping classes, all loaded and kept data are lost. Singleton pattern can't prevent it.
I asked SAP about this problem: in XI 3.0 the classes will only be reloaded when a cache refresh has really taken place. But they won't implement this improved behaviour in XI 2.0.
Regards,
Andrzej Filusz

Similar Messages

  • I don't want to have to click the allow button every 3 seconds uploading video, how do I disable the "firefox prevented the page from reloading" when I've already put the site on my exceptions list?

    I begin uploading video to Facebook and a small window opens to show the progress bar but, the video stops uploading about every 5% when a notification comes from the top bar stating: "Firefox prevented the page from reloading" with an Allow button on the right. Regardless of clicking the allow button and putting Facebook in every exception list Firefox options seems to have or even turning pop up blockers off, that dam button keeps coming! How do I prevent or disable this?
    I am running windows XP media center edition SP2, and have Firefox v3.6.11

    You're welcome

  • When going to my hometown paper's site I get a dropdown banner that says Firefox has prevented this site from reloading ,but when I click on the allow button you have on the banner nothing happens so why is the button there?

    When I go to the local paper's from Elmira,NY and some other sites I get a drop down banner at the top of the page that tell me Firefox has prevented this page from reloading,but when I go to the allow button that you put on the right side of the banner and click on it the banner goes away and then it comes right back. It will come back every time you click allow until I click on the x box. So I want to know why is the allow button there if it does nothing?

    Click the Firefox button, go to Options | Options | Advanced and in the General tab, remove the checkmark from "'''Warn me when websites try to redirect or reload the page'''".
    You won't get that dropdown banner anymore afterwards.

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • How TO Use Java Mapping In XI

    Hi Experts,
    please help me ,
    How TO Use Java Mapping In XI?
    Thanks
    Mahesh

    Hi,
    Just refer the following links for java mapping:-
    1./people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
    2./people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    Regards,
    Ashwin M
    Reward if helpful

  • How to call Java Map in XSLT map

    Hello,
    Can anyone tell me how to call Java Map in XSLT map.
    Thanks and Regards
    Hemant

    Hello, Vijay,
    Can you help in understanding how can we pass whole payload in the parameter in XSLT map.....
    for eg
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:javamap="java:DATEandTIME.Date_Time">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:param name="inputparam" />
         <xsl:template match="/">
         <MT_TARGET>
              <date>
                   <xsl:if test="function-available('javamap:getDateValue')">
                       <xsl:value-of select="javamap:getDateValue($inputparam)"/>                    </xsl:if>
              </date>
              <time>
              <xsl:if test="function-available('javamap:getTimeValue')">
                       <xsl:value-of select="javamap:getTimeValue($inputparam)"/>                       <xsl:value-of select="$test"/>
              </xsl:if>
              </time>
              <project>
                        <xsl:value-of select= "//project"/>
              </project>
         </MT_TARGET>
         </xsl:template>
    </xsl:stylesheet>
    here we are passing static value in parameter.....
    Java code is:
                private static AbstractTrace trace = null;
                public static String getDateValue(Map inputparam)
                        trace = (AbstractTrace)inputparam.get(
                                 StreamTransformationConstants.MAPPING_TRACE );
                        Date now1 = new Date();
                        SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMd");
                        String dateString = formatter.format(now1);
                        return dateString;
                public static String getTimeValue(Map inputparam)
                            trace = (AbstractTrace)inputparam.get(
                                    StreamTransformationConstants.MAPPING_TRACE );
                            Date now1 = new Date();
                            SimpleDateFormat formatter = new SimpleDateFormat ("hhmmss");
                            String dateString1 = formatter.format(now1);
                            return dateString1;
    I want to pass whole payload so how can i pass it.

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • How to call java method from workflow script?

    Hi
    I have a requirement of updating field value 'Document Status' based on review/approve of content from Workflow and hence need to update the version number. For that I need to call my java method from workflow during submit of review/approve condition. Please let me know how to call java method from workflow?
    Is there any alternative better way to achive this requirement from workflow? Please suggest.
    Thanks,
    Sarang

    OK. So, I think we can all conclude that you don't need to call any Java method, can't we? And, that wfUpdateMetadata is the command that will update your metadata.
    Now, the question is what are its arguments. It has two - the first is the name of a custom metadata field to be updated (let's suppose that one field is called xMinorVersion, and the other xMajorVersion), the other is the new value, e.g. <$wfUpdateMetaData("xMinorVersion", "New value.")$>As for new value - do you insist on using strings? Since you want to increase the value, it would be more convenient to work with numbers. For instance, with integers you could go with <$wfUpdateMetaData("xMinorVersion", xMinorVersion + 1)$>With strings you will need to convert it to numbers and back to strings. Besides, what happens if you have more than 100 minor versions? (you mentioned you want to add 0.01, but that would finally increase the major version, wouldn't it?) So, I think these two numbers are independent (perhaps, with exception that increase on the major version set the minor version to .00).
    If you want to present it, you can use profiles that will construct for you the representation 2.304 out of MajorVersion = 2, MinorVersion = 304
    Solved?

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • How to call java implementations from C language

    How to call java implementations from C language....
    I know using JNI java can call C code....is the converse also possible????
    -Rams

    How to call java implementations from C language....
    I know using JNI java can call C code....is the
    converse also possible????Yes.

  • How to invoke java application from ABAP

    How to invoke java application from ABAP  ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
    Thanks,
    Manish

    Hi Manish,
    did you get some further documents concerning "abap program calls ejb"?
    If yes, could you please send me some informations.
    Thank you for your help.
    Kind regards, Patrick.

  • How do I stop apps from reloading every time I unlock my iPhone?

    How do I stop apps from reloading every time I unlock my iPhone? I have an iPhone 4 and at least 95% of the time I unlock it, some apps act as though they are reinstalling. It only lasts for about 3 seconds if that but it makes me feel like something is wrong with it. Does anyone else have this problem??

    jamiekat wrote:
    some apps act as though they are reinstalling.
    Could you explain what you mean by this? What is happening that makes you think they're reinstalling?

  • How to prevent a file from stripping?

    I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
    # $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
    # Maintainer: dale <[email protected]>
    pkgname=vacation
    pkgver=1.2.6.1
    pkgrel=1
    pkgdesc="an automatic mail-answering program"
    depends=(gdbm)
    url="http://www.tosn.org/projects/vacation/"
    source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
    build() {
    cd $startdir/src/$pkgname
    mkdir -p $startdir/pkg/usr/{bin,man/man1}
    # keeps binary from building
    rm -rf vacation
    # fixing the Makefile - not only for arch64
    sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
    sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
    mv vacation.man vacation.1
    make install
    These file have been created:
    [andyrtr@workstation64 vacation]$ ls -lRA pkg/
    pkg/:
    insgesamt 0
    drwxr-xr-x 4 andyrtr users 96 2006-01-28 09:32 usr
    pkg/usr:
    insgesamt 0
    drwxr-xr-x 2 andyrtr users 96 2006-01-28 09:32 bin
    drwxr-xr-x 3 andyrtr users 72 2006-01-28 09:32 man
    pkg/usr/bin:
    insgesamt 24
    -rwxr-xr-x 1 andyrtr users 16864 2006-01-28 09:32 vacation
    -rw------- 1 andyrtr users 470 2006-01-28 09:32 vaclook
    pkg/usr/man:
    insgesamt 0
    drwxr-xr-x 2 andyrtr users 48 2006-01-28 09:32 man1
    pkg/usr/man/man1:
    insgesamt 0
    [andyrtr@workstation64 vacation]$
    I get this error:
    ==> Starting build()...
    gcc -march=x86-64 -O2 -pipe  -Wall  -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
    install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
    install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
    strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
    install: strip fehlgeschlagen
    make: *** [install] Fehler 1
    ==> ERROR: Build Failed.  Aborting...
    Krusader detects it as a Perl program. Any idea?
    AndyRTR

    Posted: Sat Jan 28, 2006 8:45 am    Post subject: How to prevent a file from stripping?
    I'm building vacation for Arch64 but should be the same for 32bit. PKGBUILD looks like this:
    Code:
    # $Id: PKGBUILD,v 1.1 2004/01/21 15:43:15 dale Exp $
    # Maintainer: dale <[email protected]>
    pkgname=vacation
    pkgver=1.2.6.1
    pkgrel=1
    pkgdesc="an automatic mail-answering program"
    depends=(gdbm)
    url="http://www.tosn.org/projects/vacation/"
    source=(http://www.tosn.org/projects/vacation/files/$pkgname-$pkgver.tar.gz vacation.patch)
    build() {
       cd $startdir/src/$pkgname
            mkdir -p $startdir/pkg/usr/{bin,man/man1}
            # keeps binary from building
            rm -rf vacation
       # fixing the Makefile - not only for arch64
       sed -i -e 's: -m486::; s:CFLAGS.*= (.*):CFLAGS += 1:' $startdir/src/$pkgname/Makefile
       sed -i -e "s:/usr/bin:$startdir/pkg/usr/bin:g" $startdir/src/$pkgname/Makefile
       mv vacation.man vacation.1
       make install
    These file have been created:
    Code:
    [andyrtr@workstation64 vacation]$ ls -lRA pkg/
    pkg/:
    insgesamt 0
    drwxr-xr-x  4 andyrtr users 96 2006-01-28 09:32 usr
    pkg/usr:
    insgesamt 0
    drwxr-xr-x  2 andyrtr users 96 2006-01-28 09:32 bin
    drwxr-xr-x  3 andyrtr users 72 2006-01-28 09:32 man
    pkg/usr/bin:
    insgesamt 24
    -rwxr-xr-x  1 andyrtr users 16864 2006-01-28 09:32 vacation
    -rw-------  1 andyrtr users   470 2006-01-28 09:32 vaclook
    pkg/usr/man:
    insgesamt 0
    drwxr-xr-x  2 andyrtr users 48 2006-01-28 09:32 man1
    pkg/usr/man/man1:
    insgesamt 0
    [andyrtr@workstation64 vacation]$
    I get this error:
    ==> Starting build()...
    gcc -march=x86-64 -O2 -pipe -Wall -Xlinker -warn-common -D_PATH_VACATION="/var/abs/extra/system/vacation/pkg/usr/bin/vacation" -o vacation vacation.c -lgdbm
    install -s -m 755 vacation /var/abs/extra/system/vacation/pkg/usr/bin/vacation
    install -s -m 755 vaclook /var/abs/extra/system/vacation/pkg/usr/bin/vaclook
    strip: /var/abs/extra/system/vacation/pkg/usr/bin/vaclook: File format not recognized
    install: strip fehlgeschlagen
    make: *** [install] Fehler 1
    ==> ERROR: Build Failed. Aborting...
    Looks like its tring to install to /var/abs/extra/system/vacation/pkg/usr/bin....... ????
    try make DESTDIR=$startdir/pkg/usr install

  • HT1689 How do you keep pictures from reloading with every sync

    How do you keep pictures from reloading with every sync

    What do mean by reloading? Once you sync the photos to the iPad they should not sync again. Is that what you are seeing? The progress bar is showing that the photos are being transferred all over again?

Maybe you are looking for

  • Converting songs already on my computer to itunes...

    The day i got my ipod i started to convert all the songs on my computer to itunes, but it started storming so i had to shut the computer down. does anyone know how to get it started back converting the songs?

  • Is anyone experiencing itunes not opening up?

    HAS ANYONE EXPERIENCE TROUBLE OPENING ITUNES LATELY?  I DID THE UPDATE AND IT WILL NOT OPEN NOW. ANY HELP WILL BE GREAT!

  • Help on HTP.P in PL/

    I am using the following line of code in my PL/SQL procedure. htp.p('Link'); Actually the application is deplyed and running in Weblogic server. If I running the application normally it is displaying content of JSP file which contains Forward,BackWar

  • Cisco Prime Infrastructure 1.2 on Windows Server/Hyper-V

    Hi Everyone, In Entriprise environment while designing a BYOD solution we need to integrate ISE3315 with CPI 1.2. I know that Cisco ISE software either runs on 3315 platform or other option is virtual appliance (which is VMware based). Now problem is

  • Exported file size

    I've finished my first project in imovie 11. It' 8 minutes long. I've exported using quicktime, couple different settings. The files I'm getting are 80mb. I'm guessing this isn't right for uploading to website. I made a similar video couple years ago