Sender jms adapter-archiving before processing the message

Hi,
Do we have any option in Sender JMS adapter to archive the message before processing the message?
I have searched in sender JMS adapter (XI7.0) settings, but couldn't find any option.
My assumption is whether any option provided in configuration setting of adapter engine or any other alternatives.
Thanks,
Srini.

Hi Srini.
Here is the code. But you may prefer the EAR module, just for deploy. I need your email to send it to you.
If you want to create it yourself follow the steps in this guide and paste the code:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
When you configure the module in the JMS sender communication channel you have to spedify 2 parameter for the log file location:
"file.path" (XI server file system path) and "file.name"
CODE:
package com.bfa.af.modules;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import javax.ejb.CreateException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.sap.aii.af.mp.module.Module;
import com.sap.aii.af.mp.module.ModuleContext;
import com.sap.aii.af.mp.module.ModuleData;
import com.sap.aii.af.mp.module.ModuleException;
import com.sap.aii.af.ra.ms.api.Message;
@author ibermatica
public class BFATraceModule implements SessionBean, Module {
     private SessionContext myContext;
     public void ejbRemove() {
     public void ejbActivate() {
     public void ejbPassivate() {
     public void setSessionContext(SessionContext context) {
          myContext = context;
     public void ejbCreate() throws CreateException {
     public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData) throws ModuleException
          FileWriter outFile;
          try
               Date date = new Date();
               String filePath = moduleContext.getContextData("file.path");
               String fileName = moduleContext.getContextData("file.name");
               outFile = new FileWriter(filePath + System.getProperty("file.separator") + fileName, true);
          catch (IOException e)
               e.printStackTrace();
               throw new ModuleException(e);
          PrintWriter out = new PrintWriter(outFile, true);
          try
               out.println("--- Start of message ---");
               //Get message content.
               Message data = (Message)inputModuleData.getPrincipalData();
               if(data.getDocument() != null)
                    out.println(data.getDocument().getText());
               else
                    out.println("Empty message.");
               out.println("--- End of message ---");
               out.println("Total characters: " + data.getDocument().getText().length());
          catch(Exception exc)
               out.println(exc.toString());
          finally
               if(out != null)
                    out.close();     
               if(outFile != null)
                    try {
                         outFile.close();
                    } catch (IOException e1) {
                         throw new ModuleException(e1);
          return inputModuleData;

Similar Messages

  • If UseMessageListener in JMS adapter set True, causing the message state 0

    We have a multi node SOA 10g deployed. If we have a UseMessageListener=True, the state of the message is not changing from 0 to 2. Even though the message was consumed.
    Same, configuration works fine in lower environment with single node.
    When we changed UseMessageListener= false, message state started getting changed even in multi node architecture.
    One more difference that we have in multinode and single node environment, is that we are having isTransacted mcf property value as false. Where as in single node is Transacted is true.
    Can some one explain some reasoning behind such behavior?
    What is the significance of UseMessageListener?

    Hi Tarak,
    The behaviour looks acceptable for me... Topics are different than queues, if you publish a message to a queue and there is no suitable consumer at that moment the message will remain in the queue... But for a topic, looks acceptable for me to say that if you publish a message and there was no suitable subscriber at the moment the message can be discarded... The message was checked for all durable subscribers and there was no one to able to pick it up... So it can be safely discarded... If later you change your durable subscriber to a situation on what the previous message could be picked up, that may be too late... Nevertheless, that's a very particular case and may vary according to implementation...
    May you can confirm the behaviour by checking the messages assigned to a durable subscriber... When you publish a message that doesn't match the selector, will the message even be listed at all?
    http://docs.oracle.com/cd/E23943_01/apirefs.1111/e13952/taskhelp/jms_modules/topics/ManageDurableSubscribers.html
    Hope this helps...
    Cheers,
    Vlad

  • Sender JMS Adapter error: The JMS provider gave the error message as Not permitted, and the error code is null

    I am trying to connect tibcoems with PI using a Sender jms adapter.After successfully installing the drivers , the sender adapter goes into error.
    "The JMS Provider gave the error message as Not permitted, and the error code is null"
    The Transport protocol is 'Access JMS Provider with JNDI' and i have been given the required parameters from the tibco guys.
    Your input are highly appreciated.
    Shyam

    Hi AQmit,
    Thanks for the reply.
    Please find the screenshots of what i am trying to do.
    Also, Can u direct me how to check the right logs?

  • FTP sender adapter wait sometime before processing a message

    Hi,
    I want my FTP sender adapter to wait sometime before processing a message. This is needed in my case since the receiver of the message cannot consume message in, say two seconds, so I would like to configure a "time to wait before processing message" in PI since PI processes all of the files in folder without waiting another poll interval time if more than one exist.
    Is this possible in PI 7.0 sp16? 
    Regards,

    HI Tarik
    BPM is the solution for this problem. If you are not willing to use BPM other solutions are  Adapter module and Scripts
    You can write adapter module and use the threads mechanism. Thread.sleep can help you achieve this but you need to set this properly.
    Another method is Unix script. Let your actual directory be Dir1 and poll PI to Dir2. Use the script to write files from Dir1 to Dir2 one by one and with time gap. This will work for you.
    If you have PI system on Windows i prefer to go with Adapter module.
    Thanks
    Gaurav

  • How to hanlde breaked large messages in sender JMS adapter

    Hi,
    I have been asked like 'how can we handle breaked large messages in sender JMS adapter?'and lets say I am getting some messages as it is and some are breaked into small segements for the mesaages that are large....
    do we need to use module,if so is there any standard module that we can use to hanlde this type of scenarios?
    thank you in advance.
    babu

    http://biemond.blogspot.com/2009/10/jms-request-reply-interaction-pattern.html
    if you check the blog of edwin, see his comments at the bottom
    there he gives a suggestion how to add the selector properties to filter on
    and this one is maybe helpfull
    http://blogs.oracle.com/adapters/2010/05/configuring_request-reply_in_jmsadapter.html

  • JDBC Sender channel not processing the messages

    Hello,
        From yesterday onwards JDBC Sender channel not processing the messages. In CC monitoring it is showing in Green Led and status is functioning. Cahnnel is polling for messages to DB server as per polling interval. But it is not processing the msg's. Under Processing detials for cluster node it is showing only "Processing Started" for each polling interval.
    I have done the check in DB server by executing the query in the channel, whether there are any records are exisitng or not. There are 1000+ records.
    Previously the parameter "Disconnect from DB after processing each message" was not set. I have set the parameter and activated in Productiion. Still the messages are not processing by channel
    What was the problem? How to rectify with this.
    Cheers
    Veera

    Check in the Visual Admin >Cluster> "LOCKING ADAPTER"
    we get a option of Display Locks .Check for an entry with
    NAME : $XIDBAD.JDBC2XI
    reset the locks and restart the CC ,now it works fine.
    Note 1083488 - XI FTP/JDBC sender channel stop polling indefinitely(04/04S)

  • Problem with special character like u00E5,u00E4 u00F6 in Sender JMS Adapter

    Hi,
    Problem:
    Sender JMS Adapter has transformation error when the file includes western european characters such as å,ä ö. And because of this reason the data is not picked up by adapter.
    The scenrio is JMS --- > XI ---> Proxy.
    If the file does not include the western European characters then it is working fine, but when the file include the western european characters such as å, ä, ö so got the error.
    Our Efforts:
    We have tried ISO8859-1 in JMS Module Tab as shown below.
    1. Transfer.ContentType text/xml;charset=ISO-8859-1
        AND with this also
    2. Transfer.ContentType application/coctet-stream;charset=ISO-8859-1
    None of them working.
    Error In CC:
    In Sender CC monitoring we are getting the below error.
    Error while processing message 'aa157082-b064-4421-0fc3-c286d2732093'; detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Error converting Message: sun.io.MalformedInputException: TransformException: Error converting Message: 'sun.io.MalformedInputException' at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java(Compiled Code)) ...
    Any suggestion in this regard will be a great help.
    Regards,
    Sarvesh

    > I think you have to figure out first, which codepage you really have, not just try. Maybe you ask someone or you check with a hex editor.
    Hi Stefan,
    Finally we solved the problem.
    As you said above to figure the the codepage, we asked to our MQ team for the same and found that they are using ISO-8859-1. In XI we were also trying with multiple conbinations (ISO-8859-1, UTF-8 and many more), but didn't get any success.
    Finally MQ team changed their encoding to UTF-8 and in XI we used ISO-8859-1 and we get the success in picking the data with spl char. Even though in XI the spl char comes in destorted order but at the receiver end they are in proper shape.
    Thanks a lot for your help.
    Regards,
    Sarvesh

  • Sender JMS Adapter - NOT Working

    Hello Everybody - We are on SP13, also installed JMS Driver files on the system. We are running, Central Adapter Engine.
    We configured the Sender JMS Adapter for WBI MQ->XI->SAP scenario. We need to JMS Adapter to be configured to connect to WBI from XI. Everything looks great in configuration but in the Adpater Monitoring, JMS Adapter is with Error Status and Message says "Sender channel. Details: (No detail information set.)".
    Does anybody has any idea about this error ?
    I checked SAP Help link as well on this. Based on this link http://help.sap.com/saphelp_nw04/helpdata/en/ca/e7673c86d19b35e10000000a11402f/frameset.htm. Do we need to configure this JMS Adapter somewhere on teh server as well ? If yes, then where ? Pls respond if you have any clue about it.
    Thanks in anticipation...

    Hello Stefan - Thanks for response.
    Here are the Parameters.......
    Adapter Type: JMS
    Sender Type Clicked
    Transport protocol:WebSphereMQ (non-JMS)
    Message protocol:JMS 1.x
    Adapter Engine:Integration Server
    Queue ConnectionFactory Java Class:com.ibm.mq.jms.MQQueueConnectionFactory
    Queue Java Class:com.ibm.mq.jms.MQQueue
    IP Address or Server Name:10.9.48.154
    Server Port:1414
    Queue Manager Name:WBIDEV
    Channel Name:WBI.XI.SVRCONN
    JMS Queue:XI_REQUEST
    Transport/Network Protocol:TCP/IP
    JMS-Compliant:JMS-Compliant
    Transactional JMS Session:Check box Set
    JMS Queue User:XIUSER
    JMS Queue Password:********
    Set XI message ID(MessageID) to:GUID(recommended value)
    Set XI cenversation ID(conversationID) to:No value
    Mapping of Message:Message Payload=JMS Payload
    Quality of Service:Exactly Once
    Time Period for duplicate check for EO(IO)(secs):86400
    Wait After Message Error(msecs):1000
    Wait before Reconnect(msecs):1000
    Status:Active
    The Error Message I see in the Adapter Monitor is "Sender Channel. Details: (No detail information set.)
    Pls advice If I am missing anything ?
    Thanks....
    Amrish.

  • Sender JMS Adapter does not work

    Hi all,
    We have created a sender JMS adapter with transport protocol "Access JMS Provider with JNDI". The adapter connects to destination successfully, so the connection parameters are right. However, we do not receive any message when the sender sends them.
    What parameters should we set to be able to retrieve messages from the queue?
    Thanks in advance,
    Samantha.

    Hi,
    Into Communication Channel Monitoring, we get the following errors:
    1. Error occurred while processing message: null. Detailed error (if any): java.lang.NullPointerException: at java.text.MessageFormat.applyPattern(MessageFormat.java:414) ...
    2. Added dynamic header: DCJMSMessageSelector to XI message null which corresponds to JMS message selector: mentioned in the channel configuration
    3. XI message ID corresponding to the JMS message with ID: ID:1109F6E3DF541328-00000000053E as stripped of the "ID:" marker and now has the value: null
    4. XI message ID corresponding to JMS message with ID: ID:1109F6E3DF541328-00000000053E will be created with the value of JMSCorrelationID which has the value: null
    Where is the problem?
    Thanks again,
    Samantha.

  • Sender JMS Adapter

    Hi,
    I am using a sender JMS adapter. Transport Protocol i have given as "Access JMS Provider with JNDI".
    In the field "JNDI Server Address" i have to give the server:port.
    Here i am not sure which port to give.
    Is it the P4 port i.e. 5XX04 or the J2EE port on which the WAS listens i.e. 5XX00.
    Please advise.
    Regards
    Sidharth

    Hello Stefan - Thanks for response.
    Here are the Parameters.......
    Adapter Type: JMS
    Sender Type Clicked
    Transport protocol:WebSphereMQ (non-JMS)
    Message protocol:JMS 1.x
    Adapter Engine:Integration Server
    Queue ConnectionFactory Java Class:com.ibm.mq.jms.MQQueueConnectionFactory
    Queue Java Class:com.ibm.mq.jms.MQQueue
    IP Address or Server Name:10.9.48.154
    Server Port:1414
    Queue Manager Name:WBIDEV
    Channel Name:WBI.XI.SVRCONN
    JMS Queue:XI_REQUEST
    Transport/Network Protocol:TCP/IP
    JMS-Compliant:JMS-Compliant
    Transactional JMS Session:Check box Set
    JMS Queue User:XIUSER
    JMS Queue Password:********
    Set XI message ID(MessageID) to:GUID(recommended value)
    Set XI cenversation ID(conversationID) to:No value
    Mapping of Message:Message Payload=JMS Payload
    Quality of Service:Exactly Once
    Time Period for duplicate check for EO(IO)(secs):86400
    Wait After Message Error(msecs):1000
    Wait before Reconnect(msecs):1000
    Status:Active
    The Error Message I see in the Adapter Monitor is "Sender Channel. Details: (No detail information set.)
    Pls advice If I am missing anything ?
    Thanks....
    Amrish.

  • MessageTransformBean in sender JMS Adapter flat file to xml conversion

    Hi All,
    The scenario is MQ (Flat File )  --->PI -
    >Idoc
    The flat file structure is
    112233
    AABBCC
    The expected XML Structure after using MessageTransformBean in the sender JMS adapter  is
    <Record>
    <Row>
    <f1>11</f1>
    <f2>22</f2>
    <f3>33</f3>
    </Row>
    <Row>
    <f1>AA</f1>
    <f2>BB</f2>
    <f3>CC</f3>
    </Row>
    </Record>
    But I am getting 2 SEPARATE xml messages each with only one Row in it like the following
    1st XML:
    <Record>
    <Row>
    <f1>11</f1>
    <f2>22</f2>
    <f3>33</f3>
    </Row>
    </Record>
    2nd XML:
    <Record>
    <Row>
    <f1>AA</f1>
    <f2>BB</f2>
    <f3>CC</f3>
    </Row>
    </Record>
    I would like to have one xml message with all rows in it.It seems the MessageTransformBean is not recognizing the end of line in the flat file.Do i need to use endSeparator explicitly.
    I followed the "How to use Content Conversion in JMS Adapter " and configured the adapter,still no luck..
    Any Help greatly Appreciated
    Thanks,
    C

    Hi Chirag,
    The parameter name sequence changes alphabetically by itself when I save and activate it eventhough I enter as it is in the document.How to stop changing this sequence or put it the order as required in the Module Processor.
    Currently my sequence is
    Transform.Class
    Transform.ContentType
    xml.conversionType
    xml.documentName
    xml.documentNamespace
    xml.fieldFixedLengths
    xml.fieldNames
    xml.processFieldNames
    xml.structureTitle
    Let me know how to change the sequence ,if that is the issue.
    Thanks,
    C

  • Change of Encoding in Sender JMS Adapter

    Hi,
       My scenario is like that:-
    FTP->MQ Queue->JMS Queue->XI->R/3
    From JMS Queue IDOC xml is coming in UTF-8 encoding to XI. In that IDOC xml certain special characters are there, say, some Latin or European character. But for the scenario XI->R/3, data are not getting posted to R/3. In XI side, it is not giving any error, but it is giving a flag (in QRFC Monitor) which is “ Error between two Character Sets”.
    I am unable to rectify this error. One solution I have guessed that is, it will be possible to resolve this issue if I can change the encoding in XI to ISO-8859-1. But I don’t know how to change the encoding in Sender JMS Adapter in XI. Could you please help me to resolve this issue?
    BR
    Soumya B

    Hi,
    Check following:
    1. In SXMB_MONI, what is the XML structure generated for inbound and outbound message. Check the encoding used in both. This could be checked by looking at the first line of XML generated. For UTF encoding, usually, the first line should look as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    2. If the encoding for both is different, try to figure out which encoding is used for Message Type in XI. For matching the encodings, you could change the XSD used for creating message type in XI. This way, the character encoding could be changed. And this solution should suffice if the problem has occured between XI to R3 scenario.
    Also, for learning more about character encodings, you could visit following link:
    http://www.cs.tut.fi/~jkorpela/chars.html
    Hope it helps.
    Bhavish.
    Reward points if comments found useful:-)

  • Sender JMS adapter configuration for IBM MQSeries

    Dear All,
    i am doing a IBM MQSeries 5.2.x Message ->sender JMS adapter -> XI server -> receiver RFC adapter -> R/3.
    i have deployed the JMS adapter with the required jar files of IBM MQSeries 5.2.x in XI server.
    in Sender JMS adapter configuration for IBM MQSeries 5.2.x, i have put following data:
    1. Transport Protocol: Websphere MQ - is it okay?
    in JMS provider settings:
    2. in channel name - what should be there?
    3. Transport Network protocol should be TCP/IP or WebsphereMQ - how to decide this thing.
    4. JMS Complaint - whether WebsphereMQ or JMS API.
    in JMS Settings:
    5. JMS Queue user - is this IBM MQSeries 5.2.x Queue User or someother user?
    6. JMS Message Selector - what data to take here.
    So if anybody has connected IBM MQSeries 5.2.x to XI via JMS adapter, please answer my above queries.
    Regards,
    Rajeev Gupta

    Hi Swaroop,
    you can send me those documents at my gmail-id : [email protected]
    Hi All,
    one more question - to connect XI server to IBM MQSeries via JMS adapter in ID, do we need to have a MQSeries Client installed on XI server - or - just by configuring JMS adapter, we can send messages from IBM MQSeries to XI server without any MQSeries client on XI server?
    Why Channel name is required in JMS configuration data?
    Thanks,
    Rajeev Gupta

  • Sender JMS Adapter with EOIO Quality of Service

    Hi,
    I have a sender JMS adapter with a quality of service as EOIO. In the SAP help it says that I need to specify the "Processing J2EE Cluster Server (Cluster ID)". Just wondering how I get this value? Does anyone have an example?
    Thanks,
    Krishneel

    Hi,
    Please go through the bleow Wiki:
    http://wiki.sdn.sap.com/wiki/display/XI/FAQ+J2EEJMS+Adapter
    http://help.sap.com/saphelp_nwpi71/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    Thanks,
    satya

  • How to ignore Recordset name in XML(Sender JMS Adapter)?

    Hi All.
    I am using Sender JMS Adapter along with content conversion.
    I have put in Parameter:
    Plain2XMLService xml.ignoreRecordsetName true
    still the Inbound payload in SXI_MONITOR has Node Recordset, which should not be the case.
    Please advice, does this ignoreRecordsetName works in JMS adapter, if Yes does it works same way as in File Adapter content conversion?
    Thanks in Advance

    >
    Gowtham Peddi wrote:
    > Hi All.
    >
    > I am using Sender JMS Adapter along with content conversion.
    >
    > I have put in Parameter:
    > Plain2XMLService xml.ignoreRecordsetName true
    >
    > still the Inbound payload in SXI_MONITOR has Node Recordset, which should not be the case.
    >
    > Please advice, does this ignoreRecordsetName works in JMS adapter, if Yes does it works same way as in File Adapter content conversion?
    >
    > Thanks in Advance
    can you try
    ignoreRecordsetName true instead of xml.ignoreRecordsetName
    also try to not give any value for the xml.recordsetName parameter.
    I actually doubt if we can ignore the record set name using the module.

Maybe you are looking for

  • Changed icloud username and password can't access other devices

    I have three devices from which I use the same iTunes and ICloud account. I changed my username and password on the accounts yesterday. Now I am only able to get it to work on my IPhone 5S. My daughter's IPhone 4 and my IPad will not accept the new p

  • OS command to access the non SAP server to create folders in the server

    Hi All, For the Pre press screen ABAP team need to create some WIP folders in 10.10.10.215.So I want to try out the option of using OS command to access that server to create folders at a specific location in that server. Can you please tell me the w

  • Won't automatic log-in

    Have to use password log-in, can't get automatic to work. Console log reads: loginwindow[159] FSResolveAliasWithMountFlags returned err = -43 I'm guessing some file or alias is missing. How would I replace it. System preferences are set to do the aut

  • Pro is nothing

    I upgraded to quicktime pro and so far none of the advertised apps work. When I try to play an AVCHD file it does not work at all. If I open the new player in the 'file ' it will show the avchd but will only show it as a still and at really low res.H

  • How can I get a Thai online number?

    I'm in Japan and I've many contact from Thailand. I'd like to have my skype online number (under Thailand country area code). How can I make it?