/* Generated by Together */

package cobalt.deployment.descriptor.dist;

import cobalt.deployment.descriptor.EjbDescriptor;

/**
 * Title:        WebLogic 6.x stateful session ejb component descriptor
 * Description:  Represents WebLogic 6.x-specific stateful session ejb component for standard stateful session ejb component
 * Copyright:    Copyright (c) 2001
 * Company:      ETRI
 * @author Yeon Jun Choi
 * @version 1.0
 */

public class Weblogic60StatefulEjbDescriptor extends Weblogic60EjbDescriptor {
    public Weblogic60StatefulEjbDescriptor(EjbDescriptor descriptor) {
        super(descriptor);
    }

    public int getMaxBeansInCache(){
            return getInt("max-beans-in-cache", 100);
        }

    public String getMaxBeansInCacheString(){
            return getString("max-beans-in-cache");
        }

    public void setMaxBeansInCache(int maxBeansInCache){
            setInt("max-beans-in-cache", maxBeansInCache);
        }

    public int getIdleTimeoutSec(){
            return getInt("idle-timeout-seconds", 600);
        }

    public String getIdleTimeoutSecString(){
            return getString("idle-timeout-seconds");
        }

    public void setIdleTimeoutSec(int idleTimeoutSec){
            setInt("idle-timeout-seconds", idleTimeoutSec);
        }

    public int getReadTimeoutSec(){
            return getInt("read-timeout-seconds", 600);
        }

    public String getReadTimeoutSecString(){
            return getString("read-timeout-seconds");
        }

    public void setReadTimeoutSec(int readTimeoutSec){
            setInt("read-timeout-seconds", readTimeoutSec);
        }

    public String getPassivStrategy(){
            return getString("passivate-strategy");
        }

    public void setPassivStrategy(String passivStrategy){
            setString("passivate-strategy", passivStrategy);
        }

    public String getPersistentStoreDir(){
            return getString("persistent-store-dir");
        }

    public void setPersistentStoreDir(String persistentStoreDir){
            setString("persistent-store-dir", persistentStoreDir);
        }

    public String getReplicationType(){
            return getString("replication-type");
        }

    public void setReplicationType(String replicationType){
            setString("replication-type", replicationType);
        }

    public String getCacheType(){
            return getString("cache-type");
        }

    public void setCacheType(String cacheType){
            setString("cache-type", cacheType);
        }

    public boolean allowConcurrentCalls(){
            return getBoolean("allow-concurrent-calls", false);
        }

    public String allowConcurrentCallsString(){
            return getString("allow-concurrent-calls");
        }

    public void setConcurrentCall(boolean concurrentCall){
            setBoolean("allow-concurrent-calls", concurrentCall);
        }

/*
    private int maxBeansInCache;
    private int idleTimeoutSec;
    private int readTimeoutSec;
    private String passivStrategy;
    private String persistentStoreDir;
    private String replicationType;
    private boolean concurrentCall;
*/
    public static String[] REPLICATION_TYPE = { "InMemory", "None" };
    public static String[] PASSIVATION_STRATEGY = { "Default", "Transaction" };
    public static String[] CACHE_TYPE = { "NRU", "LRU" };
}
