-
1. Re: Weld & EJBs (3.1)
mkouba Mar 12, 2014 4:18 AM (in response to notify)1 of 1 people found this helpfulHi Roger,
I'm not sure I understand your use case completely, but generally yes, it is possible (provided the CDI bean has a bean name declared). However keep in mind that there are significant differences between Seam2 and CDI, e.g. in CDI there's no "bijection".
I'd recommend you to go through the following links:
-
2. Re: Weld & EJBs (3.1)
notify Mar 12, 2014 6:08 AM (in response to mkouba)Martin,
Thanks for the comprehensive set of links. Found some of those last night and things are a lot clearer.
Have printed off your PPT presentation "CDI for Seam 2 developers" which I found very concise & useful.
BTW you say 'in CDI there's no "bijection"' however on slide 7 it says "Core - bijection'.
Is the presentation available as a video from the conference you presented at?
Thanks,
Roger
-
3. Re: Weld & EJBs (3.1)
mkouba Mar 12, 2014 6:11 AM (in response to notify)I think it was available but I can't find it right now...
-
4. Re: Weld & EJBs (3.1)
pgmjsd Mar 13, 2014 4:33 PM (in response to notify)I've used Seam 2 and CDI. CDI can definitely recognize EJB3.1 beans as components in pretty much the same way you can with Seam 2. With EJB3.1 you may not even need to define a local interface, but that may come with some restrictions because the container might not be able to intercept in the same way.
"EJB remote interfaces are not bean types of a Session Bean, and therefore cannot be injected directly"
Makes sense / sounds right. I've never tried to use an @Remote interface for an EJB as a Seam 2 component, but I'd guess that it wouldn't work in CDI or in Seam 2. I don't think you'd want to do that anyway, because you want your backing beans to be quickly accessible when JSF is rendering your XHTML views. In the cases where I had to use an EJB remotely, I would define a local EJB (or POJO) component and use that as a wrapper.
HTH