Configuring business components

About this task
To configure business components, copy the following files from <toolkit_root>\samples\BTTJumpStartSampleEAR.ear\BTTJumpStartSampleServer.jar\ bcConfig\ to the bcConfig package of BTTJumpStartSampleServer Project:
  • Access Control configuration: accessControl.xml
    The file defines three services:
    1. login, which implements the interface to get the list of online supervisors.
    2. securityManager, which implements the interface to manage the user rights.
    3. securityObjectManager, which implements the interface to manage the security objects.
  • Business Component root Configuration: BusinessComponentConfig.xml
    1. The file works as the entry of BTT business components. It imports sub configuration and it uses com.ibm.btt.bc.common.pool.ConnectionPool to manage the database connection. There are two types of connection pool configurations:
      • One uses the datasource which is defined in web container.
      • The other uses the conventional DBDriver definition.
      The sample uses the datasource, and jndi datasource is jdbc/DEMO.
    2. You need to update WebContent/WEB-INF/web.xml in BTTJumpStartSampleWeb project, and add the following code to initialize the business components:
      <listener>
      		<description>
      		</description>
      		<display-name>StartBTTServer</display-name>
      		<listener-class>com.ibm.btt.webapp.BTTServerStarter</listener-class>
      	</listener>
      <context-param>
      		<description>
      		</description>
      		<param-name>elementFactoryConfigPath</param-name>
      		<param-value>jar:///bcConfig/BusinessComponentConfig.xml</param-value>
      </context-param>
  • EJ Viewer configuration: ej.xml
    1. The file defines the services com.ibm.btt.bc.override.agent.OverrideAgent, which is a remote service in the server side.
    2. Exports the Override Agent as a remote service. You need to update WebContent/WEB-INF/web.xml in BTTJumpStartSampleWeb project, and add a servlet, which serves as the handler for the remote invocation:
      <servlet>
      		<description>
      		</description>
      		<display-name>BTTRemoteConnector</display-name>
      		<servlet-name>BTTRemoteConnector</servlet-name>
      		<servlet-class>com.ibm.btt.remote.BTTRemoteConnector</servlet-class>
      	</servlet>
      	<servlet-mapping>
      		<servlet-name>BTTRemoteConnector</servlet-name>
      		<url-pattern>/BTTRemoteConnector</url-pattern>
      	</servlet-mapping>
  • Override configuration: overrideServer.xml
  • Cash Drawer configuration:

    Cash Drawer component includes 2 configuration files in the client side: cashDrawerManagment.xml and drawerConfig.xml.

    1. cashDrawerManagment.xml defines services cdm, which implements the interface to management cash drawer.
    2. drawerConfig.xml is used to define the specification of the cash drawer.