Hello,
We are porting our app from cdi-utls to the ‘official’ Vaadin CDI addon and I am having an issue getting CDI to work properly.
We have a ear structure with skinny wars built using Maven
ear
|
±ejb.jar
|
±ui.war
|
±lib*.jar
All the libs reside in the lib directory and the war and ejb manifest also reflects this. The vaadin-cdi-1.0.0.alpah1.jar is there also.
My ui war has a empty bean.xml file within the WEB-INF and no web.xml or jboss-web.xml file (we used to have them, but I will migrate this once the UI ‘starts’).
My ui class looks like this …
@SuppressWarnings(“serial”)
@CDIUI(value=“ui”)
@PreserveOnRefresh
public class MyUI extends UI {
@WebServlet(urlPatterns = "/*", initParams = { //
@WebInitParam(name = VaadinSession.UI_PARAMETER, value = "com.bla.bla.ui.MyUI"), //
@WebInitParam(name = Constants.PARAMETER_WIDGETSET, value = "com.bla.bla.ui.MyWidgetset"), //
@WebInitParam(name = Constants.SERVLET_PARAMETER_UI_PROVIDER, value = "com.vaadin.cdi.CDIUIProvider") //
})
public static class UIApplicationServlet extends VaadinServlet {
// NO-OP
}
@Inject
private NavigatorContainer navigator;
@Inject
private CookieManager cookieManager;
@Inject
private MainView mainView;
@Inject
private LocalizationService localizedText;
@Inject
private SystemMessagesProviderImpl systemMessagesProvider;
@Inject
EventService eventService;
@Inject
UserService userService;
@Inject
private LocaleSelection localeSelection;
/* Root layout */
CssLayout root = new CssLayout();
@PostConstruct
private void init() {
eventService.register(this);
}
@Override
protected void init(final VaadinRequest request) {
setSystemMessagesProvider();
initializeNavigator();
setContent(root);
root.addStyleName("root");
root.setSizeFull();
// Once everything is setup, we go ahead and localize
handleCookies(request);
}
My issue is that none of my injection points get injected and I don't see my UI getting registered like mentionned in the example:
INFO 1 beans inheriting from UI discovered!
INFO Available Vaadin UIs for CDI deployment [exampleCDIUI]
I am using Vaadin 7.1.6 and I am deploying on JBoss 7.1 but it seems WildFly gives me the same behaviour
Any help would be appreciated ...
Thanks !