-
1. Re: Interception of subclass methods
cptnkirk Jun 5, 2006 2:52 PM (in response to iradix)I can hazard a guess. Seam injects at the Seam component level. Your abstract class isn't a Seam component because you can't have abstract Seam components. Your Seam component can extend an abstract class, and the Seam annotations on this class are properly recognized. However, once you make a call on a method that isn't part of your component SFSB's business interface this call isn't intercepted, you don't have a valid context and get the error.
Have you tried adding these parent methods to the SFSB's interface (extended the child interface from the parent interface)? -
2. Re: Interception of subclass methods
iradix Jun 5, 2006 3:01 PM (in response to iradix)I appreciate your feedback but not only have I tried it that way, I haven't tried it any other way. I'm actually injecting the component into a field of the local interface type, so just calling the method proves that it's available as part of the SFSB. I've also checked the logs to make sure the component is deployed as a conversation scoped SFSB at startup.
I'm in the process of upgrading to CR3 at the moment and I think that might have fixed the problem. After taking a look through the Seam source (Beta 2) I didn't see any reason it would have preferentially intercepted some methods and not others so my theory is that it was a bug in how interceptors were applied in the EJB embedded server that came with that release. -
3. Re: Interception of subclass methods
gavin.king Jun 5, 2006 3:58 PM (in response to iradix)What kind of EntityManager is it? @PersistenceContext, or @In?
-
4. Re: Interception of subclass methods
iradix Jun 5, 2006 4:01 PM (in response to iradix)It's seam managed, @In(create = true) and it works like a charm as long as the method being called isn't part of the super-class/interface.
-
5. Re: Interception of subclass methods
gavin.king Jun 5, 2006 4:09 PM (in response to iradix)OK, well let me know if it is fixed by the latest EJB3 release.
-
6. Re: Interception of subclass methods
iradix Jun 5, 2006 5:06 PM (in response to iradix)It does seem to have fixed the problem. I'm surprised no one has run across that before.