Hi ,
Im using CDI1.1 initializers and destroyer methods:
@ApplicationScoped
public class MyService {
public void init(@Observes @Initialized(ApplicationScoped.class) obj){
System.out.println("***INIT "+System.identityHashCode(this));
}
public void destroy(@Observes @Destroyed(ApplicationScoped.class) obj){
System.out.println("***Destroy "+System.identityHashCode(this));
}
}
In the logs, it shows different identityHashCodes, even though MyService is
ApplicationScoped.
This causes problems if I need to clean up instance variables.
Is this a bug? Or, should I tidy up instance variables in a different way?
I dont really like using static variables.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/CDI-Observes-ApplicationScoped-class-tp4681766.html
Sent from the TomEE Users mailing list archive at Nabble.com.