RAD6, WAS5.1, Embedded MQ, standalone JMS app? - Websphere

This is a discussion on RAD6, WAS5.1, Embedded MQ, standalone JMS app? - Websphere ; I am using RAD6, with the 5.1 test environment and Embedded MQ that came with RAD6. I am getting the following exception when trying to get a simple standalone JMS app to send a message to the Embedded MQ: java.lang.ClassCastException: ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: RAD6, WAS5.1, Embedded MQ, standalone JMS app?

  1. RAD6, WAS5.1, Embedded MQ, standalone JMS app?

    I am using RAD6, with the 5.1 test environment and Embedded MQ that came with RAD6. I am getting the following exception when trying to get a simple standalone JMS app to send a message to the Embedded MQ:

    java.lang.ClassCastException: javax.naming.Reference at JMSClient.init(JMSClient.java:88)

    The relevant line in the code is:

    factory = (QueueConnectionFactory) context.lookup("jms/MQ_SenderQCF");

    What is being returned is not a QueueConnectionFactory, but rather a javax.naming.Reference with the following attributes:

    getClassName=javax.jms.QueueConnectionFactory
    getFactoryClassLocation=null
    getFactoryClassName=com.ibm.ejs.jms.JMSConnectionF actoryFactory

    Some background... I have been successful in getting an EJB to send a message and see it delivered to an MDB, but this is (obviously) completely inside WAS5.1. I have been able to use both JMS models (MQ Simulator and Embedded Messaging) with this setup.

    Also, I have tried both the IBM (com.ibm.websphere.naming.WsnInitialContextFactory ) and Sun (com.sun.jndi.cosnaming.CNCtxFactory) initial context factories and am able to see the JNDI references. When using the Sun version, with a url of ?iiop://localhost:2809/nodes/localhost/servers/server1/?, the lookup operation sets the factory to null, leading to other obvious difficulties :-)

    Now, the questions:

    1. From a licensing perspective, is what I am trying to do (use a standalone JMS app for sending messages to a WAS5.1 application via Embedded MQ) legal for development and/or production?

    2. From a technical perspective, why does the same code snippet work while inside and EJB and not outside?

    3. Is there another architecture I need to use to accomplish this? For example, do I need a full blown MQ?

    4. Since I seem to be having trouble getting the correct objects with the JNDI, should I use an external JNDI server ? e.g. LDAP or within MQ itself?

    I am hopeful that I?ve given enough information to answer the questions. BTW, I've tried lots of suggestions by others in different forums, but I haven't done the right chicken dance yet to make this work.

    Thanks for any help in advance!
    Rich


  2. Re: RAD6, WAS5.1, Embedded MQ, standalone JMS app?

    I got past the technical issue and can send/receive messages in my development environment from a standalone app by specifying a bunch of JVM parameters. I found the solution in the WebSphere forum at the following URL:

    http://www-128.ibm.com/developerwork...m=266#13722021

    I still want to know the legal issues are around using Embedded MQ to send/receive messages to/from a WebSphere application. Is what I am doing legal in a production environment?

    Thanks,
    Rich


+ Reply to Thread