Yeah, we should do what you have, but adjust it to be if
(deployment.getServices().contains(ServletServices.class)) which is
the correct way to check if we are inside a servlet env.
Sorry about that.
On 4 Nov 2009, at 13:53, Peter Royle wrote:
Hi,
Line 128 of WeldBootstrap (core) seems to be causing some Servlet-
specific beans/classes to be registered regardless of the environment
being booted into. The only problem with this is that it breaks in the
SE environment due to the absence of HttpSession (try building the
WebBeans SE extension for example, the test will fail).
I've put in a temporary workaround (just locally) as follows, but this
is just a hack. Anyone close to this code able to offer a permanent
solution?
private final Set<Class<?>> beanClasses =
(Environments.SE.equals(environment))
? Arrays2.<Class<?>>asSet()
: Arrays2.<Class<?>>asSet
(ConversationImpl.class, ServletConversationManager.class,
NumericConversationIdGenerator.class, HttpSessionManager.class);
Cheers,
Pete R
_______________________________________________
weld-dev mailing list
weld-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev