© 2005 BEA Systems, Inc.

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

java.lang.Object
  extended bycom.beasys.commerce.foundation.SessionImpl
      extended bycom.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
          extended bycom.beasys.commerce.ebusiness.catalog.service.JdbcCatalogServiceImpl
All Implemented Interfaces:
EnterpriseBean, Serializable, SessionBean
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
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
 
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, 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

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

See Also:
Constant Field Values

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:
Constant Field Values

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:
Constant Field Values
Constructor Detail

JdbcCatalogServiceImpl

public JdbcCatalogServiceImpl()
Method Detail

ejbActivate

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

Specified by:
ejbActivate in interface SessionBean
Overrides:
ejbActivate in class CatalogServiceImpl
Throws:
EJBException

ejbCreate

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

Overrides:
ejbCreate in class CatalogServiceImpl
Throws:
CreateException

ejbPassivate

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

Specified by:
ejbPassivate in interface SessionBean
Overrides:
ejbPassivate in class CatalogServiceImpl
Throws:
EJBException

ejbPostCreate

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

Overrides:
ejbPostCreate in class CatalogServiceImpl
Throws:
CreateException

ejbRemove

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

Specified by:
ejbRemove in interface SessionBean
Overrides:
ejbRemove in class CatalogServiceImpl
Throws:
EJBException

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

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

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

setSessionContext

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

Specified by:
setSessionContext in interface SessionBean
Overrides:
setSessionContext in class CatalogServiceImpl
Throws:
EJBException

© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved