Hello,
I have the following design issue which I believe that JMS will help me resolve but I am not exactly sure how. I don't think that this is a new problem and was hoping that you could help me out.
I have a product called Dog House. I have another product called Dog. Dog depends on Dog House but Dog House cannot depend on Dog. Dog House can be sold separately without Dog but Dog is sold with Dog House. Dog House keeps track of Bones. Every dog in an instance of Dog has a bone (this is where Dog depends on Dog House).
If a bone is deleted from Dog House, I want all associated Dogs to first associated themselves to the default Bone before the deleted bone is removed from the database.
The default Bone cannot be removed.
So I need to do this without creating a circular dependency of Dog House depending on Dog. This means that I cannot make the Bone
EJB go check the Dog database table and move any associated Dogs to the default bone.
I know that I can use JMS to make Dog and Dog House message without creating the dependencies but then my understanding is that I don't have any control of the timing of when the messages are received. This means that I could not ensure that Dog got moved to the default bone before I deleted the original bone which would cause a foreign key constraint problem.
Thanks for reading my "dog" of a problem.
Any help will be appreciated,
Katie Wright
[email protected]