站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 server API Documentation 英文版文档

JDBCCommandFactory (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档


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

java.lang.Object
  extended byorg.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory
All Implemented Interfaces:
JPMCommandFactory

public class JDBCCommandFactory
extends 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.21 $

Revisions:

20010621 Bill Burke:

  • createDefinedFinderCommand creates different objects based on the read-head flag of the FinderMetaData.

20010621 danch:

  • extended Bill's change to work on other finder types; removed stale todos.

20010812 vincent.harcq@hubmethods.com:

  • Get Rid of debug flag, use log4j instead
Author:
Justin Forder, danch (Dan Christopherson), Bill Burke

Constructor Summary
JDBCCommandFactory(EntityContainer container)
           
 
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(Method finderMethod, FinderMetaData f)
           
 JPMFindEntitiesCommand createFindEntitiesCommand()
          Singleton: multiple callers get references to the same command instance.
 JPMFindEntityCommand createFindEntityCommand()
           
 JPMInitCommand createInitCommand()
           
 JPMLoadEntityCommand createLoadEntityCommand()
           
 JPMPassivateEntityCommand createPassivateEntityCommand()
           
 JPMRemoveEntityCommand createRemoveEntityCommand()
           
 JPMStartCommand createStartCommand()
           
 JPMStopCommand createStopCommand()
           
 JPMStoreEntityCommand createStoreEntityCommand()
           
 void destroy()
           
 EntityContainer getContainer()
           
 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)
                   throws Exception
Method Detail

destroy

public void destroy()
Specified by:
destroy in interface JPMCommandFactory

getContainer

public EntityContainer getContainer()

getMetaData

public JawsEntityMetaData getMetaData()

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(Method finderMethod,
                                                  FinderMetaData f)
                                           throws IllegalArgumentException
Throws:
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

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 © 2002 JBoss Group, LLC. All Rights Reserved.