1 Reply Latest reply on Aug 28, 2008 10:53 AM by wolfc

    Delegating all invocations to ejb3-interceptors AbstractCont

    wolfc

      For some methods on EJBContext we need to know the invocation context in which we're invoked to actually allow or disallow a request. Right now we analyse not the invocation context, but the security context or transaction context and give the real answer back.

      For example setRollbackOnly in @PostConstruct on a SFSB runs within the transaction context of the caller, so it works correctly.
      But the spec defines the transaction context of a lifecycle callback as being unknown, thus it's actually not allowed.

      So what if we delegate all invocations to ejb3-interceptors AbstractContainer (including the actual injection (instead of field.set etc))?
      Then ejb3-interceptors always knows the current invocation context.
      This also means we don't set the current invocation interceptor anymore in aop.xml.

        • 1. Re: Delegating all invocations to ejb3-interceptors Abstract
          wolfc

          I've made something that meets the middle ground. In ejb3-interceptors there is an interface InjectionInvocation which is implemented by the InjectionInvocation in ejb3-core which as a target invokes the actual injector.

          The alternative was to rewrite all injectors to use another sort of reflection API (on top of AbstractContainer) to allow for setting values via AbstractContainer.