Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle lifecycle CDI events [PAXCDI-6] #45

Closed
ops4j-issues opened this issue Jul 20, 2012 · 2 comments
Closed

Bundle lifecycle CDI events [PAXCDI-6] #45

ops4j-issues opened this issue Jul 20, 2012 · 2 comments
Labels
Milestone

Comments

@ops4j-issues
Copy link

ops4j-issues commented Jul 20, 2012

Harald Wellmann created PAXCDI-6

Bundle lifecycle events (org.osgi.framework.BundleEvent) shall be observable by CDI beans as CDI events.

This covers the following from RFP 146:

CDI025 - The specification SHOULD provide activation and de-activation callbacks similar to the BundleActivator
methods to CDI beans in an OSGi Framework.


Fixed in: 1.0.0
Votes: 1, Watches: 3


Referenced issues

is duplicated by:

@ops4j-issues
Copy link
Author

Harald Wellmann commented

It is not obvious how to synchronize bundle and CDI lifecycle events.

I've tried implementing this feature a long time ago and left it with the following failing test:

https://github.com/ops4j/org.ops4j.pax.cdi/blob/master/itest/src/it/itest-standalone/src/test/java/org/ops4j/pax/cdi/test/BundleEventTest.java

The test fails with the PR #21 applied locally.

@ops4j-issues
Copy link
Author

Grzegorz Grzybek commented

I've fixed the test. The problem was ordering. If bundle is started before pax-cdi, you'll get notified, but without actual event (STARTED, STOPPED) - because the event will be artificial event from org.osgi.util.tracker.AbstractTracked#trackInitial()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant