Package org.springframework.extensions.webscripts

Examples of org.springframework.extensions.webscripts.TransactionParameters


      final DescriptionImpl description) {
    Assert.notNull(transaction, "Annotation cannot be null.");
    Assert.hasText(beanName, "Bean name cannot be empty.");
    Assert.notNull(description, "Description cannot be null.");

    final TransactionParameters transactionParameters = new TransactionParameters();
    final RequiredTransaction requiredTransaction;
    switch (transaction.value()) {
    case NONE:
      requiredTransaction = RequiredTransaction.none;
      break;
    default:
      // Fall through
    case REQUIRED:
      requiredTransaction = RequiredTransaction.required;
      break;
    case REQUIRES_NEW:
      requiredTransaction = RequiredTransaction.requiresnew;
      break;
    }
    transactionParameters.setRequired(requiredTransaction);
    if (transaction.readOnly()) {
      transactionParameters.setCapability(TransactionCapability.readonly);
    } else {
      transactionParameters.setCapability(TransactionCapability.readwrite);
    }
    transactionParameters.setBufferSize(transaction.bufferSize());
    description.setRequiredTransactionParameters(transactionParameters);
  }
View Full Code Here

TOP

Related Classes of org.springframework.extensions.webscripts.TransactionParameters

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.