![]() |
![]() |
|
|
Using the API to Extend the Product Catalog
This chapter describes the various options available for extending, customizing, or writing third-party integrations for the WebLogic Commerce Server Product Catalog. The catalog defines interfaces for services that are required to access and administer an electronic product catalog. The architecture is built on Java 2 Enterprise Edition (J2EE) standards-based components and BEA WebLogic Server.
In addition, an implementation of the services is provided that defines an electronic product catalog that uses JDBC as a persistence mechanism.
Note: The descriptions in this chapter assume that you are an experienced EJB developer.
This topic includes the following sections:
Note: In this chapter, the environment variable WL_COMMERCE_HOME is used to represent the directory in which you installed the WebLogic Commerce Server software.
Overview of the Product Catalog API
The Product Catalog API package structure is organized as follows:
com.beasys.commerce.ebusiness.catalog is the main end-user package for Product Catalog development. It contains all the commonly accessed classes for accessing both Product Items and Categories.
com.beasys.commerce.ebusiness.catalog.loader contains the classes necessary to support the command-line Product Catalog database bulk loader, DBLoader. This loader allows you to easily and quickly import data into the Product Catalog from simple character separated value files.
com.beasys.commerce.ebusiness.catalog.pipeline contains all Pipeline Components that facilitate accessing the Product Catalog from JavaServer Pages.
com.beasys.commerce.ebusiness.catalog.service contains the base services on top of which all pluggable Product Catalog services are implemented. Additionally, this packaged contains several subpackages for managing Product Items and Categories, searching the Product Catalog, and providing custom attribute support.
com.beasys.commerce.ebusiness.catalog.service.category contains the classes that define a pluggable service to manage the Categories and hierarchical structure of the Product Catalog.
com.beasys.commerce.ebusiness.catalog.service.data contains the classes that define a pluggable service to manage the custom attributes for Product Items and Categories within the Product Catalog.
com.beasys.commerce.ebusiness.catalog.service.item contains the classes that define a pluggable service to manage the Product Items within the Product Catalog.
com.beasys.commerce.ebusiness.catalog.service.query contains the classes that define a pluggable service to perform powerful searching of the Product Catalog. The Product Items within the Catalog can be searched using keywords or Boolean search expressions across their attributes.
com.beasys.commerce.ebusiness.catalog.sql contains the classes that provide a database persistence model for the Product Catalog. Industry standard JDBC and SQL are used to ensure compatibility with a wide range of databases.
com.beasys.commerce.ebusiness.catalog.util contains the classes that provide utility methods for the Product Catalog.
com.beasys.commerce.ebusiness.catalog.webflow contains all Input Processors that facilitate accessing the Product Catalog from JavaServer Pages.
Catalog Architecture and Services
The WebLogic Commerce Server Product Catalog architecture divides the functionality of the Product Catalog into five functional areas, each of which requires an implementation of an associated Product Catalog server interface. The five services are:
All services are implemented using J2EE-compliant stateless session EJBs. These EJBs separate the functionality of the Catalog into discrete, pluggable components.
Catalog Architecture
Figure 7-1 illustrates the Catalog architecture.
Figure 7-1 Product Catalog Architecture
For example, the process of displaying a product item in a user's browser involves the following phases:
Catalog Manager
The Catalog Manager will not typically require customization. Its main purpose is to provide a single point of access to the other catalog services. Table 7-1 shows the method summary for the CatalogManager interface.
The JNDI names of the EJBs returned from the CatalogManager methods are defined in the weblogic-ejb-jar.xml deployment descriptor for the CatalogManager, as shown in Listing 7-1.
Note: You can find the ejb-jar.xml and weblogic-ejb-jar.xml deployment descriptor files in the ebusiness.jar file, which is in WL_COMMERCE_HOME\lib.
Listing 7-1 CatalogManager Deployment Descriptor
<weblogic-enterprise-bean>
<ejb-name>com.beasys.commerce.ebusiness.catalog.CatalogManager</ejb-name>
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/ProductItemManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManager
</jndi-name>
</ejb-reference-description>
<ejb-reference-description>
<ejb-ref-name>ejb/CategoryManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.category.CategoryManager
</jndi-name>
</ejb-reference-description>
<ejb-reference-description>
<ejb-ref-name>ejb/CatalogQueryManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.query.CatalogQueryManager
</jndi-name>
</ejb-reference-description>
<ejb-reference-description>
<ejb-ref-name>ejb/CustomDataManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.data.CustomDataManager
</jndi-name>
</ejb-reference-description>
<ejb-reference-description>
<ejb-ref-name>ejb/CatalogManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.CatalogManager
</jndi-name>
</ejb-reference-description>
</reference-descriptor>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.CatalogManager
</jndi-name>
</weblogic-enterprise-bean>
Product Item Manager
The Product Item Manager is responsible for creating, getting, updating, and deleting items within the Catalog. Table 7-2 shows the method summary for the ProductItemManager interface.
Category Manager
The Category Manager is responsible for managing the hierarchical structure of the electronic Product Catalog. It defines the interface that allows the hierarchy to be created and modified, as well as the mapping of items into categories to be managed.
Table 7-3 shows the method summary for the CategoryManager interface.
Custom Data Manager
The Custom Data Manager defines an interface that allows custom attributes (attributes not defined in the ProductItem interface) to be persisted for Product Items. The getProperty and setProperty Configurable Entity methods on Categories and Product Items use the Custom Data Manager service to allow a client to retrieve and set customer attributes.
Table 7-4 shows the method summary for the CustomDataManager interface.
Catalog Query Manager
The Catalog Query Manager is responsible for searching the Catalog for Product Items. It currently defines two types of catalog search: keyword search and query-based search.
The keyword search is a search of the keywords associated with a product item. Query-based search allows a complex Boolean expression on any of the item attributes to be evaluated.
Table 7-5 shows the method summary for the CatalogQueryManager interface.
For related information, see the section Query-Based Search Syntax.
The Catalog Cache
The Catalog architecture includes a powerful caching mechanism for items and categories within the Product Catalog. Integrators can choose between integrating services in front of the cache or behind the cache. Currently the ProductItemManager and CategoryManager benefit from the caching architecture, as illustrated earlier in this chapter in Figure 7-1.
Replacing the JNDI name of a bean in the CatalogManager's deployment descriptor will replace a service in front of the cache. The service will have to implement its own caching mechanism or forgo the benefits of caching.
The services defined by BEA, specified in the deployment descriptor for the CatalogManager, implement the caching for access to items and categories. The following beans query the cache and returned cached data if available; otherwise they delegate to the beans specified in their deployment descriptors:
com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManager
com.beasys.commerce.ebusiness.catalog.service.category.CategoryManager
By editing the deployment descriptors for the ProductItemManager and CategoryManager beans, the functionality of the Product Catalog can be extended behind the cache. This enables developers to concentrate on the persistence model for the catalog without worrying about the caching architecture. For example, in Listing 7-2, you could replace the current delegate service provider class (JdbcCategoryManager) with the name of a new session bean that implements the CategoryManager interface. This listing is from the ejb-jar.xml deployment descriptor file (platform independent).
Listing 7-2 CategoryManager Deployment Descriptor
<session>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.category.CategoryManager
</ejb-name>
<home>
com.beasys.commerce.ebusiness.catalog.service.category.CategoryManagerHome
</home>
<remote>com.beasys.commerce.ebusiness.catalog.service.category.CategoryManager
</remote>
<ejb-class>
com.beasys.commerce.ebusiness.catalog.service.category.CategoryManagerImpl
</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<!-- one specifies the delegateName to tell the Bridge component (the one
used by the catalog manager which ejb to delegate to. That way, one
can change delegates by changing the env-entry...
-->
<env-entry>
<env-entry-name>delegateName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ejb/JdbcCategoryManager</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/JdbcCategoryManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>
com.beasys.commerce.ebusiness.catalog.service.category.JdbcCategoryManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.service.category.JdbcCategoryManager
</remote>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/CatalogManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>
com.beasys.commerce.ebusiness.catalog.CatalogManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.CatalogManager
</remote>
</ejb-ref>
</session>
Again, the previous listing is from the ejb-jar.xml deployment descriptor file. You would need to make corresponding changes in the weblogic-ejb-jar.xml file. The ejb-jar.xml file (platform independent) and weblogic-ejb-jar.xml file (platform specific) file are packaged in the ebusiness.jar file. (This JAR file can be found in the WL_COMMERCE_HOME\lib directory, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server.) For related information, see the WebLogic Server EJB Reference documentation at http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_reference.html, and the WebLogic Server Deployment Guide at http://www.weblogic.com/docs51/techdeploy/index.html.
Writing Your Own Catalog Service
This section describes the steps required to implement Product Catalog services, by way of an example. In this example, we replace the JdbcProductItemManager and the JdbcCatalogQueryManager with non-JDBC based implementations. Both provide simple (that is, not suitable for production) implementations based around storing items in memory and serializing them to (and from) disk.
Also outlined in this section are the changes to the Catalog Services deployment description that are required to plug in the new service implementation. Because these new services reside "behind" the catalog caching mechanism (see the Tier 2 portion of Figure 7-1), the new services can take advantage of the powerful caching features of the WebLogic Commerce Server Product Catalog.
To implement the new services, the general steps are as follows:
Note: Steps 1 and 3 are described in the remainder of this chapter. For information about steps 2 and 4, please refer to the BEA WebLogic Server Deployment Guide at http://www.weblogic.com/docs51/techdeploy/index.html.
The following topics are covered in this section:
The ejb-jar.xml and weblogic-ejb-jar.xml files are packaged in the ebusiness.jar file, which can be found in the WL_COMMERCE_HOME\lib directory, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server.
You can find all the source code shown in this section in the WL_COMMERCE_HOME/src/examples/catalog/file directory. (The updated deployment descriptors are not in this directory, however.)
Warning: This section assumes that you are familiar with building and deploying EJBs. This section also describes modifications to WebLogic Commerce Server deployment JAR files; therefore, it is important that you first back up all files and JAR libraries that you intend to modify.
Create New Services
The first step in creating a new catalog service is to implement the corresponding Stateless Session EJB service API. Some of the files are optional, as explained in the following summary. After the summary, sample source code is provided for the implementation files, FileCatalogQueryManagerImpl.java and FileProductItemManagerImpl.java. Again, you can find this source code in the following directory:
WL_COMMERCE_HOME/src/examples/catalog/file
This is the remote interface for the FileCatalogQueryManager session bean. The new remote interface is not required, and the remote interface for the bean specified in ejb-jar.xml should remain CatalogQueryManager.
The Home for the new service is not required, as access to the bean should always be through the environment of the CatalogManager or one of the Tier 1 Service Providers' environments.
The implementation file for the new Tier 2 service. It implements a file-based Product Catalog search engine.
This is the remote interface for the FileProductItemManager session bean. The new remote interface is not required, and the remote interface for the bean specified in ejb-jar.xml should remain ProductItemManager.
The Home for the new service is not required, as access to the bean should always be through the environment of the CatalogManager or one of the Tier 1 Service Providers' environments.
The implementation file for the new Tier 2 service contains the new functionality desired. It implements a file-based Product Item management service.
Sample Source Code
Listing 7-3 show sample implementation source code for:
After you install WebLogic Commerce Server, these files can be found in the WL_COMMERCE_HOME/src/examples/catalog/file directory.
In the following listing, the bold typeface is used to direct your attention to the most relevant lines of code.
Listing 7-3 FileProductItemManagerImpl.java
/*
* B E A S Y S T E M S
*
* C O M M E R C E C O M P O N E N T S
*
* Copyright (c) 1997-2001 BEA Systems, Inc.
*
* All Rights Reserved. Unpublished rights reserved under the copyright laws
* of the United States. The software contained on this media is proprietary
* to and embodies the confidential technology of BEA Systems, Inc. The
* possession or receipt of this information does not convey any right to disclose
* its contents, reproduce it, or use, or license the use, for manufacture or
* sale, the information or anything described therein. Any use, disclosure, or
* reproduction without BEA System's prior written permission is strictly
* prohibited.
*
*
* $Header:$
*/
package com.beasys.commerce.ebusiness.catalog.examples.file;
import com.beasys.commerce.foundation.*;
import com.beasys.commerce.util.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
import javax.naming.*;
//$Import$_Begin ------------ CUSTOM CODE ---------------
import com.beasys.commerce.ebusiness.catalog.*;
import com.beasys.commerce.ebusiness.catalog.service.*;
import com.beasys.commerce.ebusiness.catalog.service.item.*;
import java.io.*;
//$Import$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/**
*
*
* @see com.beasys.commerce.ebusiness.catalog.service.item.FileProductItemManager
* @see com.beasys.commerce.ebusiness.catalog.service.item.FileProductItemManagerHome
*/
public class FileProductItemManagerImpl extends com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
//$Implements$_Begin ------------ CUSTOM CODE ---------------
// USER CHANGES: Add interfaces that are implemented here
//$Implements$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{
//$AdditionalAttributeDeclarations$_Begin ------------ CUSTOM CODE
// ---------------
private Hashtable itemTable = null;
private Hashtable keywordTable = null;
//$AdditionalAttributeDeclarations$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
public FileProductItemManagerImpl( )
{
super( );
//$Constructor$_Begin ------------ CUSTOM CODE ---------------
//$Constructor$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
private void loadData()
{
if( itemTable == null || keywordTable == null )
{
try
{
FileInputStream istream = new FileInputStream( "items.bin" );
ObjectInputStream objIn = new ObjectInputStream( istream );
itemTable = (Hashtable) objIn.readObject();
keywordTable = (Hashtable) objIn.readObject();
}
catch( Exception e )
{
e.printStackTrace();
}
if( itemTable == null )
itemTable = new Hashtable();
if( keywordTable == null )
keywordTable = new Hashtable();
}
}
private void saveData()
{
try
{
FileOutputStream ostream = new FileOutputStream( "items.bin" );
ObjectOutputStream objOut = new ObjectOutputStream( ostream );
objOut.writeObject( itemTable );
objOut.writeObject( keywordTable );
}
catch( Exception e )
{
e.printStackTrace();
}
}
public void ejbCreate(Listing 7-4 shows the source code for FileCatalogQueryManagerImpl.java.
Listing 7-4 FileCatalogQueryManagerImpl.java
/*
* B E A S Y S T E M S
*
* C O M M E R C E C O M P O N E N T S
*
* Copyright (c) 1997-2001 BEA Systems, Inc.
*
* All Rights Reserved. Unpublished rights reserved under the copyright laws
* of the United States. The software contained on this media is proprietary
* to and embodies the confidential technology of BEA Systems, Inc. The
* possession or receipt of this information does not convey any right to disclose
* its contents, reproduce it, or use, or license the use, for manufacture or
* sale, the information or anything described therein. Any use, disclosure, or
* reproduction without BEA System's prior written permission is strictly prohibited.
*
*
* $Header:$
*/
package com.beasys.commerce.ebusiness.catalog.examples.file;
import com.beasys.commerce.foundation.*;
import com.beasys.commerce.util.*;
import java.util.*;
import java.rmi.*;
import javax.ejb.*;
import javax.naming.*;
//$Import$_Begin ------------ CUSTOM CODE ---------------
import java.sql.Connection;
import java.sql.SQLException;
import com.beasys.commerce.ebusiness.catalog.*;
import com.beasys.commerce.foundation.expression.Criteria;
import com.beasys.commerce.foundation.expression.Logical;
import com.beasys.commerce.foundation.expression.Expression;
import com.beasys.commerce.util.ExpressionHelper;
import com.beasys.commerce.util.TypesHelper;
import com.beasys.commerce.ebusiness.catalog.service.query.*;
import com.beasys.commerce.ebusiness.catalog.service.item.*;
// USER CHANGES: Place additional import statements here
//$Import$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/**
*
*
* @see com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
* @see com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManagerHome
*/
public class FileCatalogQueryManagerImpl extends com.beasys.commerce.ebusiness.catalog.service.CatalogServiceImpl
//$Implements$_Begin ------------ CUSTOM CODE ---------------
// USER CHANGES: Add interfaces that are implemented here
//$Implements$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{
//$AdditionalAttributeDeclarations$_Begin ------------ CUSTOM CODE ---------------
//$AdditionalAttributeDeclarations$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
public FileCatalogQueryManagerImpl()
{
super();
//$Constructor$_Begin ------------ CUSTOM CODE ---------------
// USER CHANGES: Add constructor code here
//$Constructor$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
public void ejbCreate() throws CreateException
{
super.ejbCreate();
//$EjbCreate$_Begin ------------ CUSTOM CODE ---------------
//$EjbCreate$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
public void ejbPostCreate() throws CreateException
{
super.ejbPostCreate();
//$EjbPostCreate$_Begin ------------ CUSTOM CODE ---------------
// USER CHANGES: Add custom code here
//$EjbPostCreate$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
public void ejbActivate() throws EJBException
{
super.ejbActivate();
//$EjbActivate$_Begin ------------ CUSTOM CODE ---------------
// USER CHANGES: Add custom code here
//$EjbActivate$_End ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
public void ejbPassivate() throws EJBException
{
super.ejbPassivate();
//$EjbPassivate$_Begin ------------ CUSTOChanges to ejb-jar.xml
In ejb-jar.xml, the first step is to change the name of the delegate session bean in the environment for the Tier 1 service providers. Occurrences of JdbcProductItemManager need to be changed to the name of the new Tier 2 service provider: FileProductItemManager. This step is done by modifying the Tier 1 Service Provider to delegate to the new service implementation by adjusting several EJB deployment settings in the ejb-jar.xml and weblogic-ejb-jar.xml deployment descriptors. Finally, the modified Tier 1 service provider must be redeployed and the new service implementation deployed.
Warning: Create a backup copy of the file before you modify its contents.
Note: In Listing 7-5, lines that should be removed are shown in italics. Lines that should be added are shown in bold.
Listing 7-5 Changes to the ejb-jar.xml File
<session>
<ejb-name>com.beasys.commerce.ebusiness.catalog.service.data.CustomDataManager
</ejb-name><env-entry>
<env-entry-name>delegateName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ejb/JdbcProductItemManager</env-entry-value>
<env-entry-value>ejb/FileProductItemManager</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/JdbcProductItemManager</ejb-ref-name>
<ejb-ref-name>ejb/FileProductItemManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</remote>
<home>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</remote>
</ejb-ref><session>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.query.CatalogQueryManager
</ejb-name>
<env-entry>
<env-entry-name>delegateName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ejb/JdbcCatalogQueryManager</env-entry-value>
<env-entry-value>ejb/FileCatalogQueryManager</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/JdbcCatalogQueryManager</ejb-ref-name>
<ejb-ref-name>ejb/FileCatalogQueryManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</remote>
<home>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</remote>
</ejb-ref><session>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</ejb-name>
<home>
com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManager
</remote>
<ejb-class>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManagerImpl
</ejb-class>
<ejb-class>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManagerImpl
</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>SchemaFile</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>wlcs-catalog</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>SqlManagerClass</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>
com.beasys.commerce.ebusiness.catalog.sql.JdbcSqlManager
</env-entry-value>
</env-entry><session>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</ejb-name>
<home>
com.beasys.commerce.ebusiness.catalog.service.query.CatalogQueryManagerHome
</home>
<remote>
com.beasys.commerce.ebusiness.catalog.service.query.CatalogQueryManager
</remote>
<ejb-class>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManagerImpl
</ejb-class>
<ejb-class>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManagerImpl
</ejb-class>
<session-type>Stateless</session-type>
<!-- com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
-->
<!-- com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
-->
<method>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</ejb-name>
<method-name>getCatalogManager</method-name>
</method>Changes to weblogic-ejb-jar.xml
Listing 7-6 shows the deletions and additions needed in the weblogic-ejb-jar.xml file. The weblogic-ejb-jar.xml files is packaged in the ebusiness.jar file, which can be found in the WL_COMMERCE_HOME\lib directory, where WL_COMMERCE_HOME is the directory in which you installed WebLogic Commerce Server.
Warning: Create a backup copy of the file before you modify its contents.
Note: In Listing 7-6, lines that should be removed are shown in italics. Lines that should be added are shown in bold.
Listing 7-6 Changes to the weblogic-ejb-jar.xml File
<weblogic-enterprise-bean>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.item.ProductItemManager
</ejb-name>
<caching-descriptor>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</caching-descriptor>
<reference-descriptor>
<ejb-reference-description><ejb-ref-name>ejb/JdbcProductItemManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</jndi-name>
<ejb-ref-name>ejb/FileProductItemManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</jndi-name></ejb-reference-description><weblogic-enterprise-bean>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.query.CatalogQueryManager
</ejb-name>
<caching-descriptor> <!--
<initial-beans-in-free-pool>5</initial-beans-in-free-pool> -->
</caching-descriptor>
<reference-descriptor>
<ejb-reference-description><ejb-ref-name>ejb/JdbcCatalogQueryManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</jndi-name>
<ejb-ref-name>ejb/FileCatalogQueryManager</ejb-ref-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</jndi-name></ejb-reference-description><weblogic-enterprise-bean><ejb-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</ejb-name><jndi-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</jndi-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileProductItemManager
</jndi-name><ejb-name>
com.beasys.commerce.ebusiness.catalog.service.item.JdbcProductItemManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.examples.file.FileProductItemManager
</ejb-name><weblogic-enterprise-bean>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</ejb-name><jndi-name>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</jndi-name>
<jndi-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</jndi-name><ejb-name>
com.beasys.commerce.ebusiness.catalog.service.query.JdbcCatalogQueryManager
</ejb-name>
<ejb-name>
com.beasys.commerce.ebusiness.catalog.examples.file.FileCatalogQueryManager
</ejb-name>
![]()
![]()
![]()
Copyright © 2001 BEA Systems, Inc. All rights reserved.
Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher.
Contact us (documentation feedback only)