Given a JNDI EJB3 service name, I would like to be able to determine, via reflection, what annotations are present on the implementation Class object of of the EJB3.
If com.fake.Service is an interface and an implementation, com.fake.ServiceImpl, has a @Stateful annotation (binding it to the JNDI name "com.fake.Service"), I would like to read that the implementation has that @Stateful annotation on it. The client code only knows the name of the service and does not know that the implementation is com.fake.ServiceImpl.
Any suggestions? Can I do this through JNDI?
Thanks in advance,
Not really possible using JNDI, but you could create a method that all your beans implement and have an EJB 3 interceptor do the reflection.