Hi all
Sorry for one more message but I have rather strange situation. I use
pax-cdi -1.0.0.RC2 and weld 2.3.5.Final.
This is the test class:
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Destroyed;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Observes;
@ApplicationScoped
public class Test {
public Test() {
System.out.println("Test was created.");
}
public void init(@Observes @Initialized(ApplicationScoped.class) Object
init) {
System.out.println("Test was initialized");
}
public void destroy(@Observes @Destroyed(ApplicationScoped.class)
Object init) {
System.out.println("Test was destroyed.");
}
}
When I start test-bundle I see the following output:
Test was created.
Test was initialized
Test was initialized
When I stop test-bundle I see the following output:
Test was destroyed.
Test was created.
Test was destroyed.
So as result this bean was two times created, two times initialized and two
times destroyed.
I expected that this bean must be once created, one initialized and once
destroyed.
Is this a bug that must be reported or my mistake?
Best regards, Pavel
--
--
------------------
OPS4J - http://www.ops4j.org - [email protected]
---
You received this message because you are subscribed to the Google Groups
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.