JMS Queue - how to determine dynamically

Hi,
I have the following scenario File -> PI -> JMS Queue
Based on the above I would like to dynamically determine the JMS Queue name based on the source file name, for example:
XXX_data_file.xml        should route to JMS Queue   XXX_JMS_Q
YYY_data_file.xml      should route to JMS Queue   YYY_JMS_Q
<any>_data_file.xml    should route to JMS Queue   <any>_JMS_Q
How can I dynamically set the JMS Queue name?
There are several suggestions which say to use 'DCJMSReplyTo' but they make no sense to me. I have looked in WIKI "FAQ J2EE JMS Adapter" and "Note 856346 - J2EE JMS Adapter: Frequently Asked Questions (FAQ).
I can get the source file name in a UDF but how to set the target JMS Queue in the same UDF?
Che

Check the following link for how to get the name of the file:
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
In your target strucuture, add one elment to hold the above file name:
In your receiver determination, you use conditonal routing, you can say
if file name element = file 1, then select your queue1 receiving system
if file name element = file 2, then select your queue2 receiving system
If you do not want to have many receiving system,  you can also use conditional interface determination as well, that way, you need to have number of inbound interfaces that corresponding to your queue.
in this case, you just have one receiving system.
Regards.
Liang
Edited by: Liang Ji on Jun 2, 2009 8:07 PM

Similar Messages

  • Jms queues how to send the files?

    can we send files(txt,pdf,xml) to jms queues? here jms is sender?

    Hi,
    please go through the below link.
    http://scn.sap.com/docs/DOC-54030
    http://www.stechno.net/sap-notes.html?view=sapnote&id=856346
    Regards
    srinivas

  • Oracle BPM and JMS Queue: How to associate data from Map Messages to Process Data Objects?

    Good Day!
    I'm currently working on a project wherein it tries to get data from a JMSqueue Map Message being populated by CEP.
    After CEP pushes some data in the JMSqueue. I have BPM configured with a JMS adapter to look up whether there are any messages to be processed upon.
    Inside BPM, I want to know how can I correlate the data from the Map Message to my Process Data Object.
    For example, If I have a Map Object wherein it has 3 attributes:
    FirstName:String
    LastName:String
    Age:int
    What is the expression I need to use inside Oracle BPM Data Association screen in order to map the data from the Map Messages into my process data objects?
    Thanks!
    Regards,
    Jeff

    Any ideas? Thanks!

  • How to get the XML messages from JMS Queue in BPM

    I have one requirement in my application.we are sending XML messages to the JMS Queue.How to get the XML messages from JMS Queue and how to Extract the details from XMl.
    can you please send me the code to get the XML messages from the JMS Queue.
    Thank you,

    Hi,
    Sure others will have some other ideas, but here's what I typically do to get the XML from a JMS queue. Inside the Global Automatic that pops the messages off the queue you'd have logic similar to this:
    artifactInfoNodes as Any[]
    xmlObject as Fuego.Xml.XMLObject = XMLObject()
    load xmlObject using xmlText = message.textValue
    . . . Once you have this, it's a matter of deciding what you want to do with the message. Most times you'll parse the XML (using XPATH statemens), set argument variables and create a work item instance.
    Hope this helps,
    Dan

  • Posting a message to JMS queue using B2B

    Hi,
    Could anyone suggest a solution for this scenario?
    I have two trading partners say TP1 & TP2. Suppose TP1 is sending an xml message to TP2 using custom ebMS protocol, then at TP2, the message should be posted to a JMS Queue so that some other application can read it and process it.
    The problem which I am facing is..
    1) where to create that JMS Queue(I could not find any options for creating a JMS Queue neither in B2B console nor in enterprise manager console..!!)?
    2) how to register TP2 to send msg to that JMS Queue(How that queue will be vissible to B2B)?
    3) Should the endpoint be given as that JMS Queue while configuring the Delivery Channel for TP2?
    Thanx in advance for your suggestions,
    Regards,
    Satya.

    Hi Narayanan,
    Thank you for your prompt reply. I understand that we need to create an external delivery channel to post the message to a JMS Queue from TP2. Currently I am using default AQ's (b2b.IP_IN_QUEUE & b2b.IP_OUT_QUEUE) at TP2 end to receive the message.
    But, I want to post the message to JMS Queue. For this I need to create an external delivery channel and the corresponding end point should be the name of that JMS Queue. Is my assumption correct?
    I have already gone through the thread that you have mentioned and the pdf as well. But, I am not able to find an option on how & where to create that JMS Queue?
    Could you clarify on this?
    Regards,
    Satya.

  • How to pass dynamic filename to Receiver JMS channel

    Hi experts,
    I want to pass the dynamic filename to receiver JMS message Properties.
    for example
    I am passing directory name via adapter module AF_Modules/DynamicConfigurationBean with key and value combination like below. How to pass dynamic filename value to a dynamic property ( say DCJMSMessageProperty1)
    eg.
    key.0 - >insert http://sap.com/xi/XI/System/JMS DCJMSMessageProperty0
    value.0 - >  testdirectory ( which is static value)
    Note: Im have not created any ESR object . i just have to bypass the file to a jms queue. I have used AAE integrated configuration scenario ( file to jms )
    Regards,
    Balaji
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:45 PM
    Edited by: Balaji Pichaimuthu on Jan 27, 2011 4:46 PM

    Already given link for the dynamic configuration code snippet in the earlier reply... Below is the code snippet
    Note: Use Adapter Specific Message Attributes for the target Communication Channel(CC).Check the indicator for filename in the advanced tab of CC
    //UDF code
    String filename="";
    String NameSpace = "http:/"+"/sap.com/xi/XI/System/JMS";
    try{
          DynamicConfiguration conf = (DynamicConfiguration) param.get(
            StreamTransformationConstants.DYNAMIC_CONFIGURATION);
          DynamicConfigurationKey key  =  DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File",   "FileName");
           // read filename value
           filename = conf.get(key);     
          // So far we extracted filename value .. now do your logic  something like this...
          DynamicConfigurationKey key2 = DynamicConfigurationKey.create(NameSpace,"yourjmsvalue goes here");
           conf.put(key2,filename);
         } catch(Exception e){

  • How to create a JMS queue linked to external (remote) JMS server?

    Hello,
    I'm trying to receive messages from a remote JMS queue. I found some information on the Internet on how to create an external JNDI resource (my remote JMS queue connection factory is bound to LDAP context on remote box). I was able to configure JNDI resource that points to remote queue connection factory, but I don't know what to do next.
    How can I create a local JMS destination (queue) that will be the image of the remote queue? At least I'm guessing this is what needs to be done in order to deploy MDBs.
    I would appreciate it if someone could tell me how to get this working. Maybe the steps I took were not in the right direction - the bottom line is that JMS queue and queue connection factory are deployed on a remote server, and I need to get messages sent to them on the local server. I'm using Sun App Server from J2EE 1.4.
    Thank you,
    Mark

    Please refer to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6377822, particularly the evaluation. Could your situation be the same too (i.e server ip address changing dynamically)? Also, which OS are you using and do you have any firewalls setup that prevents access to port 3700?

  • How to Check JMS Queue in BPEL

    Hi All,
    we have a case where SOA shows message is successfully sent to TIBCO, But it is not available in TIBCO queues.
    We have the property file used by BPEL for different instances and the JMS queue mentioned are different for different instances.
    So how to check to which TIBCO queue SOA sent message through BPEL.
    Rgds,

    Based on the JNDI look up used, you can determine the instance. Iam not sure this is the right way but you can try this.
    Thanks,
    Vijay

  • OSB - Dynamic JMS Queue Routing

    My Input to the proxy is
    a. A Message payload.
    b. QueueName ( queueA or QueueB or can be anything else).
    The message has to be sent to QueueName( a JMS queue setup in weblogic) configured in the input.
    How do i do this in OSB ?
    In bpel i simply used <bpelx:inputProperty name="jca.jms.JMSDestinationName" to dynamically assign the JMSDestination name to any queue.

    Your endpoint should look like similar to:
    jms://myosbmanaged_server:7001/my_jndi_connection_factory/my_jndi_queue_name
    i.e (for a distributed queue over and osb cluster)
    jms://osb1dev2:7001,osb2dev2:7001/weblogic.jms.XAConnectionFactory/Finance.ExchangeRates.Queue
    HTH

  • How to delete the messages from JMS Queue

    Hi,Can anybody help how to delete the messages from the JMS Queue.Thanks in advance.

    You can dequeue the message using a JMS client or delete it using Weblogic Admin Console -
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13952/taskhelp/jms_modules/queues/ManageQueues.html
    Regards,
    Anuj

  • How to keep a back up of messages from the JMS queues?

    Hi,
    I need to keep a back up of messages which are coming in the JMS queue before they get consumed. This is for recovery purpose.
    I checked file store option but it doesnt have any time stamp on messages so dont know how to trace back messges if needed from file store.
    Please let me know if you guys have any idea to handle this.
    Thanks in advance
    Bips

    No. Not with Time Machine at least.
    If you tell Time Machine to backup the external then you will have it.
    Or you can manually copy it to another disk for storage outside of Time Capsule/TimeMachine.
    Allan

  • How to send to Weblogic 9.1 JMS queue from EJB running in Glassfish?

    Hi.
    I hope this is the correct forum.
    I need to send a message to a jms queue on a remote weblogic 9.1 server. To this end I believe I will have to:
    1) Install one or more weblogic client libraries/jar files on my glassfish application server. The weblogic server expects communication in the "t3" protocol, which I believe tunnels iiop, jms etc. inside their own proprietary protocol
    2) Define the jms queue in my glassfish application server with a queue connection factory that creates the queue using classes from the weblogic jars?
    3) Otherwise code the EJB methods sending messages as I would code and send messages to any jms queue
    It's the first two steps that have me baffled. The more I dig in glassfish administrator's manual, the more confused I become.
    Anybody have any idea if/how this can be accomplished?
    Some reference to where I may find information as to how to accomplish this?
    Thank you,
    Jacob.

    Jacob,
    I suggest you try, either a GlassFish forum (http://forums.java.net/jive/forum.jspa?forumID=56), or perhaps the GenericJMSRA project https://genericjmsra.dev.java.net .This forum is primarily about the Sun JMS provider, Java MQ or Open MQ -- or the JMS Specification.
    -- Ed Bratt

  • How to configure a JMS Queue

    Hi,
    I have an EAR file thai includes an EJB 3.0 module with a MDB. I use a Queue.
    This is my code,
    @Resource(mappedName = "jms/NotificationQueue")
    private Queue notificationQueue;
    @Resource(mappedName = "jms/NotificationQueueFactory")
    private ConnectionFactory notificationQueueFactory;
    public Customer update(Customer customer){
    Customer updated = em.merge(customer);
    try {
    sendJMSMessageToNotificationQueue(updated);
    } catch (JMSException ex) {
    Logger.getLogger(CustomerSessionBean.class.getName()).log(Level.SEVERE, null, ex);
    System.out.println("Customer updated in CustomerSessionBean!");
    return updated;
    private Message createJMSMessageForjmsNotificationQueue(Session session, Object messageData) throws JMSException
    //Modified to use ObjectMessage instead
    ObjectMessage tm = session.createObjectMessage();
    tm.setObject((Serializable) messageData);
    return tm;
    private void sendJMSMessageToNotificationQueue(Object messageData) throws JMSException
    Connection connection = null;
    Session session = null;
    try
    connection = notificationQueueFactory.createConnection();
    session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    MessageProducer messageProducer = session.createProducer(notificationQueue);
    messageProducer.send(createJMSMessageForjmsNotificationQueue(session, messageData));
    finally
    if (session != null)
    try
    session.close();
    catch (JMSException e)
    Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot close session", e);
    if (connection != null)
    connection.close();
    layed inside a stateless EJB 3.0.
    And the MDB looks as follow,
    @MessageDriven(mappedName = "jms/NotificationQueue", activationConfig = {
    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
    public class NotificationBean implements MessageListener {
    public NotificationBean() {
    public void onMessage(Message message)
    try
    Object msgObj = ((ObjectMessage)message).getObject();
    if (msgObj != null)
    Customer customer = (Customer)msgObj;
    System.out.println("Customer with the following details has been updated:");
    StringBuilder sb = new StringBuilder();
    sb.append("Customer ID=");
    sb.append(customer.getCustomerId());
    sb.append(", ");
    sb.append("Name=");
    sb.append(customer.getName());
    sb.append(", ");
    sb.append("Email=");
    sb.append(customer.getEmail());
    System.out.println(sb.toString());
    catch (JMSException ex)
    Logger.getLogger(NotificationBean.class.getName()).log(Level.SEVERE, null, ex);
    I have configured both "jms/NotificationQueue" and "jms/NotificationQueueFactory" inside OC4J server.
    But when I try to deploy the EAR file, the server gives me the following error,
    Operation failed with error: No destination location set for message-driven bean NotificationBean
    How must I do to let the EAR file be deployed?
    Thanks in advance
    Jose

    Mingzhuang
    I want to configure a error queue for weblogic jms topic. Wanted: The message goes to error destination when messages have expired or reached their redelivery limit.
    1. using jms transport configure proxy service:
    Retry Count :3
    Retry Interval:10
    Error Destination: ErrorTopic
    Expiration olicy: RedirectUnlike File/SFTP, JMS proxy service definition does not have the concept of Error Destination. To accomplish similar functionality go to JMSQ on (for which proxy is configured) server console (http://localhost:7001/console) and configure the Error Destination. Following URL will help in how to configure JMS Q.
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueues.html
    http://edocs.bea.com/wls/docs103/ConsoleHelp/taskhelp/jms_modules/queues/ConfigureQueueDeliveryFailure.html
    I tried use the proxy service to consume message from the jms topic . and generation an error in the proxy message flow. But the message didn't goes into the error topic.If every thing is configured as per above step, then the after retries, the weblogic server will put the message into JMS topic configured. Your proxy will receive from this topic.
    Let me know if we are not on same page.
    Cheers
    Manoj

  • How to configure JMS queue on OC4J server. Development in JDeveloper 10G

    Hi there,
    I have to configure a JMS for an Asynchronous process in my Application which will be running in Oracle 10G Application Server. Development Environment is Oracle JDeveloper 10G.
    I am facing a problem on how to configure JMS queue.
    Steps Followed are:
    in the <JDevloperHome>/j2ee/home/config
    1. Made the new queue and connection factory's JMS entry in jms.xml.
    2. Specifed the queue in oc4j-connectors.xml.
    3. played around with application.xml
    and tried all combinations, but the message producer always failed to lookup the queue.
    Need help on the steps to follow so that the producer can post the message in the queue.
    Also please help how to configure the MDB to listen to the queue.
    Thanx and Regards
    Subham

    If you were dealing with Oracle 10g app server as opposed to standalone, I might be better able to help you.
    One thing though, when you are configuring your MDB in the orion-ejb-jar.xml file, do not forget to specify attribute listener-threads, otherwise no matter how many beans you have in your MDB pool, only one bean will be listening to the queue. Many listener-threads equal to max number of beans in pool.

  • Dynamic queue name with JMS Queue XML?

    Hi,
    Is it possible to use dynamic queue name with JMS Queue XML?
    I tried using a variable in the JNDI URL, and supply the value in a package. I specified the following in the JNDI URL in the Topology:
    e.g.
    <JMS_RESOURCE>?d=<DTD_FILE>&s=<SCHEMA>&JMS_DESTINATION=#PROJECT_NAME.dest_var
    I declared and set the variable in a package, then tried to load data from the above data server to database. But executing this package gave me the following error:
    7000 : null : java.sql.SQLException: javax.jms.JMSException: Cannot find the target in JNDI (#PROJECT_NAME.dest_var)
    java.sql.SQLException: javax.jms.JMSException: Cannot find the target in JNDI (#PROJECT_NAME.dest_var)
         at com.sunopsis.jdbc.driver.bg.executeQuery(bg.java)
         at com.sunopsis.jdbc.driver.bh.executeQuery(bh.java)
         at com.sunopsis.jdbc.driver.l.f(l.java)
         at com.sunopsis.jdbc.driver.l.executeUpdate(l.java)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execSrcOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    Am I doing it wrongly?
    Thanks!

    hi,
    as it's not in Adapter-Specific Message Properties
    http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm
    looks like you cannot do it with jms adapter in standard
    use proxy or your own adapter instead
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • Unable to edit my songs in my shuffle, such as deleting songs from my shuffle and adding new songs into it.

    When i first bought my shuffle a few years back, i would use the itunes in my old laptop to add/delete songs from it. However, recently i realised im unable to do so on my new laptop (using itunes). Today, im unable to add/delete songs from my shuffl

  • Google Drive Issue After OS X 10.9.3 Installation

    Hello, Since last week when I install the latest Mavericks version, i.e., the OS X 10.9.3, my Google Drive folders isn't working anymore as should be. The status icon in the folder and in the files disapear! I uninstall the Google Drive and installed

  • Smpatch and Recommended Patches for Solaris 10

    Hi, Is there any way to make smpatch only retrieve recommended patches for Solaris 10 ? I've seen several forum posts saying to use smpatch set patchpro.patchset=recommended but other posters indicate that this only works for Solaris 9 (additionally,

  • Roadmap vor NWBC with regards to SAP Fiori

    Dear experts, is there a special roadmap for SAP NWBC? Is it the chosen interface for accessing SAP applications for the future? How does SAP Fiori influence this roadmap? Thank you for the input. BR Marcus

  • I can't find the driver for my intergrated camera for X201

    My intergrated camera spoilt previously and I received help from a lenovo technician months ago. He helped me to change it into a new integrated camera. But the problem is, the device has got no device drivers(software) in it. Therefore, right now it