Google

JBoss API: Class JDBCCommandFactory

org.jboss.ejb.plugins.jaws.jdbc
Class JDBCCommandFactory

java.lang.Object
  |
  +--org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory
All Implemented Interfaces:
JPMCommandFactory

public class JDBCCommandFactory
extends java.lang.Object
implements JPMCommandFactory

Command factory for the JAWS JDBC layer. This class is primarily responsible for creating instances of the JDBC implementations for the various JPM commands so that the JAWSPersistenceManager (actually an persistence store) can delegate to them in a decoupled manner.

This class also acts as the manager for the read-ahead buffer added in version 2.3/2.4. In order to manage this buffer, it must register itself with any transaction that is active when a finder is called so that the data that was read ahead can be discarded before completion of the transaction. The read ahead buffer is managed using Soft references, with a ReferenceQueue being used to tell when the VM has garbage collected an object so that we can keep the hashtables clean.

Version:
$Revision: 1.10.2.3 $
Author:
Justin Forder, danch (Dan Christopherson

Constructor Summary
JDBCCommandFactory(EntityContainer container, Logger log)
           
 
Method Summary
 JPMActivateEntityCommand createActivateEntityCommand()
           
 JDBCBeanExistsCommand createBeanExistsCommand()
          Singleton: multiple callers get references to the same command instance.
 JPMCreateEntityCommand createCreateEntityCommand()
           
 JPMFindEntitiesCommand createDefinedFinderCommand(FinderMetaData f)
           
 JPMDestroyCommand createDestroyCommand()
           
 JPMFindEntitiesCommand createFindAllCommand(FinderMetaData f)
           
 JPMFindEntitiesCommand createFindByCommand(java.lang.reflect.Method finderMethod, FinderMetaData f)
           
 JPMFindEntitiesCommand createFindEntitiesCommand()
          Singleton: multiple callers get references to the same command instance.
 JPMFindEntityCommand createFindEntityCommand()
           
 JPMInitCommand createInitCommand()
           
 JPMLoadEntitiesCommand createLoadEntitiesCommand()
           
 JPMLoadEntityCommand createLoadEntityCommand()
           
 JPMPassivateEntityCommand createPassivateEntityCommand()
           
 JPMRemoveEntityCommand createRemoveEntityCommand()
           
 JPMStartCommand createStartCommand()
           
 JPMStopCommand createStopCommand()
           
 JPMStoreEntityCommand createStoreEntityCommand()
           
 EntityContainer getContainer()
           
 boolean getDebug()
           
 javax.naming.Context getJavaCtx()
           
 Logger getLog()
           
 JawsEntityMetaData getMetaData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCCommandFactory

public JDBCCommandFactory(EntityContainer container,
                          Logger log)
                   throws java.lang.Exception
Method Detail

getContainer

public EntityContainer getContainer()

getJavaCtx

public javax.naming.Context getJavaCtx()

getMetaData

public JawsEntityMetaData getMetaData()

getLog

public Logger getLog()

getDebug

public boolean getDebug()

createBeanExistsCommand

public JDBCBeanExistsCommand createBeanExistsCommand()
Singleton: multiple callers get references to the same command instance.

createFindAllCommand

public JPMFindEntitiesCommand createFindAllCommand(FinderMetaData f)

createDefinedFinderCommand

public JPMFindEntitiesCommand createDefinedFinderCommand(FinderMetaData f)

createFindByCommand

public JPMFindEntitiesCommand createFindByCommand(java.lang.reflect.Method finderMethod,
                                                  FinderMetaData f)
                                           throws java.lang.IllegalArgumentException

createInitCommand

public JPMInitCommand createInitCommand()
Specified by:
createInitCommand in interface JPMCommandFactory

createStartCommand

public JPMStartCommand createStartCommand()
Specified by:
createStartCommand in interface JPMCommandFactory

createStopCommand

public JPMStopCommand createStopCommand()
Specified by:
createStopCommand in interface JPMCommandFactory

createDestroyCommand

public JPMDestroyCommand createDestroyCommand()
Specified by:
createDestroyCommand in interface JPMCommandFactory

createFindEntityCommand

public JPMFindEntityCommand createFindEntityCommand()
Specified by:
createFindEntityCommand in interface JPMCommandFactory

createFindEntitiesCommand

public JPMFindEntitiesCommand createFindEntitiesCommand()
Singleton: multiple callers get references to the same command instance.
Specified by:
createFindEntitiesCommand in interface JPMCommandFactory

createCreateEntityCommand

public JPMCreateEntityCommand createCreateEntityCommand()
Specified by:
createCreateEntityCommand in interface JPMCommandFactory

createRemoveEntityCommand

public JPMRemoveEntityCommand createRemoveEntityCommand()
Specified by:
createRemoveEntityCommand in interface JPMCommandFactory

createLoadEntityCommand

public JPMLoadEntityCommand createLoadEntityCommand()
Specified by:
createLoadEntityCommand in interface JPMCommandFactory

createLoadEntitiesCommand

public JPMLoadEntitiesCommand createLoadEntitiesCommand()
Specified by:
createLoadEntitiesCommand in interface JPMCommandFactory

createStoreEntityCommand

public JPMStoreEntityCommand createStoreEntityCommand()
Specified by:
createStoreEntityCommand in interface JPMCommandFactory

createActivateEntityCommand

public JPMActivateEntityCommand createActivateEntityCommand()
Specified by:
createActivateEntityCommand in interface JPMCommandFactory

createPassivateEntityCommand

public JPMPassivateEntityCommand createPassivateEntityCommand()
Specified by:
createPassivateEntityCommand in interface JPMCommandFactory


Copyright 2000 The JBoss Organization. All Rights Reserved.