2 Replies Latest reply on Nov 21, 2006 5:14 AM by Weston M. Price

    Mock JMS Provider

    Weston M. Price Master

      I am nearing completion on the first 'rough' pass of a MockJMS framework that allows exercising the JMS/JCA adapter outside of the application server. The fundamentals are working and I can send messages, test DLQ handling and simulate provider failures without having to deploy anything to the application server. While this is not end to end testing, I believe it does provide a decent framework for excercising the fundamental purposes of the inflow adapter:

      Provider connectivity
      SeverSession/Pool management
      before/onMessage/after delivery semantics
      Correct tranasaction enlistment based on transacted/non-transacted delivery

      While most of the code is stubbed out, the necessary functions to get a basic working model are implemented. The trickiest part was extending JmsActivation and the DLQQueueHandler to override looking up the administrative objects from a real JNDI tree rather than simple instantiation.

      This is not a mechanism to test JMS provider functionality. We have that pretty well covered in the rest of the testsuite.



        • 1. Re: Mock JMS Provider
          Scott Stark Master

          Its easy to create a simple in memory jndi implementation for use in this type of setup. I did this a part of the jndi aspect testing in the mc. We should probably add these simple mock objects to the jboss test project for reuse.

          Or are you talking about something else?

          • 2. Re: Mock JMS Provider
            Weston M. Price Master

            It's a bit more. It's a full provider in that it emulates conditions/situations that we would normally see during a typical inflow session. The JNDI part was just a way to work around our JNDProviderAdapter stuff to allow the framework to be run completely devoid of the container.