205206207208209210211212213214215216217218
if (timeout != 0L) { if ((System.currentTimeMillis() - conv.getActiveTime()) > timeout) { ConversationContext ctx = getConversationContext(conv); if (ctx != null) { ctx.destroy(); } it.remove(); } }
103104105106107108109110111112113
} catch(Exception e) { //TCK tests manager.addConversationContext(this, new ConversationContext()); } } //Already started conversation. else {
113114115116117118119120121122123
//Throw Busy exception throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation"); } else { ConversationContext conversationContext = conversationManager.getConversationContext(conversation); ContextFactory.initConversationContext(conversationContext); } } } }
538539540541542543544545546547548549
{ if (context == null) { if(conversationContext.get() == null) { ConversationContext newContext = new ConversationContext(); newContext.setActive(true); conversationContext.set(newContext); } else {
561562563564565566567568569570571572573574575
/** * Destroy conversation context. */ private void destroyConversationContext() { ConversationContext context = getConversationContext(); if (context != null) { context.destroy(); } conversationContext.set(null); conversationContext.remove(); }
118119120121122123124125126127128
106107108109110111112113114115116
161162163164165166167168169170171172173174
while (it.hasNext()) { conv = (ConversationImpl) it.next(); if (conv.getSessionId().equals(sessionId)) { ConversationContext ctx = getConversationContext(conv); if (ctx != null) { ctx.destroy(); } it.remove(); } } }
203204205206207208209210211212213214215216
if (timeout != 0L) { if ((System.currentTimeMillis() - conv.getActiveTime()) > timeout) { ConversationContext ctx = getConversationContext(conv); if (ctx != null) { ctx.destroy(); } it.remove(); } } }
979899100101102103104105106107
manager.addConversationContext(this, (ConversationContext) BeanManagerImpl.getManager().getContext(ConversationScoped.class)); }catch(Exception e) { //TCK tests manager.addConversationContext(this, new ConversationContext()); } } //Already started conversation. else {