© 2002 BEA Systems, Inc.


com.beasys.commerce.ebusiness.catalog.service
Class JdbcCatalogServiceImpl

java.lang.Object
  |
  +--com.beasys.commerce.foundation.SessionImpl
        |
        +--com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
              |
              +--com.beasys.commerce.ebusiness.catalog.service.JdbcCatalogServiceImpl
Direct Known Subclasses:
JdbcCatalogQueryManagerImpl, JdbcCategoryManagerImpl, JdbcProductItemManagerImpl

public class JdbcCatalogServiceImpl
extends CatalogServiceImpl

This is the base service implementation for all JDBC-based Catalog services. It contains common functionality that all JDBC-based Catalog services must implement; therefore, all JDBC-based Catalog service implementations should extend this class.

The JdbcCatalogService depends upon several environment variables to dictate its runtime behavior:

See Also:
JdbcCatalogService, JdbcCatalogServiceHome, CatalogSqlManager, Serialized Form

Field Summary
static java.lang.String DATA_SOURCE_NAME
          The environment property that specifies JDBC pool that all JDBC services will access.
static java.lang.String SCHEMA_FILE_NAME
          The environment property that specifies the schema file that all JDBC services will utilize.
static java.lang.String SQL_MANAGER_CLASS
          The environment property that specifies the SQL manager class that all JDBC service will utilize.
 
Fields inherited from class com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
CATALOG_MANAGER_HOME
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
JdbcCatalogServiceImpl()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
protected  java.lang.String getCatalogSchemaName()
          Returns the name of the Catalog schema file.
protected  CatalogSqlManager getCatalogSqlManager()
          Returns an instance of the Catalog SQL manager assoicated with this service.
protected static CatalogSqlManager getCatalogSqlManager(java.lang.String catalogManagerClassName, java.lang.String schemaName)
          Returns a specified CatalogSqlManager implementation class instance.
protected  java.lang.String getCatalogSqlManagerName()
          Returns the class name of the SQL manager associated with this service.
protected  java.sql.Connection getDatabaseConnection()
          Gets a database connection from the Commerce Server connection pool.
protected  JdbcCatalogFactory getJdbcCatalogFactory()
          Returns a JDBC-based Catalog factory.
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 
Methods inherited from class com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
getCatalogManager, getCatalogManagerJndiName, validateAuthorization
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, doRelationalBindingWithMapKey, enumerateRelationalBinding, enumerateRelationalBinding, getEnvironmentNamingContext, getEnvironmentProperty, getEnvironmentProperty, getEnvironmentPropertyCache, getPersistenceHelperPlugin, getSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_SOURCE_NAME

public static final java.lang.String DATA_SOURCE_NAME
The environment property that specifies JDBC pool that all JDBC services will access.

SCHEMA_FILE_NAME

public static final java.lang.String SCHEMA_FILE_NAME
The environment property that specifies the schema file that all JDBC services will utilize.

SQL_MANAGER_CLASS

public static final java.lang.String SQL_MANAGER_CLASS
The environment property that specifies the SQL manager class that all JDBC service will utilize.
Constructor Detail

JdbcCatalogServiceImpl

public JdbcCatalogServiceImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException

Overrides:
ejbCreate in class CatalogServiceImpl

ejbPostCreate

public void ejbPostCreate()
                   throws javax.ejb.CreateException

Overrides:
ejbPostCreate in class CatalogServiceImpl

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException

Overrides:
ejbActivate in class CatalogServiceImpl

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException

Overrides:
ejbPassivate in class CatalogServiceImpl

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException

Overrides:
ejbRemove in class CatalogServiceImpl

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException

Overrides:
setSessionContext in class CatalogServiceImpl

getDatabaseConnection

protected java.sql.Connection getDatabaseConnection()
                                             throws CatalogDeploymentException
Gets a database connection from the Commerce Server connection pool.

Returns:
A database connection from the CommerceServer connection pool.
Throws:
CatalogDeploymentException - if the connection pool is misconfigured.

getJdbcCatalogFactory

protected JdbcCatalogFactory getJdbcCatalogFactory()
                                            throws SystemException
Returns a JDBC-based Catalog factory.

Returns:
A JDBC-based Catalog factory.

getCatalogSqlManagerName

protected java.lang.String getCatalogSqlManagerName()
                                             throws SystemException
Returns the class name of the SQL manager associated with this service.

Returns:
The SQL manager class name.

getCatalogSchemaName

protected java.lang.String getCatalogSchemaName()
                                         throws SystemException
Returns the name of the Catalog schema file.

Returns:
The Catalog schema filename.

getCatalogSqlManager

protected CatalogSqlManager getCatalogSqlManager()
                                          throws SystemException
Returns an instance of the Catalog SQL manager assoicated with this service.

Returns:
An instance of the Catalog SQL manager.

getCatalogSqlManager

protected static CatalogSqlManager getCatalogSqlManager(java.lang.String catalogManagerClassName,
                                                        java.lang.String schemaName)
                                                 throws SystemException
Returns a specified CatalogSqlManager implementation class instance.

Parameters:
catalogManagerClassName - The name of the CatalogSqlManager implementation class.

© 2002 BEA Systems, Inc.

Copyright © 2002 BEA Systems, Inc. All Rights Reserved