Given the way the rest of the spec is written, section 6.2 is sort of confusing. I am guessing the reason you can't use those annotations with Jersey is because it speculatively supported in Java EE 6 which still isn't final. So section 6.2 is the one designated as subject to change. It doesn't go into specifics either I think for this reason.
Yeah it's a confusing, but it's a way to reserve a spot in the spec of another component I guess.
-Greg
-----Original Message-----
From: Alex Sherwin [mailto:alex.sherwin_at_acadiasoft.com]
Sent: Friday, October 03, 2008 7:42 AM
To: Jersey Users
Subject: [Jersey] JSR 250 lifecycle mgmt/security annotations (@PostConstruct, @PreDestory) not working?
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net