FileDocCategorySizeDatePackage
BootstrapContextImpl.javaAPI DocGlassfish v2 API4796Fri May 04 22:34:22 BST 2007com.sun.enterprise.connectors

BootstrapContextImpl

public final class BootstrapContextImpl extends Object implements javax.resource.spi.BootstrapContext
BootstrapContext implementation.
author
Qingqing Ouyang, Binod P.G
see
com.sun.enterprise.connectors.work.CommonWorkManager
see
com.sun.enterprise.connectors.work.WorkManagerFactory

Fields Summary
private javax.resource.spi.work.WorkManager
wm
private javax.resource.spi.XATerminator
xa
private String
moduleName
private String
poolId
private static final Logger
logger
Constructors Summary
public BootstrapContextImpl()
Constructs a BootstrapContext with default thread pool for work manager.

throws
ConnectorRuntimeException If there is a failure in retrieving WorkManager.


                                      
        
        wm = WorkManagerFactory.getWorkManager(null);
    
public BootstrapContextImpl(String poolId)
Constructs a BootstrapContext with a specified thread pool for work manager.

throws
ConnectorRuntimeException If there is a failure in retrieving WorkManager.

        this.poolId = poolId;
        wm = WorkManagerFactory.getWorkManager(poolId);
    
Methods Summary
public java.util.TimercreateTimer()
Creates a java.util.Timer instance. This can cause a problem, since the timer threads are not actually under appserver control. We should override the timer later.

return
java.util.Timer object.

        return new Timer();
    
public javax.resource.spi.work.WorkManagergetWorkManager()
Retrieves the work manager.

return
WorkManager instance.
see
com.sun.enterprise.connectors.work.CommonWorkManager
see
com.sun.enterprise.connectors.work.WorkManagerFactory

        if (wm == null) {
            try {
                wm = WorkManagerFactory.getWorkManager(poolId);
            } catch(Exception e) {
           	logger.log(Level.SEVERE, "workmanager.instantiation_error", e);
            }
        }
        return wm;
    
public javax.resource.spi.XATerminatorgetXATerminator()
Retrieves the XATerminator object.

        if (xa == null) {
            xa = Switch.getSwitch().getTransactionManager().getXATerminator();
        }
        return xa;