org.openejb.deployment.pkgen
Class TranQLPKGenBuilder
java.lang.Object
org.openejb.deployment.pkgen.TranQLPKGenBuilder
- All Implemented Interfaces:
- PKGenBuilder
- public class TranQLPKGenBuilder
- extends Object
- implements PKGenBuilder
Process the key-generator element in a deployment descriptor, and create
a matching PrimaryKeyGenerator object. This is a common utility which
can be invoked by the builder of any other schema which includes nested
key-generator elements.
This implementation generates TranQL PrimaryKeyGenerator classes, and
likely would not work with a different CMP engine.
Note that this class caches certain data, so it's best to reuse one
instance instead of creating a separate instance for each EJB that uses
a key generator.
For the XML format, see the schema openejb-pkgen.xsd
- Version:
- $Revision: 446119 $ $Date: 2006-03-23 01:47:50 +0100 (Thu, 23 Mar 2006) $
Method Summary |
static org.apache.geronimo.gbean.AbstractNameQuery |
buildAbstractNameQuery(org.apache.geronimo.kernel.repository.Artifact configId,
String module,
String name,
String type)
|
org.tranql.pkgenerator.PrimaryKeyGenerator |
configurePKGenerator(org.openejb.xbeans.pkgen.EjbKeyGeneratorType config,
TransactionManager tm,
DataSource dataSource,
Class pkClass,
org.apache.geronimo.j2ee.deployment.EARContext earContext)
Creates a PrimaryKeyGenerator object from the XML and other input data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TranQLPKGenBuilder
public TranQLPKGenBuilder()
configurePKGenerator
public org.tranql.pkgenerator.PrimaryKeyGenerator configurePKGenerator(org.openejb.xbeans.pkgen.EjbKeyGeneratorType config,
TransactionManager tm,
DataSource dataSource,
Class pkClass,
org.apache.geronimo.j2ee.deployment.EARContext earContext)
throws org.apache.geronimo.common.DeploymentException,
org.tranql.ql.QueryException
- Creates a PrimaryKeyGenerator object from the XML and other input data.
Note that the PrimaryKeyGenerator is constructed at deployment time, but
may be stored (serialized) and later restored (deserialized) and run
without an additional deployment operation. That means the key
generator does not hardcode access to a database, for example, but must
be prepared to acquire a new data source after deserialization.
- Specified by:
configurePKGenerator
in interface PKGenBuilder
- Parameters:
config
- The XMLBeans object tree representing the key-generator element in the XML documenttm
- The TransactionManager that the key generator should use, if neededdataSource
- The JDBC data source that the key generator should usepkClass
- The key generator should return IDs of this typeearContext
- Used by the key generator when it needs to register a GBean for any reason
- Returns:
- The configured PrimaryKeyGenerator
- Throws:
org.apache.geronimo.common.DeploymentException
org.tranql.ql.QueryException
buildAbstractNameQuery
public static org.apache.geronimo.gbean.AbstractNameQuery buildAbstractNameQuery(org.apache.geronimo.kernel.repository.Artifact configId,
String module,
String name,
String type)
Copyright © 1999-2006 OpenEJB. All Rights Reserved.