[jboss-user] [EJB 3.0] - handling ejb3 injection failure
ajay662
do-not-reply at jboss.com
Wed Sep 5 13:34:01 EDT 2007
In my servlet I want to inject an EJB, only if its available.
@EJB
| MyBeanClass myBean;
My requirement is that 'myBean' gets initialized if corresponding EJB is available in the application, otherwise it stays NULL.
Is there a way to achieve this? Is there a way to catch injection exceptions?
I don't want to do a lookup since lookup requires knowledge of application name as well and I don't want to depend on that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081436#4081436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081436
More information about the jboss-user
mailing list