{
Class conversationGroup = ConversationUtils.getConversationGroup(bean);
Set<Annotation> qualifiers = bean.getQualifiers();
EditableWindowContext editableWindowContext = (EditableWindowContext)RequestCache.getCurrentWindowContext();
if(editableWindowContext == null)
{
editableWindowContext = (EditableWindowContext)windowContextManager.getCurrentWindowContext();
//also done by the default implementation but this also ensures that custom impls are fast
RequestCache.setCurrentWindowContext(editableWindowContext);
}
try
{
if(this.useFallback)
{
WeldCache.setBean(bean);
}
return editableWindowContext
.getConversation(conversationGroup, qualifiers.toArray(new Annotation[qualifiers.size()]));
}
finally
{
if(this.useFallback)