[weld-dev] WeldBootstrap in SE

Peter Royle howardmoon at screamingcoder.com
Wed Nov 4 09:13:23 EST 2009


OK I've committed the way you suggested. Feel free to tweak.


On 05/11/2009, at 12:03 AM, Pete Muir wrote:

> 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/weld-dev
>
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev



More information about the weld-dev mailing list