MDB vs standalone JMS client

I have implemented a transformation server as a JMS client. This is not
written as a EJB bean, partly because I'm not very familiar with EJB beans.
I'm being told MDB is the way to go (I'm a bit reluctant in front of the
additional work) for the usual reasons : transaction-control (not really an
issue right now for me but may become one), ease of deployment and
centralized monitoring. Fair enough.
My standalone JMS client creates a lot of variables at initialization (such
as a precompiled XSLT stylesheet to substantially improve the speed of each
transformation).
Where should this be created if I were to convert my standalone JMS client
into an MDB ? In ejbCreate() ?
I'm also a bit worried about a few aspects :
1) Performance, the size of requests may vary tremendously and I currently
use a synchronous receive on my input queue, is this more efficient (I pull
messages when I'm ready) than using beans and onMessage() ? In other words,
will the container try to push message notifications to MDB bean instances
that are not ready ?
2) My standalone JMS consumer is also a producer to several destinations
(including temporary queues, permanent queues and topics), is there any
limitation to the use of JMS destinations in an MDB (what about selectors ?)
vs a standalone java JMS application?
3) My standalone JMS consumer creates a few threads per request. Any gotchas
in a MDB vs a standalone Java JMS application ? Are MDB passivated at any
time ?
Many thanks for any answer,
Rosalie
Rosalie

Rosalie Mignon wrote:
I have implemented a transformation server as a JMS client. This is not
written as a EJB bean, partly because I'm not very familiar with EJB beans.
I'm being told MDB is the way to go (I'm a bit reluctant in front of the
additional work) for the usual reasons : transaction-control (not really an
issue right now for me but may become one), ease of deployment and
centralized monitoring. Fair enough.There's a number of MDB advantages over writing your own JMS consumers.
I would recommend MDBs for JMS consumers running within WLS. If you
have a JMS consumer that is a separate (say client) process, then
vanilla JMS is still the way to go.
The MDB container takes care of things like reconnecting you to JMS if
it fails. It supports foreign JMS providers so your MDBs will work with
"foreign" messaging systems like MQ-Series.
>
My standalone JMS client creates a lot of variables at initialization (such
as a precompiled XSLT stylesheet to substantially improve the speed of each
transformation).
Where should this be created if I were to convert my standalone JMS client
into an MDB ? In ejbCreate() ?Yes, ejbCreate would be fine.
>
I'm also a bit worried about a few aspects :
1) Performance, the size of requests may vary tremendously and I currently
use a synchronous receive on my input queue, is this more efficient (I pull
messages when I'm ready) than using beans and onMessage() ? In other words,
will the container try to push message notifications to MDB bean instances
that are not ready ?I'm not sure I understand. You will have a pool of MDB instances all
receiving from the queue. When an instance is available and there is a
message pending, the EJB/JMS containers will call your MDB's onMessage
implementation.
>
2) My standalone JMS consumer is also a producer to several destinations
(including temporary queues, permanent queues and topics), is there any
limitation to the use of JMS destinations in an MDB (what about selectors ?)
vs a standalone java JMS application?Not that I can think of.
>
3) My standalone JMS consumer creates a few threads per request. Any gotchas
in a MDB vs a standalone Java JMS application ? You are not really allowed to create threads from an EJB. Why do you
need to create threads? In general, we wouldn't recommend that
server-side applications create new threads on each request.
Are MDB passivated at any
time ?
No
Many thanks for any answer,Your domain name is an unusual one for the J2EE world. If you can tell
us, I'd be interested to know what you're doing.
-- Rob
>
Rosalie
Rosalie

Similar Messages

  • Standalone JMS client  in SJS App Server 8.0

    Hi
    I am trying to retrieve a message from a JMS queue from astandalone client.
    The code the client uses to lookup JMS resources is:
    try
              /* Create the object of InitialContext interface */
    Properties env = new Properties( );
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL,"iiop://localhost:3700");
         jndiContext = new InitialContext(env);
              /* Find the connection factory object */
         QConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("jms/QConnectionFactory");
         /* Find the queue */      
              queue = (Queue) jndiContext.lookup("jms/Queue");
    catch (NamingException e)
         System.out.println("Error: " + e.toString());
    The code throws the following exception:
    Error: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.N
    amingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    Exception in thread "main" java.lang.NullPointerException
    at QReceiver.main(QReceiver.java:51)
    What might be the problem? Pls help. The code works fine when executed as an Application client of SJS Appserver without using the JNDI Context part.
    Thanks in advance
    JLRocky

    Also have a problem similar to this. I have found that
    1. JMS between beans on the same server work fine
    2. JMS between standalone client and server work fine if you start the bundled imq as a standalone message server
    3. If you are using the Appserver then standalones cannont connect, but it you are using the imq beans cannot connect.
    so i haven't had time to try this yet but my possible solution is:
    configure the app server to use an external JMS server (its in the admin console some place) make the external server to be an imq running as a standalone, hopefully it can be started on localhost with out any port changes.
    I think rather than bundling the two so both could be used they embeded the imq in the appserver and shielded it from outside comminication

  • Standalone JMS client in J2EE 1.4 Beta

    Hi,
    I expected it should be possible to deploy an MD Bean and to send message to it from outside the server - using "runclient". It does not work for me. During "runclient" it can not find the queue - defined with "message-destination". Can anybody tell me - is it supposed to work this way?
    I do runclient -client m01mclient.ear -name MDClient
    I have .ear with application.xml and sun-j2ee-ri.xml and .jar in it with application-client.xml. Here are the descriptors:
    application-client>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    <?xml version="1.0" encoding="UTF-8"?>
    <application-client version="1.4"
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
    <display-name>MDClient</display-name>
    <resource-ref>
    <res-ref-name>jms/KnownConnectionFactory</res-ref-name>
    <res-type>javax.jms.ConnectionFactory</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <message-destination-ref>
    <message-destination-ref-name>jms/KnownQueue</message-destination-ref-name>
    <message-destination-type>javax.jms.Queue</message-destination-type>
    <message-destination-usage>Produces</message-destination-usage>
    <message-destination-link>NameForKnownQueue</message-destination-link>
    </message-destination-ref>
    <message-destination>
    <message-destination-name>NameForKnownQueue</message-destination-name>
    </message-destination>
    </application-client>
    sun-j2ee-ri.xml>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE j2ee-ri-specific-information
    PUBLIC "-//Sun Microsystems Inc.//DTD J2EE Reference Implementation 1.4//EN"
    "http://localhost:8000/sun-j2ee-ri_1_4.dtd">
    <j2ee-ri-specific-information>
    <app-client>
    <module-name>mdclient.jar</module-name>
    <resource-ref>
    <res-ref-name>jms/KnownConnectionFactory</res-ref-name>
    <jndi-name>jms/QueueConnectionFactory</jndi-name>
    <default-resource-principal>
    <name>j2ee</name>
    <password>j2ee</password>
    </default-resource-principal>
    </resource-ref>
    <message-destination>
    <message-destination-name>NameForKnownQueue</message-destination-name>
    <jndi-name>jms/Queue</jndi-name>
    </message-destination>
    </app-client>
    </j2ee-ri-specific-information>

    Sorry for the false alarm. In fact it works fine with these same deployment descriptors.
    But in the last J2EE Tech Tips the client is packaged much simpler.

  • How to insert message in OC4J JMS from standalone java client.

    Hi,
    I have been following available examples for creating standalone java clients to insert messages in JMS queues.
    I am able to insert using java client when the SOA suite and the standalone java code are on same machine.
    package producerconsumerinjava;
    import javax.jms.*;
    import javax.naming.*;
    import java.util.Hashtable;
    public class QueueProducer
    public static void main(String[] args)
    String queueName = "jms/demoQueue";
    String queueConnectionFactoryName = "jms/QueueConnectionFactory";
    Context jndiContext = null;
    QueueConnectionFactory queueConnectionFactory = null;
    QueueConnection queueConnection = null;
    QueueSession queueSession = null;
    Queue queue = null;
    QueueSender queueSender = null;
    TextMessage message = null;
    int noMessages = 5;
    * Set the environment for a connection to the OC4J instance
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS, "mypass");
    env.put(Context.PROVIDER_URL,"ormi://myserver.company.com:12402"); //12402 is the rmi port
    * Set the Context Object.
    * Lookup the Queue Connection Factory.
    * Lookup the JMS Destination.
    try
    jndiContext = new InitialContext(env);
    queueConnectionFactory =
    (QueueConnectionFactory) jndiContext.lookup(queueConnectionFactoryName);
    queue = (Queue) jndiContext.lookup(queueName);
    catch (NamingException e)
    System.out.println("JNDI lookup failed: " + e.toString());
    System.exit(1);
    * Create connection.
    * Create session from connection.
    * Create sender.
    * Create text message.
    * Send messages.
    * Send non text message to end text messages.
    * Close connection.
    try
    queueConnection = queueConnectionFactory.createQueueConnection();
    queueSession =
    queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    queueSender = queueSession.createSender(queue);
    message = queueSession.createTextMessage();
    for (int i = 0; i < noMessages; i++)
    message.setText("Message " + (i + 1));
    System.out.println("Producing message: " + message.getText());
    queueSender.send(message);
    queueSender.send(queueSession.createBytesMessage());
    catch (JMSException e)
    System.out.println("Exception occurred: " + e.toString());
    finally
    if (queueConnection != null)
    try
    queueConnection.close();
    catch (JMSException e)
    System.out.println("Closing error: " + e.toString());
    But when the SOA Suite is remote, I am struggling to get the settings correct
    Till now, here is what I have figured out from looking at blogs/tars etc on the Net:
    1. I need to use ApplicationClientInitialContextFactory instead of RMIInitialContextFactory (http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13975/jndi.htm)
    2. The project should have a META-INF/application-client.xml file, which may be dummy (http://www.wever.org/java/space/Oracle/JmsTar1). Question is, my code is there in a single absolutely standalone code..how I can use this application-client.xml and where it has to be placed.
    Errors:
    When trying to run exact same code on local server that tries to enqueue JMS on remotee serverer
    Exception occurred: javax.jms.JMSException: Unable to create a connection to "xxxxxxx.yyyyyy01.dev.com/10.42.456.11:12,602" as user "null".
    Any help is greatly welcome.
    As an exercise, I copied this complete code on the server and then ran locally using a telnet client...it worked. So the problem is coming when accessing the server remotely.
    Rgds,
    Amit

    1. I need to use ApplicationClientInitialContextFactory instead of RMIInitialContextFactoryNot necessarily.
    2. The project should have a META-INF/application-client.xml fileThat's only necessary if going the ApplicationClientInitialContextFactory route.
    There are two types of JMS client applications you can write -- a pure/plain Java app, and an "AppClient". That first is your everyday run-of-the-mill Java application, nothing special. That latter is a special, complicated beast that tries to act as a part of the whole client/server/J2EE architecture which provides you with a semi-managed environment. Either can be made to work, but if all you need is JMS access (using plain OC4J JMS factory/queue names and not JMS Connector names), then the first is easier to get working (and performs a tiny bit better as well due to being a lighter-weight solution).
    I think the problem you are having might be: When you use the plain Java client solution, you do not have any type of management, and that includes user management. With no user management (and if the JMS server is not configured to allow anonymous connections) you need to include the username and password in the call to createConnection. (I think it may be that this is actually true in the AppClient case as well -- I avoid using the AppClient model as much as possible so my memory there is weaker.)
    If you prefer to go the AppClient route, I would point you to a demo I wrote which had a functioning example, but Oracle seems to have removed it (and all of the 10.1.3 demos?) from OTN. :-(
    Hmm, it seems to still be available on the wayback machine:
    http://web.archive.org/web/20061021064014/www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html
    (Just look down the page for "With OEMS JMS (In-Memory and File-Based)" -- there is an .html document with info, and there is a .zip file with source code.)
    Question is, my code is there in a single absolutely standalone code..how I can use this application-client.xml and where it has to be placed.The app client in my demo had the following directory structure:
    myjavaclient.class
    jndi.properties
    META-INF\MANIFEST.MF
    META-INF\application-client.xml
    META-INF\orion-application-client.xml
    When you use ApplicationClientInitialContextFactory I think it just looks under .\META-INF for the .xml files.
    -Jeff

  • How to invoke the mdb  without jms client

    Hi,
    I have a requirment in that I want to invoke the message driven bean without jms client.
    ejb 2.1 support this but I don't know how.
    if any one have an idea pl reply this.
    thanks

    Ino I did not mean invoke MDB without sending a message, but I want to say invoking the mdb by some other like jaxm client or soap client.
    if u have any idea pl tell me.
    thanks
    manish

  • How to configure for remote JMS client?

    I have my own Java JMS test program for performance measurements.
              I am using the JNDI and JMS provider functionality of the WebLogic 9.1 app-server but my test program is just pure JMS 1.02 sender/receiver clients - ie it is NOT part of, or deployed as a J2EE application.
              SINGLE MACHINE TEST
              ===================
              In a single machine environment I was able to
              - configure a JMSServer
              - configure a JMSSystemModule
              - configure resources for ConnectionFactories and Queue and Topics
              I then made what I believe to be a 'standalone' application module copied from some mysystemmodule-jms.xml and with that I somehow worked out how to deploy it using the weblogic.Deployer tool.
              The deployment apparently set up the JNDI and my JMS client could gain access to the administered objects and do what it does.
              Everything works.
              TWO MACHINE TEST
              ================
              I now have a second machine.
              I want to put my JMS sender client on this new machine and I want the JMS server and JMS receiver client to be unchanged from the SINGLE MACHINE TEST.
              But I really don't know quite how to proceed from here...
              Do I need to install the WebLogic app-server on the sender machine or is the weblogic.jar all I need?
              What is necessary configuration for JNDI access on the sender machine?
              Can I in fact use my original SINGLE MACHINE server unchanged as I am hoping?
              I don't think I want a "thin" client because I read that performance is impacted (and these are performance tests)
              Remember this is NOT a J2EE application. There is no MDB; no client-container; no descriptors etc. Maybe that makes it more complicated - I don't know.
              Sorry for such basic questions but if somebody can just point me to an appropriate example or tutorial it could save me days...
              Thankyou.

    Hi,
              My problem is on similar lines. I have an applet based UI working on RMI/t3 protocol.
              I am using weblogic 9.2 as my app server.
              When my applet is executed on JRE 1.5x it works fine.
              But when I use JRE1.4x it gives the following exception
              java.lang.NoClassDefFoundError: javax/management/InvalidAttributeValueException
              at weblogic.rmi.internal.Stub.<clinit>(Stub.java:21)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:141)
              at weblogic.rmi.internal.StubInfo.class$(StubInfo.java:34)
              at weblogic.rmi.internal.StubInfo.<clinit>(StubInfo.java:34)
              at java.lang.Class.forName0(Native Method)
              I have analyzed the reason for this.
              the class javax/management/InvalidAttributeValueException was included in java 1.5 and above. So JRE 1.4 does not have it.
              In previous versions of weblogic this class was a part of their 'weblogic.jar' file and in weblogic 9.2 it is not a part of weblogic.jar file so when I am using JRE1.4 and weblogic 9.2 then it obviously does not find this class hence the above exception.
              I tried to put this all together and made custom made client jar file incliding the necessary classes. I was able to get throght this exception only land up in following exception.
              java.lang.VerifyError: class weblogic.utils.classloaders.GenericClassLoader overrides final method .
                   at java.lang.ClassLoader.defineClass0(Native Method)
                   at java.lang.ClassLoader.defineClass(Unknown Source)
                   at java.security.SecureClassLoader.defineClass(Unknown Source)
                   at sun.applet.AppletClassLoader.findClass(Unknown Source)
                   at java.lang.ClassLoader.loadClass(Unknown Source)
                   at sun.applet.AppletClassLoader.loadClass(Unknown Source)
                   at java.lang.ClassLoader.loadClass(Unknown Source)
                   at java.lang.ClassLoader.loadClassInternal(Unknown Source)
                   at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:204)
                   at weblogic.jndi.spi.EnvironmentManager$DefaultFactoryMaker.<clinit>(EnvironmentManager.java:26)
                   at weblogic.jndi.spi.EnvironmentManager.getInstance(EnvironmentManager.java:48)
                   at weblogic.jndi.Environment.getContext(Environment.java:307)
                   at weblogic.jndi.Environment.getContext(Environment.java:277)
                   at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
                   at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
                   at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
                   at javax.naming.InitialContext.init(Unknown Source)
                   at javax.naming.InitialContext.<init>(Unknown Source)
              I really need to support clients using Jre 1.4 and Jre 1.5
              I will really appreciate any help on this one.
              Please advise.
              Thank you all.

  • How to set JMS clients to use JVM Invocation layer

    Hi,
    I'm not sure if this JBoss specific (but I'm assuming it's not) so I'll be asking it here. How can I set my JMS clients and Message-Driven Beans to use JVM Invocation layer since the clients and queues will reside in the same JVM.
    Thanks in advance.

    May be that explains why I couldn't successfully integrate ActiveMQ with JBoss. I was using the 3.0 version. I'll try again once I find the time.
    Anyway, do you know how to set JBoss JMS clients and MDBs to use JVM invocation or transport layer instead of UIL2?
    I'm not sure if what I've done is correct But here's what I've done.
    For jvm-il-service.xml, I changed the JNDI reference from "ConnectionFactory" to "JVMILConnectionFactory" since the default service uses "ConnectionFactory". Then I used that reference as my JNDI look up in my JMS client. I'm just not sure how to do this with MDBs. I think I should add an entry in the ejb descriptor file but I need someone to confirm.
    Thanks.

  • MDB with foreign JMS : WLS 9.23

    For the love of _____ (fill in your own muse of desperation here), is there some categorical statement of whether WLS9.23 actually ***works*** with MDB's and foreign JMS providers? Whereever I search/find, people have trouble with this.
              Some kind BEA sould - please. Please, please please : publish a canonical example of MDB with secured foreign-JNDI provided connx factory, and either a queue or a topic.
              I'm beginning to wonder if this works at all.

    Good morning!
              Categorical Statement: WLS supports JMS spec compliant foreign providers for MDBs, bridges, resource-references, foreign providers. We also support sending a foreign providers message using a WebLogic JMS client.
              For general Tibco integration questions, I recall that the Tibco docs themselves contain WebLogic integration examples. There's also some much mention of Tibco in the out-dated "Using Foreign JMS Providers with WebLogic Server" white-paper on dev2dev.
              That said, there have been definitely been problems with Tibco and MQ's latest release, as they both recently released semi-non-JMS compliant clients that our wrapper code was unprepared to deal with. In short, we were caught unawares when these clients stopped supporting the 1.0.2 APIs even though 1.1 specification clearly requires both 1.1 and 1.0.2 support. Rather than ask Tibco and MQ teams to have them patch their code (an approach we've sometimes taken over the years), we chose this time to enhance our code.
              I think the problems were all fixed by 9.23 - but you may want to contact customer support to see if there are any additional patches required. Alternatively, you can try use a slightly older Tibco client, as presumably their older clients are still able to interoperate with their latest server version (this approach works with MQ).
              Tom

  • How the JMS client detect if the JMS server is still running?

    I have a JMS server running on Weblogic and a JMS client running as a standalone application on my local machine. I ran into the problem that if the JMS server is down for a period of time and then get re-started, the JMS client will lose its connection to the server. Since JMS client is just passively listening to the topic it subscribes, it will have no information about the status of the JMS server. Therefore it will not be able to receive any new message if the JMS server is restarted.
    I wonder if there is a way I can have the JMS client automatically detect if the connection to the server is lost or reset. I tried to use a while loop in JMS client that does a JNDI loopup every minute to check if the JMS server is up. But if the WL server is down, the JMS client will just catch an exception and crash.

    Hi,
    You should use an exception listener that allows a client to be notified of a problem asynchronously. As your client only consumes messages, it would have no other way to learn that its connection has failed.
    Hence, you should implement the interface ExceptionListener (let says MyExceptionListener) and define your reconnection logic in the method onException(JMSException exception). MyExceptionListener has to be registered with your connection with the method:
    public void setExceptionListener(ExceptionListener listener) throws JMSException
    Hope it helps,
    Arnaud
    www.arjuna.com

  • JMS Client from scretch

    hi,
    i'm new to sun appserver.
    i need to connect to JMS from a standalone client.
    1. which jars do i need from appserver/lib?
    2. which values do i use in InitialContext():
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, "???"));
    ht.put(Context.PROVIDER_URL, "???");
    InitialContext initialContext = new InitialContext(ht);
    ...

    Hi Soumya,
    Yes, you can send and receive message from JMS client via XI.
    create queue, queue manager at websphere system and use those values while configuring JMS adapter.
    You need queuename, queue manager name, system userid n pwd in which the above queues are created
    Hope you have deployed all the necessary jar files in SDM.
    Regards,
    Ravi.

  • WL8.1 jms client not working with WLS9.1

    Hi,
              I have a JMS client(MDB) with weblogic.jar(8.1 version) and its not able to pick messages from a queue which is created in WLS9.1.
              I have actually upgraded my weblogic domain using the wizard and i can see my queues getting created properly.
              At the client side when i use weblogic.jar(9.1 version) it works but not with weblogic81.jar..
              Any help is greatly appreciated.
              Thanks.

    This should work as far as I know, you might want to try contacting customer support. For now, it might help to try using 8.1 with the latest service-pack.
              Tom

  • How to send message from Message Driven Bean  to JMS client?

    In my project I have JMS client, two QueueConnectionFactory and Message Driven Bean. Client send message to MDB through the first QueueConnectionFactory , in one's turn MDB send message to client through the second Queue Connection Factory . I already config my Sun AppServer for sending message in one way, and sending message from MDB to the second QueueConnectionFactory. But on my Client there is an error : �JNDI lookup failed: javax.naming.NameNotFoundException: No object bound to name java:comp/env/jms/MyQueue2� (jms/MyQueue2 � this is the name of my Queue). So it couldn't get this message.
    P.S.
    Thank you for help!!!

    What is the name of the second queue?is the connection factory on the local?Yes the connection factory is on the local. The name of my first queue is jms/MYQueue and the name of another one is jms/MyQueue2.

  • Running JMS client on multiple systems (using J2EE 1.4)

    Hello all,
    Can anyone tell me if it is possible to run a JMS client on a system that is not running a J2EE server on localhost? Is there any way to reference the server on another machine (using J2EE 1.4 server)??
    I found information in the J2EE 1.3.1 tutorial that tells of ways to
    - run the client program with both systems running the server
    - run the client program with only one system running the server (which isn't localhost)
    However, the corresponding portion of J2EE 1.4 tutorial only specifies running the client with App server running on both systems...... does this mean that we cannot run a standalone client program with no server on localhost in case of the 1.4 server?
    Also, most of the tutorials on JMS I have seen so far only explain the scenario with both the client and the server on a single machine. Is this how average JMS applications work?? What I mean to ask is, in a typical scenario where does a JMS client run....?? at the server, or at the client (which may or may not be running a server at localhost).
    Thanks for your time.

    The functionality has not changed in J2EE 1.4 outside of reving to JMS 1.1

  • C or C++ JMS Client

              Hi,
              Is there any way to have a C++ or a C program running as a JMS client?
              Thanks in advance,
              Goutam.
              

    Hi,
              See attached FAQ for C JMS client and other
              C integration approaches.
              Tom
              Goutam Mukherjee wrote:
              > Hi,
              >
              > Is there any way to have a C++ or a C program running as a JMS client?
              >
              > Thanks in advance,
              > Goutam.
              JMS Integration of Foreign Vendors with BEA WebLogic Server
              The following notes are derived mostly from "http://dev2dev.bea.com/technologies/jms/index.jsp".
              For additional questions, a good forum for WebLogic questions in general is "newsgroups.bea.com". These can be mined for information by using Google's newsgroup search function.
              JMS Integration Overview
              - For integration with "non-Java" and/or "non-JMS" platforms, see "Non-Java Integration Options" below.
              - For a foreign JMS vendor to participate in a WL transaction it must support XA. Specifically, it must support the javax.jms.XA* interfaces.
              - In WL versions 6.0 and up it is possible to make synchronous calls to foreign JMS vendors participate in a WL transaction as long as the foreign vendor supports XA.
              - WL 6.0 and 6.1 MDBs can be driven by foreign vendors non-transactionally. They can be driven transactionally by a select few foreign vendors (MQ is not part of the select few)
              - WL 7.0 and later, MDBs can be driven by foreign vendors transactionally and non-transationally.
              - WL 6.1 and later WL provides a messaging bridge feature. Messaging bridges forward messages between any two JMS destinations, including foreign destinations, and can transfer messages transactionally or non-transactionally.
              - WL 8.1 JMS provides additional features that simplify transactional and JNDI integration of foreign vendors. See http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              Integration with 8.1 Details
              A good overview of 8.1 JMS interop capability is the presentation "Integrating Foreign JMS Providers with BEA WebLogic Server" here:
              http://www.bea.com/content/files/eworld/presentations/Wed_03_05_03/Application_Servers/1097-Foreign_JMS_Providers_WLS.pdf
              This document refers to helpful new 8.1 features, which simplify integration. These include:
              http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#accessing_foreign_providers
              http://edocs.bea.com/wls/docs81/jms/j2ee_components.html#1033768
              And are also summarized here (under interoperability):
              http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              Also read the extensive MDB documentation, which extensively covers integrating foreign vendors:
              http://edocs.bea.com/wls/docs81/ejb/message_beans.html
              The 8.1 features are likely sufficient for most 8.1 integration needs, and you may not need to refer "Using Foreign JMS Providers With WLS" white-paper mentioned below.
              Integration with 6.1 and 7.0 Details
              Read the "Using Foreign JMS Providers With WLS" white-paper:
              http://dev2dev.bea.com/products/wlserver/whitepapers/jmsproviders.jsp
              Note that this white-paper does not take into account 8.1 features.
              For 7.0 read the extensive 8.1 MDB documentation, which largely also applies to 7.0:
              http://edocs.bea.com/wls/docs81/ejb/message_beans.html
              Non-Java Integration Options
              - WL JMS has a JNI based C client which can be called directly from windows. This C client supports 7.0 and up, and will be officially packaged with WLS in 9.0 (virtually unchanged). The C API is currently only supported through the jms newsgroup. See "JMS C API", here:
              http://dev2dev.bea.com/technologies/jms/index.jsp
              - WL supports direct Windows COM access through its "JCOM" feature. This doesn't include the JMS API, but one can invoke EJBs which in turn invoke JMS. See
              http://e-docs.bea.com/wls/docs61/jcom.html
              http://e-docs.bea.com/wls/docs70/jcom/
              http://e-docs.bea.com/wls/docs81/jcom/
              - Similar to JCOM, but more advanced, WL supports IIOP standard based access on multiple platforms. You can use the BEA Tuxedo C client for this purpose (no license fee). This doesn't include the JMS API, but one can invoke EJBs which in turn invoke JMS. See
              http://e-docs.bea.com/wls/docs81/rmi_iiop/
              http://e-docs.bea.com/wls/docs70/rmi_iiop/
              http://e-docs.bea.com/wls/docs61/rmi_iiop/
              Unlike most other approaches, the IIOP client approach also allows the client to begin and commit user (JTA) transactions (not configured).
              - If you already have a BEA Tuxedo license, one option is communicate through BEA Tuxedo (which has various APIs on Windows) and configure a WebLogic Server to respond to these requests via the WTC bridge. Search for "WTC" in the BEA docs. Unlike most other approaches, the Tuxedo API approach also allows the client to begin and commit user (JTA) transactions.
              - Another approach is to interop via web-service standards. Or even to simply to invoke a servlet on the WL server using a basic HTTP call from Windows. These in turn can invoke the JMS API. There is a white-paper on "Interoperability Study of BEA WebLogic Workshop 8.1 and Microsoft .NET 1.1 Web Services", that demonstrates web-services here:
              http://ftpna2.bea.com/pub/downloads/WebLogic-DotNet-Interop.pdf
              - Yet another approach is to use a third party product that is designed to wrap any JMS vendor. There are even open source versions. In no particular order, here are some examples: Open3 WinJMS, CodeMesh, Active JMS, SpiritSoft
              Notes on MQ Remote Capable XA Clients
              Until recently, IBM MQ JMS clients could not work transactionally unless they were running on the same host as their MQ server. This is a limitation unique to MQ that was relaxed with the introduction of IBM's new "WebSphere MQ Extended Transactional Client". See:
              http://publibfp.boulder.ibm.com/epubs/pdf/csqzar00.pdf
              The product is new, and for some reason, configuration of this client seems to be tricky, even when WebLogic is not involved at all. Oddly, the main sticking point seems to be simply making sure that class paths refer to the required IBM jars:
              - Required on WLS where MQ objects are bound into JNDI:
              com.ibm.mq.jar, com.ibm.mqjms.jar
              - Required only if MQ objects are bound into JNDI on a different server:
              com.ibm.mq.jar
              If there are problems when using this client, first get it to work using a pure IBM client without any BEA classes involved. Once that is working, search the WL JMS newsgroup for answers and/or contact BEA customer support.
              MDB Thread Pool Notes
              WL7.0SP? and WL8.1 and later support the "dispatch-policy" field to specify which thread pool an MDB uses to run its instances. In most cases this field should be configured to help address potential performance issues and/or dead-locks:
              http://edocs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html#dispatch-policy
              (Note that "dispatch-policy" is ignored for non-transactional foreign vendors; in this case, the MDB "onMessage" callback runs in the foreign vendor's thread.)
              MDB Concurrency Notes
              Queue MDBs driven by foreign providers can run multiple instances concurrently. Topic MDBs driven by foreign providers are limited to one instance (not sure, but transactional foreign driven topic MDBs may not have this limitation). The size of the thread pool that the MDB runs in and the "max-beans-in-free-pool" descriptor limit how many instances run concurrently.
              Design Guide-Lines and Performance Tuning Notes
              The "WebLogic JMS Performance Guide" white-paper contains detailed design, performance, and tuning information for Clustering, Messaging Bridge, JMS, and MDBs.
              http://dev2dev.bea.com/products/wlserver/whitepapers/WL_JMS_Perform_GD.jsp
              

  • JMS Client disconnects often randomly in Weblogic10.3 cluster setup

    Hi,
    It would be very helpful for us if someone can suggest the way to overcome the below jms issue.
    Our application recently migrated to Weblogic 10.3 from Weblogic8.1, It is a clustered set up with two managed servers each on different solaris machine.
    Client connects to jms using wljmsclient.jar and wlclient.jar with t3 protocol.
    When client starts jms connection, it is getting connected to server with no errors, however we often see that client jms connection disconnects in between,
    It sometimes calls onException() and some times we do not even see any error message in console log when it disconnects,
    When onException() is called, we can see below exception stack trace:
    ==========================
    JMS exception class = weblogic.messaging.dispatcher.DispatcherException: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079697 No; nested exception is:      
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
    weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079697 No; nested exception is:      
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
         at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:116)
         at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncNoTran(DispatcherAdapter.java:61)
         at weblogic.jms.client.JMSSession.acknowledge(JMSSession.java:2191)
         at weblogic.jms.client.JMSSession.acknowledge(JMSSession.java:2120)
         at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4588)
         at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
         at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709)
    JMS exception class = java.rmi.MarshalException: CORBA COMM_FAILURE 1398079697 No; nested exception is:      
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
    weblogic.jms.common.LostServerException: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079697 No; nested exception is:      
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No
         at weblogic.jms.client.JMSConnection.dispatcherPeerGone(JMSConnection.java:1436)
         at weblogic.messaging.dispatcher.DispatcherWrapperState.run(DispatcherWrapperState.java:692)
         at weblogic.messaging.dispatcher.DispatcherWrapperState.timerExpired(DispatcherWrapperState.java:617)
         at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
    =======================
    When onException() is triggered, TopicConnection and TopicSession gets recreated in program, however jms is not getting reconnected once onException() is called. Some times jms session is lost in between with out any errors in log. We did not see this issue when our app used Weblogic8.1.
    We greatly appreciate if someone can help to resolve this issue.

    Hi,
    This is a common issue if you use wljmsclient.jar and wlclient.jar at client side. Many times we get "org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 209 completed: No" Please try using weblogic.jar at client end or even there is a better option to create the "*wlfullclient.jar*" using the jarBuilder utility provided as part of WebLogic.
    To create the "wlfullclient.jar" please refer to the following link:
    [http://download-llnw.oracle.com/docs/cd/E11035_01/wls100/client/jarbuilder.html#wp1077742|http://download-llnw.oracle.com/docs/cd/E11035_01/wls100/client/jarbuilder.html#wp1077742]
    Thanks
    Jay SenSharma
    http://jaysensharma.woardpress.com

Maybe you are looking for