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

    invokeHome and invoke called on interceptor for create metho

    Eugene Clark Newbie

      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?