1 Reply Latest reply on Feb 21, 2005 3:00 PM by starksm64

    invokeHome and invoke called on interceptor for create metho

    eugene75

      Invoking a create() method for an entity results in two calls on container interceptors. invokeHome() is called prior to the ejbCreate() being called on the bean. The ejbCreate() method is then invoked on the bean instance. And after that the interceptor's invoke() method is called with the fully initialized bean instance. But ejbCreate() is NOT invoked a second time.

      Can someone in the JBoss group explain to me (briefly) how, and perhaps why, this works the way it does?

      We are developing a entity lifecycle interceptor that emits messages when an entity is created. The question is: On which interceptor method should we depend for the create event, invoke() or invokeHome()?

      And is this double interceptor call behavior something that will remain consistent across versions of JBoss?

        • 1. Re: invokeHome and invoke called on interceptor for create m
          starksm64

          There may be a call into the container for side effects on other plugin layers that does not result in a j2ee call. The ejbCreate is a home invocation so the invokeHome is where this should be intercepted.

          There is no guarentee for what intra-container calls will be issued as this is an implementation detail that is a function of the configured plugins and implementation.