0 Replies Latest reply on Oct 17, 2006 9:26 AM by Daniel Brum

    ESB Message Store

    Daniel Brum Novice

      The code is now checked in for the general Message Store implementation for the ESB - replacing the old Rosetta Object Store (still there for now until we can remove it along with other changes)

      Very simple to use - you can see full test cases in


      The design calls for a "service" implementation similar to what has already been done In the Message service (factory) - right now the only Message Store we have is a relational database persistence store. Someone could put in a file based Message Store if they wish, or something else.

      Getting a handle to the store:
      MessageStore store = MessageStoreFactory.getInstance().getMessageStore(MessageStoreType.DATABASE);

      The Interface for now is simple:
      public String addMessage(Message message);
      public Message getMessage(String uid);

      *this might change to take in a jave.net.URI following the convention Mark uses throughout his code.

      The Message Store is for now, only useful for audit purposes. It will persist Message objects into a database. DB Schema's can be found under the {esb_home}/product/install/message-store/sql/ - It's a very simple table with 3 columns: uid, type, text. We can add more info if we need to later.

      For Unit Tests, I used Kurt's hypersonic util class for starting and loading a schema at each run.

      The one big change from how the persistence worked before vs. the new way is that this store is targeted to be an audit store, not an object store like we used in Rosetta. In the Rosetta way, we could effectively use the persistence DB to give us object persistence, lookup, update, a usable domain model if we wanted to, which is what I did in the TrailBlazer, using it to update Quote Requests into the store. That is no longer the case. This store is purely for audit trail right now. Hence why the new TrailBlazer will be totally different in the next iteration.

      You will need to update your jboss-properties.xml (install/conf) with your DB properties. For Unit Testing, you should be ok as I set it up to use HSQLDB.

      Expect some minor tweaking and javadoc/documentation over the next couple of days. If you get a chance to play around with this, your feedback would be appreciated, especially with the Apache DBCP pooling stuff. One change we could add is allowing the developer when deploying the ESB to choose a J2EE datasource connection, allowing use of that pool instead of the standalone dbcp. Will also be adding more Q/A tests.