users@jersey.java.net

JSR 250 lifecycle mgmt/security annotations (_at_PostConstruct, _at_PreDestory) not working?

From: Alex Sherwin <alex.sherwin_at_acadiasoft.com>
Date: Fri, 3 Oct 2008 10:41:58 -0400

I was just experimenting with using @PostConstruct and @PreDestroy in my
Resource classes, as specified in the JSR:

"JAX-RS root resource classes and providers may also make use of the
following JSR 250 lifecycle management and security annotations:
@PostConstruct, @PreDestroy, @RunAs, @RolesAllowed, @PermitAll, @DenyAll and
@DeclareRoles."

I'm using Java EE 5 in Glassfish v2ur2 (SJSAS 9.1_02 actually), my WAR is
contained inside of an EAR (don't think that should make any difference). I
assume it's not the responsibility of Jersey to make these calls, but I'm
wondering if maybe someone knows why they may not be being called?


Alex Sherwin
alex.sherwin_at_acadiasoft.com