[JBoss Seam] - Re: Injected SLSB not getting interceptors sometimes
by stu2
Here's what I see as these two SLSB are initialized by Seam when debug is on:
| 10:49:19,760 INFO [Component] Component: ingestService, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.fb.core.business.IngestServiceImpl, JNDI: IngestServiceImpl/local
| 10:49:19,762 DEBUG [Component] interceptor stack: [Interceptor(org.jboss.seam.interceptors.MethodContextInterceptor), Interceptor(org.jboss.seam.interceptors.BijectionInterceptor)]
| 10:49:19,762 DEBUG [Component] seam component not found: org.jboss.seam.core.events
| 10:49:19,762 DEBUG [Component] seam component not found: org.jboss.seam.core.events
| 10:49:19,762 INFO [Component] Component: ingestUtil, scope: STATELESS, type: STATELESS_SESSION_BEAN, class: com.fb.core.business.ingest.CsvIngestUtil, JNDI: CsvIngestUtil/local
| 10:49:19,767 DEBUG [Component] interceptor stack: [Interceptor(org.jboss.seam.interceptors.MethodContextInterceptor)]
| 10:49:19,767 DEBUG [Component] seam component not found: org.jboss.seam.core.events
| 10:49:19,767 DEBUG [Component] seam component not found: org.jboss.seam.core.events
|
So ingestUtil isn't intercepted by the BiInjectionInterceptor. I could add it explicitly, but am confused as to why one SLSB would get it and another would not.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035076#4035076
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035076
19 years, 1 month
[JBoss Seam] - Re: Injection of a stateless session bean (SLSB) into anothe
by trickyvail
Yes that worked! Thank you to both Matt and Knass.
My classes look like this:
@Local
| public interface Simple
| {
| public abstract String getName();
| }
|
| @Stateless
| @Name("simpleBean")
| public class SimpleBean implements Simple
| {
| private String name = "simple";
|
| public String getName()
| {
| return name;
| }
| }
|
| @Local
| public interface Container
| {
| public abstract String getName();
| }
|
| @Stateless
| @Name("containerBean")
| public class ContainerBean implements Container
| {
| @In(create=true)
| Simple simpleBean;
|
| public String getName()
| {
| return simpleBean.getName();
| }
| }
I'm still left wondering about the implementation details within the EJB container. I suspect that the ContainerBean is issued a proxy stub to which it maintains a reference. This would allow different pooled SimpleBeans to service the getName() method call from the ContainerBean. In this scenario I think things should work as planned. Any further insights appreciated...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035075#4035075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035075
19 years, 1 month
[JBoss Seam] - Re: Injected SLSB not getting interceptors sometimes
by stu2
I'm exploring this in the debugger, but admit it's a bit of a mystery to me where injection takes place (Interceptor driven and via the Component class I think).
Here's what I'm seeing.
In this case, IngestService is a SLSB injected into a SFSB. This is injected and initialized properly. Looking at the instance of ingestService from the SFSB shows this:
| ingestService Object_$$_javassist_1 (id=3251)
| handler ClientSideInterceptor (id=3250)
|
Got it. ClientSideInterceptor adds all of the Seamy goodness.
Step down into ingestService itself, which contains the SLSB ingestUtil. This SLSB is injected by Seam, just like the above. But ingestUtil isn't intercepted at all. This is how ingestUtil looks as seen from the SLSB bean owning it:
| ingestUtil CsvIngestUtil (id=3213)
|
It's the naked SLSB.
I'd like to figure out why this is, but interceptors are subtle. If anyone on the Seam team or otherwise could give me a pointer here I'd appreciate it.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035067#4035067
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035067
19 years, 1 month