Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1068

@Interceptors defined on @Service EJBs do not have @PostConstruct @PreDestroy interceptor methods invoked

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • AS 4.2.1.GA
    • EJB3 Extensions
    • None
    • Workaround Exists
    • Hide

      Workaround is to change the @PostConstruct interceptor to an @AroundInvoke and define the service start() method on the EJB business interface.

      Show
      Workaround is to change the @PostConstruct interceptor to an @AroundInvoke and define the service start() method on the EJB business interface.

    Description

      I've defined an injection-style interceptor class that needs to be called before a @Service EJBs start() method is invoked on service startup. Using @PostConstruct doesn't not work (the container never calls my @PostConstruct annotated method). @AroundInvoke only works for methods defined on the @Local or @Remote business interface, not the @Management interface.

      Shouldn't @PostConstruct and @PreDestroy be invoked on @Service EJBs? I need my interceptor to behave like the standard injection interceptors do.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mckibben_jira Michael McKibben (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: