jeudi 3 mars 2016

Need to call multiple EJBs based on the input string

I have a pojo class where in I have to call multiple ejbs based on the input string. For example , if the input is a x, I have to call XServiceBean, and if it is Y, I have to call YServiceBean. I am planning to parameterise the input string x and the respective service bean in the database or xml. I do not want to put multiple if conditions or switch cases to call the service bean based on the input string.

Is there any simple pattern that i can use to achieve this. would be helpful if you can give some example thank you

Aucun commentaire:

Enregistrer un commentaire