I'm currently trying to architect a new JEE6 application to invoke EJB's and EJB methods in a generic way. Heres what im thinking...
Client applications interact with a remote stateless EJB (e.g. FinancialServiceExecutor) passing a Service Request DTO with the following properties for example:
This EJB will contain the following two method:
For each of these execute methods the Service Key is used to locate the correct EJB (e.g. OrderingEJB, Invoicing EJB etc. these maybe remote or local), this i can do using the key as driver for the JNDI lookup.
I'm struggling with how to invoke the EJB methods in a generic fashion.... i dont want to hard code methods names on client side and use reflection to perform the invocation on the EJB proxy.... is there a nice clean way to do this in JEE/CDI maybe?
Any Ideas?