1. JMS in JSP (1 messages)

    I am attempting to send and read msg's from within JSP and running into this error:
    <error>
    javax.naming.ConfigurationException. Root exception is java.net.MalformedURLExc
    eption: no protocol: testQueue
    </error>

    Here is the code that gets my initial context

    <code>

    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "testQueue");
    InitialContext temp = new InitialContext(env);
    </code>

    Any suggestions?

    Thanks.

    Threaded Messages (1)

  2. JMS in JSP[ Go to top ]

    HI,
    The Provider URL is the address of the Host on which the Initial Context factory or for that matter the other factory objects that u wanna use in u'r application reside.
    Next if u want to send a message to a queue, u will have to go thru he foll steps:
    1) Create a Queue Conn Factory Obj from the Init Context
    2) Create a Queue Obj from the IC
    3) From 1 Create a QueueConnection using the Api's getConnection
    4) From 3 get a QueueSession Object
    5) From 4 Get the QueueSender and/or TextMessage Objects

    HTH
    Sahil