1 May 2007 - 20:04Some cool things about working with multiple systems

Weblogic’s implementation of JMS allows for redelivery of the message on exceptions. Sometimes this helps, especially when interacting with outside systems (say that you have an MDB that should forward messages to an external system. If you cannot connect to the external system the exception thrown will put back the MDB message in the JMS queue and the message will try to be redelivered).

It is nice to be able to provide alternate views of the same entity easily. This can be done thru alternative types. One nice things about providing alternate views of the same entity is that you can reconcile systems more easily.

Sometimes you can use sub-classing for dealing with tightly coupled systems. System A is using system B as a data repository and A is getting data from B using B’s DTOs. Unfortunately for A, A doesn’t transform these DTOs into its internal representation of the same data. B is about to make a massive refactoring of its code and this includes the DTOs and relationships between them. In order to have A use the same DTOs as before B decided that the new DTOs will sub-class the old ones, this way A will not have to change all the code that is using those DTOs (and which is massive). The new DTOs will sub-class the old ones, implement the old relationships and the new ones. If you think about it it is pretty bad: you cannot sub-class ad-nauseum and sometimes you may get a collision between the old relationships and the new ones. But it does its job.

No Comments | Tags: Development, Things for me

Add a Comment