CDI Utils with multipleUIs

I am giving CDI_Utils a try. It works fine with one UI, but I would like to have more than one UI. I have a bit of sample code. Any suggestions for how to get this to work?

Here’s the first UI – it works fine by itself.


public class CdiutilstestUI extends UI
{

	public static final String UI_NAME = "com.example.cdiutilstest.CdiutilstestUI";

	@WebServlet(urlPatterns = "/*", initParams = {
			@WebInitParam(name = VaadinSession.UI_PARAMETER, value = UI_NAME),
			@WebInitParam(name = Constants.SERVLET_PARAMETER_UI_PROVIDER, value = CdiUIProvider.PROVIDER_NAME) })
	public static class CDITestMainServlet extends VaadinServlet
	{
	}

	@Override
	protected void init(VaadinRequest request)
	{
		final VerticalLayout layout = new VerticalLayout();
		layout.setMargin(true);
		setContent(layout);

		Button button = new Button("Click Me -- MAIN");
		button.addClickListener(new Button.ClickListener()
		{
			public void buttonClick(ClickEvent event)
			{
				layout.addComponent(new Label("Thank you for clicking -- MAIN"));
			}
		});
		layout.addComponent(button);
	}
}

And now when I add this one it fails.


public class OneUI extends UI
{

	public static final String UI_NAME = "com.example.cdiutilstest.one.OneUI";

	@WebServlet(urlPatterns = {"one/*", "VAADIN/*"}, initParams = {
			@WebInitParam(name = VaadinSession.UI_PARAMETER, value = UI_NAME),
			@WebInitParam(name = Constants.SERVLET_PARAMETER_UI_PROVIDER, value = CdiUIProvider.PROVIDER_NAME) })
	public static class CDITestOneServlet extends VaadinServlet
	{
	}

	@Override
	protected void init(VaadinRequest request)
	{
		final VerticalLayout layout = new VerticalLayout();
		layout.setMargin(true);
		setContent(layout);

		Button button = new Button("Click Me -- ONE");
		button.addClickListener(new Button.ClickListener()
		{
			public void buttonClick(ClickEvent event)
			{
				layout.addComponent(new Label("Thank you for clicking -- ONE"));
			}
		});
		layout.addComponent(button);
	}
}

Thanks for any help