Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004186 [Resin] major always 08-23-10 11:18 11-11-10 11:11
Reporter reza View Status public  
Assigned To ferg
Priority high Resolution fixed  
Status closed   Product Version 4.0.10
Summary 0004186: Life-cycle call-back methods should be transactional
Description Life-cycle call-back methods (@PostConstruct/@PreDestroy) should be transactional and support transaction meta-data including BMT meta-data as well as EJB session context transaction related methods. This is especially true for Singletons and is a requirement of the EJB 3.1 specification. This should probably be extended to CDI managed beans targeted for Java EE 7.

Here is an example:

@Singleton
public class SomeBean {

  @PostConstruct
  private void init()
  {
    // Should be in a CMT REQUIRED transaction by default.
  }

  public void doSomething()
  {
    // Should be in a CMT REQUIRED transaction by default.
  }

  @PreDestroy
  private void destroy()
  {
    // Should be in a CMT REQUIRED transaction by default.
  }
}
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
08-23-10 11:18 reza New Issue
11-11-10 11:11 ferg Assigned To  => ferg
11-11-10 11:11 ferg Status new => closed
11-11-10 11:11 ferg Resolution open => fixed
11-11-10 11:11 ferg Fixed in Version  => 4.0.13


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker