if (LOG.isDebugEnabled()) {
LOG.debug("Adding method [{}] as a Begin Action for conversation [{}]", methodName, conversation);
}
if (method.isAnnotationPresent(BeginConversation.class)) {
BeginConversation config = method.getAnnotation(BeginConversation.class);
long maxIdle = config.maxIdleTimeMillis();
if (maxIdle == -1L) {
maxIdle = this.maxIdleTimeMillis;
}
int maxInstance = config.maxInstances();
if (maxInstance == 0) {
maxInstance = this.maxInstances;
}
configuration.addBeginAction(methodName, maxIdle, config.maxIdleTime(), maxInstance, config.transactional());
} else {
configuration.addBeginAction(methodName, this.maxIdleTimeMillis, "", this.maxInstances, false);
}
}
}
//end action methods
Collection<String> methodEndConversations = this.arbitrator.getEndConversations(clazz, method);
if (methodEndConversations != null) {
for (String conversation : methodEndConversations) {
ConversationClassConfiguration configuration = temporaryConversationMap.get(conversation);
if (configuration == null) {
configuration = new ConversationClassConfigurationImpl(conversation);
temporaryConversationMap.put(conversation, configuration);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Adding method [{}] as an End Action for Conversation [{}]", methodName, conversation);
}
if (method.isAnnotationPresent(EndConversation.class)) {
EndConversation config = method.getAnnotation(EndConversation.class);
configuration.addEndAction(methodName, config.accessibleFromView());
} else {
configuration.addEndAction(methodName, false);
}
}
}