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

java.lang.Object
  extended by com.beasys.commerce.foundation.SessionImpl
      extended by com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
          extended by 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

Field Summary
protected static String DATA_SOURCE_NAME
          The environment property that specifies JDBC pool that all JDBC services will access.
protected static String SCHEMA_FILE_NAME
          The environment property that specifies the schema file that all JDBC services will utilize.
protected static 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, CATALOG_QUERY_DELEGATE, CATEGORY_DELEGATE, CUSTOM_DATA_DELEGATE, PRODUCT_ITEM_DELEGATE
 
Fields inherited from class com.beasys.commerce.foundation.SessionImpl
_ctx, _environmentNamingContext, _environmentPropertyCache, _isDirty
 
Constructor Summary
JdbcCatalogServiceImpl()
           
 
Method Summary
 void ejbActivate()
          ejbActivate method.
 void ejbCreate()
          ejbCreate method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate()
          ejbPostCreate method.
 void ejbRemove()
          ejbRemove method.
protected  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(String catalogManagerClassName, String schemaName)
          Returns a specified CatalogSqlManager implementation class instance.
protected  String getCatalogSqlManagerName()
          Returns the class name of the SQL manager associated with this service.
protected  Connection getDatabaseConnection()
          Gets a database connection from the Commerce Server connection pool.
protected  JdbcCatalogFactory getJdbcCatalogFactory()
          Returns a JDBC-based Catalog factory.
 void setSessionContext(SessionContext ctx)
          setSessionContext method.
 
Methods inherited from class com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
getCatalogManager, getCatalogManagerJndiName, getConfigBean, setDelegateName, validateAuthorization
 
Methods inherited from class com.beasys.commerce.foundation.SessionImpl
clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, clearRelationalBinding, doRelationalBinding, doRelationalBinding, doRelationalBindingOnElement, doRelationalBindingOnElement, doRelationalBindingOnSingleton, doRelationalBindingOnSingleton, 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

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

See Also
Constants Summary

SCHEMA_FILE_NAME

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

See Also
Constants Summary

SQL_MANAGER_CLASS

protected static final String SQL_MANAGER_CLASS
The environment property that specifies the SQL manager class that all JDBC service will utilize.

See Also
Constants Summary
Constructor Detail

JdbcCatalogServiceImpl

public JdbcCatalogServiceImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws CreateException
Description copied from class: SessionImpl
ejbCreate method.

Overrides:
ejbCreate in class CatalogServiceImpl
Throws
CreateException

ejbPostCreate

public void ejbPostCreate()
                   throws CreateException
Description copied from class: SessionImpl
ejbPostCreate method.

Overrides:
ejbPostCreate in class CatalogServiceImpl
Throws
CreateException

ejbActivate

public void ejbActivate()
                 throws EJBException
Description copied from class: SessionImpl
ejbActivate method.

Overrides:
ejbActivate in class CatalogServiceImpl
Throws
EJBException

ejbPassivate

public void ejbPassivate()
                  throws EJBException
Description copied from class: SessionImpl
ejbPassivate method.

Overrides:
ejbPassivate in class CatalogServiceImpl
Throws
EJBException

ejbRemove

public void ejbRemove()
               throws EJBException
Description copied from class: SessionImpl
ejbRemove method.

Overrides:
ejbRemove in class CatalogServiceImpl
Throws
EJBException

setSessionContext

public void setSessionContext(SessionContext ctx)
                       throws EJBException
Description copied from class: SessionImpl
setSessionContext method.

Overrides:
setSessionContext in class CatalogServiceImpl
Throws
EJBException

getDatabaseConnection

protected 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.
Throws
SystemException

getCatalogSqlManagerName

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

Returns
The SQL manager class name.
Throws
SystemException

getCatalogSchemaName

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

Returns
The Catalog schema filename.
Throws
SystemException

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.
Throws
SystemException

getCatalogSqlManager

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

Parameters
catalogManagerClassName - The name of the CatalogSqlManager implementation class.
Throws
SystemException


Copyright © 2006 BEA Systems, Inc. All Rights Reserved