super(factory);
}
public <T> void visitClass(Class<T> clazz, JavaImplementation type) throws IntrospectionException {
ConversationAttributes conversation = clazz.getAnnotation(ConversationAttributes.class);
if (conversation == null) {
return;
}
Scope scope = clazz.getAnnotation(Scope.class);
if (scope == null) {
// implicitly assume conversation
type.setJavaScope(org.apache.tuscany.sca.implementation.java.impl.JavaScopeImpl.CONVERSATION);
} else if (scope != null && !"CONVERSATION".equals(scope.value().toUpperCase())) {
throw new InvalidConversationalImplementation(
"Service is marked with @ConversationAttributes but the scope is not @Scope(\"CONVERSATION\")"
);
} else if (conversation != null) {
long maxAge;
long maxIdleTime;
String maxAgeVal = conversation.maxAge();
String maxIdleTimeVal = conversation.maxIdleTime();
if (maxAgeVal.length() > 0 && maxIdleTimeVal.length() > 0) {
throw new InvalidConversationalImplementation("Max idle time and age both specified");
}
try {
if (maxAgeVal.length() > 0) {