001: /*
002: * $Header: /export/home/cvsroot/MyPersonalizerRepository/MyPersonalizer/Subsystems/Kernel/Sources/es/udc/mypersonalizer/kernel/config/TransactionManagerConfig.java,v 1.1.1.1 2004/03/25 12:08:38 fbellas Exp $
003: * $Revision: 1.1.1.1 $
004: * $Date: 2004/03/25 12:08:38 $
005: *
006: * =============================================================================
007: *
008: * Copyright (c) 2003, The MyPersonalizer Development Group
009: * (http://www.tic.udc.es/~fbellas/mypersonalizer/index.html) at
010: * University Of A Coruna
011: * All rights reserved.
012: *
013: * Redistribution and use in source and binary forms, with or without
014: * modification, are permitted provided that the following conditions are met:
015: *
016: * - Redistributions of source code must retain the above copyright notice,
017: * this list of conditions and the following disclaimer.
018: *
019: * - Redistributions in binary form must reproduce the above copyright notice,
020: * this list of conditions and the following disclaimer in the documentation
021: * and/or other materials provided with the distribution.
022: *
023: * - Neither the name of the University Of A Coruna nor the names of its
024: * contributors may be used to endorse or promote products derived from
025: * this software without specific prior written permission.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
028: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
029: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
030: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
031: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
032: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
033: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
034: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
035: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
036: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
037: * POSSIBILITY OF SUCH DAMAGE.
038: *
039: */
040:
041: package es.udc.mypersonalizer.kernel.config;
042:
043: /**
044: * This is the configuration bean for the TransactionManager. It takes its data
045: * from the <code>transaction-manager</code> tag in the kernel configuration
046: * file. It contains:
047: * <ul>
048: * <li>Whether the <b>transaction cleaner</b> should be active or not.</li>
049: * <li>The <b>time out</b> period for the transaction cleaner to be woken
050: * up.</li>
051: * <li>The <b>time out</b> period for the transactions to be considered
052: * inactive.</li>
053: * </ul>
054: *
055: * @author Daniel Fernandez
056: * @author Fernando Bellas
057: * @since 1.0
058: */
059: public class TransactionManagerConfig {
060:
061: /** Whether the transaction cleaner should be active or not. */
062: private String transactionCleanerActive = null;
063:
064: /** Time out (in seconds) for the transaction cleaning thread to be activated. */
065: private String transactionCleaningTimeOutSeconds = null;
066:
067: /** Time out (in seconds) for inactive transactions. */
068: private String transactionTimeOutSeconds = null;
069:
070: /** Creates a new instance of TransactionManagerConfig. */
071: public TransactionManagerConfig() {
072: }
073:
074: /**
075: * Returns the value of the flag which indicates whether the transaction
076: * cleaner should be active.
077: *
078: * @return a String with the value of the parameter.
079: */
080: public String getTransactionCleanerActive() {
081: return transactionCleanerActive;
082: }
083:
084: /**
085: * Sets a new value for the parameter which indicates whether the
086: * transaction cleaning thread should be active or not.
087: *
088: * @param transactionCleanerActive the new value for this parameter.
089: */
090: public void setTransactionCleanerActive(
091: String transactionCleanerActive) {
092: this .transactionCleanerActive = transactionCleanerActive;
093: }
094:
095: /**
096: * Returns a String with the time out period in seconds which will be
097: * applied to the transaction cleaning thread activation.
098: *
099: * @return a String with the value of the activation period in seconds.
100: */
101: public String getTransactionCleaningTimeOutSeconds() {
102: return transactionCleaningTimeOutSeconds;
103: }
104:
105: /**
106: * Sets a new value for the time out period applied to the activation of the
107: * transaction cleaning thread.
108: *
109: * @param transactionCleaningTimeOutSeconds the new time out in seconds.
110: */
111: public void setTransactionCleaningTimeOutSeconds(
112: String transactionCleaningTimeOutSeconds) {
113: this .transactionCleaningTimeOutSeconds = transactionCleaningTimeOutSeconds;
114: }
115:
116: /**
117: * Returns the time out (in seconds) applied to transactions to be
118: * considered inactive.
119: *
120: * @return a String with the value of the time out.
121: */
122: public String getTransactionTimeOutSeconds() {
123: return transactionTimeOutSeconds;
124: }
125:
126: /**
127: * Sets a new value for the timeout period for transactions.
128: *
129: * @param transactionTimeOutSeconds the new time out in seconds.
130: */
131: public void setTransactionTimeOutSeconds(
132: String transactionTimeOutSeconds) {
133: this.transactionTimeOutSeconds = transactionTimeOutSeconds;
134: }
135:
136: }
|