Package org.apache.cactus

Examples of org.apache.cactus.JmsTestCase


        if (!(theTestInstance instanceof JmsTestCase))
        {
            return;
        }
       
        JmsTestCase jmsInstance = (JmsTestCase) theTestInstance;

        // Sets the request field of the test case class
        // ---------------------------------------------
        // Extract from the JMS request the queue to simulate (if any)
        JmsRequest request =
            mdbImplicitObjects.getRequest();

        String nameOfQueue = request.getQueueName();
       
        QueueConnectionFactory qcf = ((QueueConnectionFactory)
        ((InitialContext)mdbImplicitObjects.getMessageDrivenBeanContext()).lookup(nameOfQueue));
       
        Method respondMethod = jmsInstance.getClass().getMethod("getJMSReplyTo", new Class[]{});
       
        Field requestField = jmsInstance.getClass().getField("request");     //TODO find the appropriate field names here.

        //requestField.set(jmsInstance,
        //    AbstractHttpServletRequestWrapper.newInstance(request, url));

        // Set the response queue field of the test case class
        // ---------------------------------------------
        Field responseQueueField = jmsInstance.getClass().getField("jMSReplyTo");   //TODO find the appropriate field names here.

        //responseQueueField.set(jmsInstance,
        //    mdbImplicitObjects.getHttpServletResponse());

        // Set the config field of the test case class
        // -------------------------------------------
        Field configField = jmsInstance.getClass().getField("config");

        //configField.set(jmsInstance, AbstractServletConfigWrapper.
        //    newInstance(mdbImplicitObjects.getServletConfig()));

        // Set the session field of the test case class
View Full Code Here

TOP

Related Classes of org.apache.cactus.JmsTestCase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.