Hi to all,
Usually in a web service that uses a ejb3 bean, for instance, we would use a jndi lookup to retrieve an instance and start working.
If I update the ejb bean and release a second version, I need to redeploy all web services that uses the bean if the bean is different? So I need decoupling...
What if I want 2 versions of that bean?
what is the best practice:
Deploy ear with ejb for each version and duplicate the code (maintenance hell when bug is discovered)
Have a ServiceLocator with (knowledge of the version asked) for the bean.
Coding through interface for "clients" and the service locator passes the correct implementation depending of version asked (drawbacks backward compatiiblity must be supported, so testing is major)