FileDocCategorySizeDatePackage
AbstractPersistenceStrategyBuilder.javaAPI DocGlassfish v2 API4138Fri May 04 22:32:56 BST 2007com.sun.ejb.base.sfsb.initialization

AbstractPersistenceStrategyBuilder

public abstract class AbstractPersistenceStrategyBuilder extends Object implements com.sun.ejb.spi.sfsb.initialization.PersistenceStrategyBuilder
(Abstract)Base class for all the PersistenceStrategyBuilders. Any code that is common to both HADB and File StoreManagers can be put here.
author
Mahesh Kannan

Fields Summary
protected static final Logger
_logger
protected com.sun.ejb.spi.sfsb.initialization.SFSBContainerInitialization
container
protected com.sun.enterprise.deployment.EjbDescriptor
descriptor
private int
removalGracePeriodInSeconds
protected String
passedInPersistenceType
Constructors Summary
public AbstractPersistenceStrategyBuilder()


      
    
Methods Summary
public java.lang.StringgetPassedInPersistenceType()

        return passedInPersistenceType;
    
protected intgetRemovalGracePeriodInSeconds()

	return this.removalGracePeriodInSeconds;
    
public voidinitializePersistenceStrategy(com.sun.ejb.spi.sfsb.initialization.SFSBContainerInitialization container, com.sun.enterprise.deployment.EjbDescriptor descriptor)

	this.container = container;
	this.descriptor = descriptor;

	CacheProperties cacheProps = new CacheProperties(descriptor);
	int removalTimeout = cacheProps.getRemovalTimeoutInSeconds();
	if (removalTimeout > 0) {
	    this.removalGracePeriodInSeconds = removalTimeout / 2;
	}
	container.setRemovalGracePeriodInSeconds(removalGracePeriodInSeconds);
    
public voidsetPassedInPersistenceType(java.lang.String persistenceType)

        passedInPersistenceType = persistenceType;