0 Replies Latest reply on Apr 26, 2005 2:44 PM by Tim Fox

    Patch submitted

    Tim Fox Master

      Hi All-

      I've submitted a patch to JIRA.

      The patch contains:

      Completion of JBossConnection with the exception of the connection consumer stuff.

      This includes the exception listener set/get stuff which I am intercepting in the ConnectionInterceptor and storing in meta data. I haven't added the code that actually catches exceptions on the connection and sends them to the listener. I notice that this doesn't seem to be implemented in Spy anyway.

      The ClosedInterceptor is also implemented and I've added a Hierarchy interceptor to maintain the Connection->Session->Producer/Consumer hierarchy.

      JBossMessageProducer is also fully implemented with the exception of get/set TimeToLive and get/set Priority. They seem trivial to implement but I guess there might be a catch here so I've left them for now.

      JBossSession is also implemented with the exception of the different createMessage methods, the get/set MessageListener, the run() method, durable subscriber stuff, temporary destinations, and browser stuff.

      This includes transacted session stuff although the implementation is incomplete. So far I have transacted message sends only. This has been done by implementing the TransactionInterceptor and a ResourceManager and associated classes. The ResourceManager keeps the map of Xid to transactions.

      This is reasonably similar to how it's done in Spy MQ, except I'm using an interceptor. It's not XA capable yet.

      Currently the ResourceManager is a Singleton - I'm conscious this probably needs to be scoped per Connection.

      I have some queries regarding which interceptors to put the logic in. For now I've used the TransactionInterceptor but I'm not sure whether I should put the logic in the session interceptor. There is a poissbility this needs to be refactored.

      I haven't implemented transacted acks yet. I have some questions about how to do this on previous threads in the forum.

      I've also added quite a few more tests to test the new functionality, and validated that the unit test suite runs fine still.

      The patch updates the following files:

      jms/src/etc/jms-aop.xml
      jms/src/main/org/jboss/jms/client/JBossConnectionFactory.java
      jms/src/main/org/jboss/jms/client/JBossConnection.java
      jms/src/main/org/jboss/jms/client/JBossConnectionMetaData.java
      jms/src/main/org/jboss/jms/client/JBossMessageProducer.java
      jms/src/main/org/jboss/jms/client/JBossSession.java
      jms/src/main/org/jboss/jms/client/container/ConnectionInterceptor.java
      jms/src/main/org/jboss/jms/client/container/InvokerInterceptor.java
      jms/src/main/org/jboss/jms/client/container/JMSInvocationHandler.java
      jms/src/main/org/jboss/jms/delegate/ConnectionDelegate.java
      jms/src/main/org/jboss/jms/delegate/ProducerDelegate.java
      jms/src/main/org/jboss/jms/delegate/ServerConnectionDelegate.java
      jms/src/main/org/jboss/jms/delegate/ServerProducerDelegate.java
      jms/src/main/org/jboss/jms/delegate/ServerSessionDelegate.java
      jms/src/main/org/jboss/jms/delegate/SessionDelegate.java
      jms/src/main/org/jboss/jms/server/container/InstanceInterceptor.java
      jms/src/main/org/jboss/jms/server/container/JMSAdvisor.java
      jms/tests/src/org/jboss/test/messaging/jms/ConnectionFactoryTest.java
      jms/tests/src/org/jboss/test/messaging/jms/ConnectionTest.java
      jms/tests/src/org/jboss/test/messaging/jms/MessageProducerTest.java

      And contains the following new files:

      jms/src/main/org/jboss/jms/client/container/ClosedInterceptor.java
      jms/src/main/org/jboss/jms/client/container/HierarchyInterceptor.java
      jms/src/main/org/jboss/jms/client/container/JMSMethodInvocation.java
      jms/src/main/org/jboss/jms/client/container/TransactionInterceptor.java
      jms/tests/src/org/jboss/test/messaging/jms/SessionTest.java
      jms/tests/src/org/jboss/test/messaging/jms/TransactedSessionTest.java

      I've uploaded the patch to JIRA task JBMESSAGING-34 since that's the best message.
      It also affects JBMESSAGING-37 (MesageConsumer) and JBMESSAGING-36 (MessageProducer), since some of the stuff is inextricably linked.


      Thanks

      -Tim