Client to Servlet using JMS

Hi,
Since JMS ensures reliability, is it possible to use JMS to send/receive JMS messages from/to a DESKTOP Java application and to/from a Servlet (over HTTP), so as to make sure the transmissions are reliable:
Desktop Client <----> ReliableJMS <----> Servlet
That is, can JMS be used to establish a 2-way reliable connection between a client and servlet?
Is this typically done?
Thanks

Hi.
I do not think you can do it over http.
The servlet can be activated using the http request, but what happens when you want it do do a receive() on the connection from the desktop? I am not sure that this is possible.
If you want the servlet to only send messages and not to receive over http - you can do it, but you will need something that will be able to decode the message sent in the http.
Nimo.

Similar Messages

  • Obtaining client certificate in servlet using apache + tomcat

    Hi,
    I'm porting a webapplication from Javawebserver to Apache/1.3.6 (Win32) mod_jk mod_ssl/2.2.6 OpenSSL/0.9.2b
    The application needs to get the client certificate hash code.
    Using Javawebserver I used
    request.getAttribute ("javax.net.ssl.cipher_suite");
    request.getAttribute("javax.net.ssl.peer_certificates");
    etc
    How do I set up the apache webserver so that I can read the client certificate and what is the attribute called?
    I've tried this in the httpd.conf:
    SSLOptions +ExportCertData
    And the attribute:
    "SSL_CLIENT_CERT"
    Like it says in the Tomcat documentation.
    I'm not sure if I need to set up Tomcat as well..
    Any help would be greatly appriciated!
    Sincerely,
    AM Hjemaas

    Yup use ajp13 not ajp12 or mod_webapp
    refer to http://www.galatea.com/flashguides/apache-tomcat-24-win32.xml on setting up..
    THIS IS IMPORTANT!!!
    use Apache mod_jk.dll diretive:
    JkEnvVar Apache_Env_Var FORWARD_ALIAS
    this will send a apache environment variable (http://myapache/cgi-bin/printenv.pl to see whats available) to Tomcat
    JkEnvVar SSL_CLIENT_CERT SSL_CLIENT_CERT
    Then in Tomcat servlet use request.getAttribute("SSL_CLIENT_CERT") to get the cert in PEM format
    Hope this helps
    Jay

  • Need help: Using JMS to callback a client.

    Hi everyone,
    I'm having a very frustrating problem. I'm just started to use JMS to overcome callback
    problem with EJBs. I simply want my EJB to send something (pub/sub) to my client so it
    can update some display. I first instantiate my Client and TopicConnection etc. etc. then
    create the EJB, invoke it and the EJB sends some TextMessage back. However, the TextMessage
    never seems to arrive at my Client. The TextListener never seems to deliver.
    Here's the snippet:
    EJB:
    private void createPublisher() {
    try {
    Context ctx = new InitialContext();
    System.out.println("Server looking up JMS Service");
    TopicConnectionFactory conFtry = (TopicConnectionFactory) ctx.lookup("java:com
    p/env/jms/MobiDTopicConnectionFactory");
    topic = (Topic) ctx.lookup("java:comp/env/jms/TopicName");
    con = conFtry.createTopicConnection();
    session = con.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    publisher = session.createPublisher(topic);
    TextMessage mesg = session.createTextMessage();
    System.out.println("Server is sending message, see anything?");
    mesg.setText("This is from publisher");
    publisher.publish(mesg);
    // Exception catching stuff snipped.
    public void ejbCreate() { createPublisher(); }
    Client:
    public void createSubscriber() {
    try {
    Context ctx = new InitialContext();
    TopicConnectionFactory conFtry = (TopicConnectionFactory) ctx.lookup("java:com
    p/env/jms/MobiDTopicConnectionFactory");
    Topic topic = (Topic) ctx.lookup("java:comp/env/jms/TopicName");
    con = conFtry.createTopicConnection();
    session = con.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    subscriber = session.createSubscriber(topic);
    subscriber.setMessageListener(new TextListener());
    con.start();
    System.out.println("Connection started");
    // Exception stuff snipped.
    public static void main(String args[]) {
    try {
    ConverterClient cc = new ConverterClient();
    cc.createSubscriber();
    System.out.println("Subscriber is ready");
    Context initial = new InitialContext();
    System.out.println("Looking up the bean...");
    Object ref = initial.lookup("java:comp/env/ejb/SimpleConverter");
    System.out.println("Getting the home interface");
    ConverterHome home = (ConverterHome) PortableRemoteObject.narrow(ref,
    ConverterHome.class);
    Converter conv = home.create();
    double amount = conv.dollarToYen(100.00);
    InputStreamReader inputStreamReader = new InputStreamReader(System.in);
    char answer = '\0';
    while (!((answer == 'q') || (answer == 'Q'))) {
    try {
    answer = (char) inputStreamReader.read();
    } catch (IOException e) {
    System.out.println("I/O exception: "
    + e.toString());
    Can anyone spot what's wrong with the code? I've been trying to get this to work for the
    past two days but to no avail. Please help...
    Thank you in advance.
    -vincent

    Hi, thanks for all your reply.
    The TextListener is the one downloaded from this website in the
    tutorial but I used it in different program. Here's the TextListener:
    public void onMessage(Message message) {
    System.out.println("Receiving message in onMessage()");
    TextMessage msg = null;
    try {
    if (message instanceof TextMessage) {
    msg = (TextMessage) message;
    System.out.println("Reading message: " +
    msg.getText());
    } else {
    System.out.println("Message of wrong type: " +
    message.getClass().getName());
    } catch (JMSException e) {
    System.out.println("JMSException in onMessage(): " +
    e.toString());
    } catch (Throwable t) {
    System.out.println("Exception in onMessage():" +
    t.getMessage());
    Strangely, this does not work as it never print the message. Can't see what's
    wrong from a glance though and I'm not getting any error message whatsoever.
    However, I tried my own listener:
    static class MyListener implements MessageListener {
    public MyListener() { }
    public void onMessage(Message msg) {
    try {
    System.out.println("Message received: " + ((TextMessage) msg).getText())
    catch(JMSException ex) { ex.printStackTrace(); }
    And this works...I just don't get it. MyListener is a static because I used it in my main().
    Anyone can give any comment?
    thanks,
    -vincent

  • Client Id in use - WL6.1 sp3   server to server JMS messaging

    Any feedback would be greatly appreciated. THANKS!
              -Alan May
              Scenario:
              Two weblogic 6.1 sp3 instances running on two separate Solaris 8 boxes.
              Server a - a message producer(client) for a number of topics and queues on b
              Server b - hosts JMS services including all the topics and queues, has both
              message producers and mdb consumers for a number of topics and queues
              What I've set up: a durable connection factory for topics for server a,
              topics for server b, queues for server a, and queues for server b (all
              targeted to server b)
              I have a singleton on each server that has methods to retrieve the queue
              connection or topic connection appropriate for that server(a single
              connection is
              shared for all topic producers and a separate connection is share for all
              queue producers for each server)
              I have each producer open and close a new session every time. However, the
              topic and queue connections are shared for all producers for that JVM. This
              seemed to be the approach recommended by the JMS spec, but do you feel this
              is the appropriate granularity given the above scenario? I am not currently
              closing my jms connection as part of a weblogic shutdown class. Is that
              essential in that case? If the server crashes - are there any
              recommendations on how to handle(if closing the connection is the issue)?
              I've confirmed that my JMS clients running with server b are not using the
              connection factories setup for a's use.
              Issue:
              Everything works on server b as expected.
              Server a's connections seemed to be fouled. I was getting that the clientid
              was in use(stack trace included below) while trying to fetch the connection.
              I stopped server a, removed the fouled connection factories on server
              b(dedicated for server a's use), and created new connection factories for
              a's use. I stopped server b and deleted everything from the two JMSState
              and JMSStore tables, restarted a then b, and tried the test again. This
              time the singleton code could fetch the connection without receiving a
              JMSException, but I was getting an exception when I tried to open a session
              from the connection.
              If worst comes to worse, I can stick a stateless session bean on b, to act
              as a delegate producer on behalf of server a, but I'd like to avoid it if
              possible.
              Any recommendations? Please let me know if it would be helpful for me to
              clarify any points.
              Server a's original error:
              weblogic.jms.common.InvalidClientIDException: Client id, Parser.topicPrime,
              is in use
              Start server side stack trace:
              weblogic.jms.common.InvalidClientIDException: Client id, Parser.topicPrime,
              is in use
              at
              weblogic.jms.frontend.FEConnection.setClientId(FEConnection.java:918)
              at weblogic.jms.frontend.FEConnection.<init>(FEConnection.java:178)
              at
              weblogic.jms.frontend.FEConnectionFactory$1.run(FEConnectionFactory.java:319
              at weblogic.management.internal.Helper.doLocally(Helper.java:1656)
              at
              weblogic.jms.frontend.FEConnectionFactory.connectionCreate(FEConnectionFacto
              ry.java:316)
              at weblogic.jms.frontend.FEConnectionFactory_WLSkel.invoke(Unknown
              Source)
              at
              weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
              at
              weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
              :93)
              at
              weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
              at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
              2)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              End server side stack trace
              

    Hi Alan,
              Lots of questions in one message! I'm going to
              try and answer them using the shotgun approach -- let
              me know if I miss.
              (1) It is good practice to close JMS resources when you are done
              with them, even if the destination host server crashes. The reason
              is that the connection resource may be hosted on a different
              WL server than the destination.
              (2) Creating a session/producer per message is heavy-weight
              in terms of CPU and network - if your app is performance
              sensitive is is better to cache these resources for re-use.
              See the JMS Performance Guide for details.
              (3) From your description I can't tell which two
              clients are conflicting. If what I'm writing here
              doesn't help, please try to narrow it down and repost.
              (4) Make sure that the connection factory does not have
              a "client-id" configured for it. Otherwise only one client
              can use the connection factory - instead have individual
              clients dynamically set their ids.
              (5) Note that client-ids are usually only useful for
              durable subscriber access, as other types of clients
              generally don't need exclusive connections, and therefore
              don't need client-ids.
              (6) The attached notes, which are for MDBs, may help you
              understand durable subscriptions and client-id's better in general.
              Tom
              Alan May wrote:
              > Any feedback would be greatly appreciated. THANKS!
              >
              > -Alan May
              >
              >
              > Scenario:
              >
              > Two weblogic 6.1 sp3 instances running on two separate Solaris 8 boxes.
              >
              > Server a - a message producer(client) for a number of topics and queues on b
              >
              > Server b - hosts JMS services including all the topics and queues, has both
              > message producers and mdb consumers for a number of topics and queues
              >
              > What I've set up: a durable connection factory for topics for server a,
              > topics for server b, queues for server a, and queues for server b (all
              > targeted to server b)
              >
              > I have a singleton on each server that has methods to retrieve the queue
              > connection or topic connection appropriate for that server(a single
              > connection is
              > shared for all topic producers and a separate connection is share for all
              > queue producers for each server)
              >
              > I have each producer open and close a new session every time. However, the
              > topic and queue connections are shared for all producers for that JVM. This
              > seemed to be the approach recommended by the JMS spec, but do you feel this
              > is the appropriate granularity given the above scenario? I am not currently
              > closing my jms connection as part of a weblogic shutdown class. Is that
              > essential in that case? If the server crashes - are there any
              > recommendations on how to handle(if closing the connection is the issue)?
              >
              > I've confirmed that my JMS clients running with server b are not using the
              > connection factories setup for a's use.
              >
              > Issue:
              > ------
              > Everything works on server b as expected.
              >
              > Server a's connections seemed to be fouled. I was getting that the clientid
              > was in use(stack trace included below) while trying to fetch the connection.
              >
              > I stopped server a, removed the fouled connection factories on server
              > b(dedicated for server a's use), and created new connection factories for
              > a's use. I stopped server b and deleted everything from the two JMSState
              > and JMSStore tables, restarted a then b, and tried the test again. This
              > time the singleton code could fetch the connection without receiving a
              > JMSException, but I was getting an exception when I tried to open a session
              > from the connection.
              >
              > If worst comes to worse, I can stick a stateless session bean on b, to act
              > as a delegate producer on behalf of server a, but I'd like to avoid it if
              > possible.
              >
              > Any recommendations? Please let me know if it would be helpful for me to
              > clarify any points.
              >
              >
              >
              > Server a's original error:
              > weblogic.jms.common.InvalidClientIDException: Client id, Parser.topicPrime,
              > is in use
              >
              > Start server side stack trace:
              > weblogic.jms.common.InvalidClientIDException: Client id, Parser.topicPrime,
              > is in use
              > at
              > weblogic.jms.frontend.FEConnection.setClientId(FEConnection.java:918)
              > at weblogic.jms.frontend.FEConnection.<init>(FEConnection.java:178)
              > at
              > weblogic.jms.frontend.FEConnectionFactory$1.run(FEConnectionFactory.java:319
              > )
              > at weblogic.management.internal.Helper.doLocally(Helper.java:1656)
              > at
              > weblogic.jms.frontend.FEConnectionFactory.connectionCreate(FEConnectionFacto
              > ry.java:316)
              > at weblogic.jms.frontend.FEConnectionFactory_WLSkel.invoke(Unknown
              > Source)
              > at
              > weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
              > at
              > weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
              > :93)
              > at
              > weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
              > at
              > weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:2
              > 2)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              > End server side stack trace
              >
              >
              A durable topic subscriber MDB uses its name to generate its client-id.
              Since JMS enforces uniqueness on this client-id, this means that if a durable
              subscriber MDB is deployed to multiple servers only one server will be able
              to connect. Some applications want a different behavior where
              each MDB pool on each server gets its own durable subscription.
              The MDB durable subscription id, which must be unique on its topic, comes from:
              1) <jms-client-id>MyClientID</jms-client-id>
              (the weblogic dtd)
              2) if (1) is not set then the client-id
              comes from the ejb name.
              The durable subscription is uniquely identified within a cluster by a
              combination of "connection-id" and "subscription-id". Only one active
              connection may use a particular "connection-id" within a WebLogic cluster.
              The connection id comes from:
              1) The "ClientId" attribute configured on the WebLogic connection factory.
              This defaults to null. Note that if the ClientId is set on a connection
              factory, only one connection created by the factory
              may be active at a time.
              2) If (1) is not set, then, as with the subscriber-id,
              the connection-id is derived from jms-client-id descriptor attribute:
              <jms-client-id>MyClientID</jms-client-id>
              (the weblogic dtd)
              3) If (1) and (2) are not set, then, as with the subscriber-id,
              the connection-id is derived from the ejb name.
              Work-around:
              A) Create a custom connection-factory for each server:
              1) configure "JNDIName" to the same value across all servers
              ("myMDBCF" in this example)
              2) configure "ClientId" to a unique value per server
              3) enable "UserTransactionsEnabled"
              4) enable "XAConnectionFactoryEnabled"
              5) set "AcknowledgePolicy" to "ACKNOWLEDGE_PREVIOUS"
              6) target the CF at a single WebLogic server
              (Number 5 is required for non-transactional topic MDBs)
              B) In the MDB's weblogic-ejb-jar.xml descriptor, set the MDB's connection
              factory to the JNDI name of the custom connection factories configured in
              (A). Optionally, also specify the subscriber-id via the jms-client-id
              attribute.
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>exampleBean</ejb-name>
              <message-driven-descriptor>
              <connection-factory-jndi-name>myMDBCF</connection-factory-jndi-name>
              <jms-client-id>myClientID</jms-client-id>
              </message-driven-descriptor>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              C) Target the application at the same servers that have the custom connection
              factories targeted at them.
              Notes/Limitations:
              1) If the MDB is moved from one server to another, the MDB's corresponding
              connection-factory must be moved with it.
              2) This work-around will not work if the destination is not in the same
              cluster as the MDB. (The MDB can not use the local connection factory, which
              contains the connection-id, as connection factories do not work unless they
              are in the same cluster as the destination.)
              3) This work-around will not work for non-WebLogic JMS topics.
              

  • How can I set Response Queue for standalone client using JMS Jax-RPC ?

    Hi,
    I am developing a standalone client for a web service running on a Weblogic 10.3 server using JMS transport. The response seems to be placed in JMSServer!JMSServer.TemporaryQueue0 when I try to test the application.
    The request xml created:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <content>
        <entry type="1">
            <textMessage fromQueue="true" JMSTimestamp="1285343150328" JMSReplyToDomain="1" JMSReplyTo="JMSServer!JMSServer.TemporaryQueue1" JMSRedelivered="false" JMSPriority="4" JMSMessageID="ID:&lt;520181.1285343150328.0&gt;" JMSExpiration="0" JMSDestination="SystemModule!demoQueue" JMSDeliveryMode="2">
                <headerProperty type="java.lang.String" value="text/xml; charset=utf-8" name="_wls_mimehdrContent_Type"/>
                <headerProperty type="java.lang.String" value="&quot;http://oracle/communications/platform/demo/webservices/rpc/secure/gen/getPhoneList&quot;" name="_wls_mimehdrSOAPAction"/>
                <headerProperty type="java.lang.String" value="/DemoWebServices/DemoWebServicesJMS" name="URI"/>
                <text>&lt;env:Envelope xmlns:env=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;env:Header/&gt;&lt;env:Body&gt;&lt;gen:lastName xmlns:gen=&quot;http://oracle/communications/platform/demo/webservices/rpc/gen&quot;&gt;8&lt;/gen:lastName&gt;&lt;/env:Body&gt;&lt;/env:Envelope&gt;</text>
            </textMessage>
        </entry>
    </content>On the application server I have configured a Response Queue that I would like my application to use. The client stubs where generated using the ant Task: weblogic.wsee.tools.anttasks.ClientGenTask.
    Standalone client code snippet:
          DemoWebServices_Impl service = null;
          try {
              service = new DemoWebServices_Impl(wsdl);
          } catch (ServiceException e) {
              e.printStackTrace();
          DemoWebServicesPortType port = null;
          //create credential provider and set it to the Stub
          try {
              port = service.getDemoWebServicesJMSPort();
          } catch (ServiceException e) {
            e.printStackTrace();
          PhoneList response = null;
          try {
              response = port.getPhoneList("8");
          } catch (RemoteException e) {
              e.printStackTrace();
          if(response != null) {
            for(Phone aPhone : response.getPhone()) {
                System.out.println("aReturned Phone number is:  " + aPhone.getPhoneNumber());
          }Would you please help me with modifying the client code to define which Queue the web service response should be placed in? setQueue() of the JMSTransportInfo class did not do the trick. Please help....
    Thanks,
    Sajitha
    Edited by: Sajitha on Sep 24, 2010 12:29 PM
    Edited by: Sajitha on Sep 27, 2010 8:44 AM

    Hi,
    I am developing a standalone client for a web service running on a Weblogic 10.3 server using JMS transport. The response seems to be placed in JMSServer!JMSServer.TemporaryQueue0 when I try to test the application.
    The request xml created:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <content>
        <entry type="1">
            <textMessage fromQueue="true" JMSTimestamp="1285343150328" JMSReplyToDomain="1" JMSReplyTo="JMSServer!JMSServer.TemporaryQueue1" JMSRedelivered="false" JMSPriority="4" JMSMessageID="ID:&lt;520181.1285343150328.0&gt;" JMSExpiration="0" JMSDestination="SystemModule!demoQueue" JMSDeliveryMode="2">
                <headerProperty type="java.lang.String" value="text/xml; charset=utf-8" name="_wls_mimehdrContent_Type"/>
                <headerProperty type="java.lang.String" value="&quot;http://oracle/communications/platform/demo/webservices/rpc/secure/gen/getPhoneList&quot;" name="_wls_mimehdrSOAPAction"/>
                <headerProperty type="java.lang.String" value="/DemoWebServices/DemoWebServicesJMS" name="URI"/>
                <text>&lt;env:Envelope xmlns:env=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;env:Header/&gt;&lt;env:Body&gt;&lt;gen:lastName xmlns:gen=&quot;http://oracle/communications/platform/demo/webservices/rpc/gen&quot;&gt;8&lt;/gen:lastName&gt;&lt;/env:Body&gt;&lt;/env:Envelope&gt;</text>
            </textMessage>
        </entry>
    </content>On the application server I have configured a Response Queue that I would like my application to use. The client stubs where generated using the ant Task: weblogic.wsee.tools.anttasks.ClientGenTask.
    Standalone client code snippet:
          DemoWebServices_Impl service = null;
          try {
              service = new DemoWebServices_Impl(wsdl);
          } catch (ServiceException e) {
              e.printStackTrace();
          DemoWebServicesPortType port = null;
          //create credential provider and set it to the Stub
          try {
              port = service.getDemoWebServicesJMSPort();
          } catch (ServiceException e) {
            e.printStackTrace();
          PhoneList response = null;
          try {
              response = port.getPhoneList("8");
          } catch (RemoteException e) {
              e.printStackTrace();
          if(response != null) {
            for(Phone aPhone : response.getPhone()) {
                System.out.println("aReturned Phone number is:  " + aPhone.getPhoneNumber());
          }Would you please help me with modifying the client code to define which Queue the web service response should be placed in? setQueue() of the JMSTransportInfo class did not do the trick. Please help....
    Thanks,
    Sajitha
    Edited by: Sajitha on Sep 24, 2010 12:29 PM
    Edited by: Sajitha on Sep 27, 2010 8:44 AM

  • WLS JMS supports the clients developed by using non-java program languages,such as,c++,VB...

              WLS JMS supports the clients developed by using non-java program languages,such
              as,c++,VB?
              

    The short answer is yes. This is a frequently asked question. I
              suggest searching this newsgroup in google using terms like "C++",
              "IIOP", ".NET", "JCOM".
              Note also that WL 8.1 (now out in beta) contains a thin java client
              (something like 0 or 300K without JMS, 700k with. The 0K client comes
              from leveraging WL's IIOP support.)
              Tom, BEA
              jerry8006 wrote:
              > WLS JMS supports the clients developed by using non-java program languages,such
              > as,c++,VB?
              

  • Authentication error when using JMS service

    I'm currently trying to send String messages from LiveCycle to Websphere MQ (Both running on the same server), but I'm having some problems...
    I''m quite sure that my WAS setup is correct (or at least close to correct) because I've build some test Java classes that are able to put and get messages from MQ using JMS. However, when I'm usng the LiveCycle JMS service I get the following exception thrown:
    [5/26/10 17:46:44:705 CAT] 00000027 QueueMessageS A com.adobe.livecycle.jms.QueueMessageSender sendMessageToQueueWithProperties Error occurred when creating queue connection. Reason: MQJMS2013: invalid security authentication supplied for MQQueueManager.
    Since I'm not a Websphere fundi I trawled through Google and was able to figure out that the problem probably lies with the configuration of my queue connection factory. Changing the transport type from "Bindings" to "Client" didn't resolve the problem and I'm rapidly running out of good ideas. Hopefully somebody here would be able to help.
    The following info might be useful:
    OS = Windows Server 2003
    I'm using WAS 6.1.0.29
    Websphere MQ is running on the same machine (v6.0)
    I've used the Websphere MQ JMS Provider that comes with WAS
    I've configured a Queue Connection Factory and a Queue in the server scope
    No SSL or anything like that is set up yet
    I did notice that when configuring the Queue there is a section titled "WebSphere MQ Queue Connection Properties" where I am able to specify a user Id and password. However, nothing seemed to work. I tried my WAS administration user name, as well as a windows user who is indeed a member of the mqm group. Also tried it without any value, but no luck
    On the MQ side I couldn't really find any settings under either the Queue Manager or the Channel that would make much of a difference. Since I was able to access the queues using a servlet deployed on the same WAS instance I'm thinking it has something to do with the way that LC call the JMS provider. But to be honest, I don't really have a clue.
    Any help would be much appreciated.
    Greg

    Haven't solved the problem yet, but here's an update:
    I created an "ExecureScript" operation that contains simple Java code to write a message to MQ using the same JMS connection factory and JMS queue. It does work correctly, so clearly my setup it correct enough to send messages from LiveCycle to MQ via JMS.
    Here's the code for the ExecuteScript:
    //import the classes that the script references
    import java.util.List;
    import java.lang.String;
    import java.util.Map;
    import java.util.HashMap;
    import javax.jms.*;
    import javax.naming.*;
    //get a list of file names that are stored in the process variable named files
    String strMessage = patExecContext.getProcessDataStringValue("/process_data/@strMessage");
    //get connection factory
    String strQcf = patExecContext.getProcessDataStringValue("/process_data/@strQcf");
    //get queue
    String strQ = patExecContext.getProcessDataStringValue("/process_data/@strQ");
    try
        // Look up administered objects
        System.out.println("Looking up administered objects...");
        InitialContext initContext;
        initContext = new InitialContext();
        QueueConnectionFactory factory = (QueueConnectionFactory) initContext.lookup(strQcf);
        Queue queue = (Queue) initContext.lookup(strQ);           
        initContext.close();
          // Create JMS objects
          System.out.println("Creating JMS objects...");
          QueueConnection connection = factory.createQueueConnection();
          QueueSession session =    connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        QueueSender sender = session.createSender(queue);
          //Send messages
          TextMessage message = session.createTextMessage(strMessage);
          sender.send(message);
           //Exit
           System.out.println("Exiting...");
           connection.close();
           System.out.println("Goodbye!");   
    } catch (Exception e)
            e.printStackTrace();
    Interestingly I don't provide any authentication information and yet LC is able to connect to MQ
    Cheers

  • Can I  use JMS?

    I write a trigger to detect the updated record in my oracle db table(once trigger detects the change it sends out the information). I also want to write a servlet on websphere app server. How can I make the servlet as a listener in order to get the information sent from oracle? Can I use JMS?

    Yes, you do indeed get the point :-)
    For your other questions -
    1) Oracle AQ does not use JNDI to connect - you get the connection with...
    TopicConnectionFactory tc_factory = AQjmsFactory.getTopicConnectionFactory(serverAddr,"ORCL",1521,"thin");2)Yep - Queues are one-to-one, Topics are one-to-many. You will need to be careful with the client id when you create the subscriptions. Each applets client ID will need to be different or only one will consume the message.
    R.
    KMS

  • Scale:how many client can register with jms

    hi all, i want to test the scaleof jms , in other mean i want to send msg using jms to 25 client/publisher running at the same time to calculate the time any onw can helpme how to do that test.i think it is not resonable to run the oub 25 timer i think there is another way.
    regards
    nagwa

    Depends on how often they hit "reload".
    If you have an on-line chat forum, people tend to hit reload every N seconds to see if there are new posts. 1 user = 200 hits/day. If your site show TV listings, people load your page only a couple of times a day because it doesn't change constantly. 1 user = 2 hits/day.
    Estimate how many hits an average user does to each page. Then measure the speeds of your servlets. Estimate how often each servlet will be accessed -- or if your site is already on-line, get that info from logs. Simulate your expected web traffic.
    If you use sessions and put lots of data in them, estimate the size of data you keep per user. That'll give you memory requirements.

  • MQ Message content conversion using JMS

    I want to use JMS content conversion to convert MQ messages into XML (Idoc). We currently use the R/3 link application to send data to/from MQ to SAP.
    Each MQ message is one continuous stream of data with no carriage returns or line feed between the header and lines. When I set-up the JMS mapping commands, it sees the message as one string of data and does not map out the separate idoc segments.  Can I use JMS file content conversion or will I need some type of JAVA mapping module to handle the mapping for each different type of Idoc segment?  If it;s JAVA, could you provide an example.  Thanks   Jim

    Hi Jim,
    Go through the following link which disscusses the JMS Content Conversion.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891
    Amaresh

  • Should I use JMS?

    I have a new project where I need to send XML messages to a client from a server and vice-versa. However, my clients are embedded 16-bit micros and my server application is written in Java. The clients will be mobile, connected via a wireless network and may be connected or not connected at times to the network.
    I want to be able to queue outgoing messages for each client so when the client becomes availiable on the network the server can send the necessary messages to the client. But the client cannot use JMS API to subscribe...etc to queues, it can only send simple commands using XML to the server via a socket.
    Is JMS something I can use here?
    Any suggestions and information is appreciated.
    Thanks.
    Dave

    Sounds like we are trying to do simillar things :)
    Why cannot your client use JMS ?
    You can embed XML messages inside JMS messages, so you should be able to send messages both ways.
    I curious how you are attaching to the JMS bus without being a JMS client?
    -CG

  • Can I use JMS in Java SE?

    Hi,
    We are developing a desktop application in plane Java SE.
    We thought of using JMS for the client-server events propagation.
    Is it possible to use JMS without a J2EE application server?
    I know I can do it in Spring, but we don't want to use the Spring framework just because of JMS.
    Please let me know if there is a way to incorporate JMS in Java SE desktop application.
    Thanks much,
    Sandeep

    Hi,
    We are developing a desktop application in plane Java SE.
    We thought of using JMS for the client-server events propagation.
    Is it possible to use JMS without a J2EE application server?
    I know I can do it in Spring, but we don't want to use the Spring framework just because of JMS.
    Please let me know if there is a way to incorporate JMS in Java SE desktop application.
    Thanks much,
    Sandeep

  • Do i have to use JMS with EJBS?

    Hi
    I want to use JMS as a messaging system (a queue) between my system and someone elses. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JMS i always hear it in relation to EJBs. Can i only use JMS with EJBS?
    If i can use JMS is there anything important i need to know about.
    Thanks in advance!
    San H.

    As far as I understand you are use JNDI and JMS is not bound with EJB's. These are java API's which are independent. Like JDBC you can use with Servlets, Applets, standalone applications, EJB, JMS etc etc.......
    In the same way you can use JNDI and JMS with diferent API. And the important feature of Java is that all java API interact with each other when these are independent. I would appricate comments of everyone......................Thanks

  • BPEL Interaction Pattern - Using JMS as the medium

    Objective : Make one MAIN Business Process out of BPEL that would receive the Message from Userinput or some other source and finally after doing all operations inside BPEL process (that would happen using BPEL Sub processes that exchange data using JMS send and receive inside the different queues ). Finally the MAIN Business Process would receive the response from BPEL sub process send it to Database at the end. We would like to develop a single BPEL process that would represent a Business Process say like Order Create and internally we would invoke various Sub BPEL process to work on the payload and give a handshake using JMS as the medium rather than another BPEL process makes a direct handshake to the invoking/calling process.
    Steps Attempted :
    a) BPEL Process receives the message from Input (User input of Purchase Order) and do some transformation later publish the message to Queue by configuring JMS Adapter to Produce it. Next step inside the same BPEL process tries to receive it using the JMS Adapter to consume it. It keeps waiting forever without consuming the message
    b) BPEL Process (A) receives the message from (User input of Purchase Order) and do some transformation later send the message to another BPEL Process (B) that would receive the input message. BPEL Process B writes into the Queue using JMS Adapter. In this case also BPEL Process (A) configured to receive the message from the QUEUE where the BPEL PRocess B has sent. BPEL Process A waits for the message to arrive for ever.
    Some behaviours we noticed ,
    1) Queue messages are being dequeued (JMX Browser in OEM shows no messages). But BPEL console shows the BPEL Process A is waiting for it to arrive. I believe it is consuming the message but unable to kickoff from receive (JMS activity) activity configured in the BPEL.
    2) We ensured that no other BPEL Process is consuming by creating a new Queue by name DemoQueue4 that would be used by the BPELProcess A and BPEL Process B.
    3) BPEL Process A and BPEL Process B are ASYNCHRONOUS Process. BPEL Process B receives the input and writes into the Queue does not call back to BPEL Process A. BPEL Process A would listen to the Queue to receive it inside the BPEL Process A.
    Am I trying something architecturally not possible ?
    Thanks
    Nags.
    Message was edited by:
    cdmnagaraj

    You can register any compliant JMS provider as a foreign jms provider in weblogic and then can access the JMS administered objects (destination and connection factory) from the local weblogic JNDI tree.
    This blog shows how to configure AQJMS as a foreign JMS provider and then configure JMS adapter to access the jms objects.
    http://biemond.blogspot.com/2009/07/using-aq-jms-text-message-in-wls-1031.html
    You can use the above link as a reference on how to setup. You will have to modify the Initial Context Factory, Provider URL, JNDI Properties, foregin connection factories and foreign detsinations section to suit activeMQ.
    Note: Weblogic does not come inbuild with the required jars to connect to ActiveMQ unlike AQJMS, so you need to ensure that the active mq jms client jars are available in the weblogic's classpath.

  • Applet client with DataForms using dial-up

    Jdeveloper 3.2, IAS9i
    Hello,
    Somebody knows if the DataForms are efficient via dial-up?
    For example in the Online Orders sample,with an applet client (with DataForms, using dialup to connect to app. server). What happens when an user insert a new employee record. When an user navigate around the fields ocurrs a validation inside the Business Object Tier. What happens with the remote round trips?, It's faster?.
    Jdeveloper 3.2.2
    IAS9i
    Thanks a lot.
    null

    Any application designed to run over a dial -up connection must be extremely sensitive to the fact that dial-up connection is very slow due to it's bandwidth.
    Applets by default require downloading a lot of files to the browser. So you must download your app code, the jdbc drivers and any other required classses.
    Applets using BC4J components then must also download the BC4J code. BC4J uses a data cache, so data is also downloaded.
    Avoid using applets in this design.
    Use JavaServerPages(JSP's) (or servlets) which are a much "thinner" version of the "Thin client" group of tools(applets, servlets jsp's)
    WHY JSP's over servlets ??
    They are quicker to write than servlets

Maybe you are looking for