WELD-862 and Seam Cron
by Peter Royle
Hi,
I'm aiming to make a release of Seam Cron available within the next two weeks. Currently there is an outstanding issue (https://issues.jboss.org/browse/WELD-862) which prevents Cron from running properly with Weld. I have been able to carry on developing Cron by testing it against OpenWebBeans, but obviously if we are to release a Seam module it should work against Weld.
It would be nice if WELD-862 could be fixed as soon a possible so that all future versions will work well with Cron.
But more importantly I also probably need to do something special in Cron so that it will work with the version of Weld already deployed in JBoss AS and Glassfish, which will contain the bug. The workaround mentioned in the bug report is to deep copy the InvocationContext. I attempted to do this by serialising and unserialising the InvocationContext but couldn't due to UnserializableExceptions. Does anyone have any advice for me about how I might be able to work around this bug to support existing versions of Weld?
Cheers,
Pete R
4 days, 1 hour
BUG - CDI inside budnle doesn't see bean
by Александр Свиридов
I have two OSGI bundles:
The first contains: service, servlet, pojo
The second contains: consumer (of the service).
FACTS:
A) I inject service (bundle 1) to consumer (bundle 2) via CDI (@OSGiService) - everything is OK.
B) I inject pojo to servlet via CDI (manually using beanManager.getBeans,beanManager.resolve) - everything is OK.
C) I inject pojo to service via CDI (manually using beanManager.getBeans,beanManager.resolve) - Error - can't locate the bean.
The reason why I use manual injection is that that I couldn't get it to work with @Inject and started googling. And I found this
>CDI allows injection into non-component classes, but the instances must still be created by CDI. Your activator is instantiated by OSGi framework and CDI has no way to hook into that process. You can programmatically get hold of the CDI injection manager and request an instance from it instead of using @Inject in your main class.
I think that (C) must work, because instance is created via CDI but it doesn't. Is this a bug? How can it be fixed?
--
Александр Свиридов
11 years, 9 months