I am aware that a fundamental part of the ejb architecture is that an ejb must be unique, that is there must be a way of identifying one ejb from another to support the many features of distribution, concurrency etc. From the database point of view, this is realised using primary keys, and is enforced at run-time (an exception is raised if duplicates are found based on pks).
This is fine, but we have a problem with our client in that they do not manage pks as such within their db implementation (db2 btw). It is occuring that we are finding duplicates and these are causing problems with the application. In fact it is quite frustrating as it is seen as an application problem when in reality it is a mismatch between legacy db implementation and our techincal arhictecture. If we realised at the start of the project.....
Anyway, does anyone have any ideas on how we might be able to manage these type of problems within the application, without having to massage the db directly? This is because as part of our architecture we are taking a nightly snapshot of the data and working on this (large dataset....) and it is already intensive. We are reluctant to add further complications at this level (but of course if it is the only option then so be it...)
I can guess the amount of worms involved here, but would like to know if anyone out there has dealt with a similar problem.
Any and all comments appreciated,