Configuring Sun Master Indexes

Defining Master Index Transactional Support

You can define the master index application to distribute transactions across applications, to distribute transactions only within the master index application, or to not use distributed transactions at all. You can define transactional support by using the Configuration Editor or by modifying the XML file directly. When you define transactional support for the master index, make sure to use the appropriate transaction properties for the database connection in the Sun Java System Admin Console.

ProcedureTo Configure the Master Index for Local Transactions

  1. In the Projects window, right-click the Configuration node in the project you want to modify, and then click Edit.

    The Configuration Editor appears.

  2. Click the Deployment tab.

  3. In the Transaction Mode field, select LOCAL.

  4. On the Configuration Editor toolbar, click Save.

  5. To configure the database connection, launch the application service Admin Console, and do one of the following:

    • If the database connection is already defined, do the following on the Admin Console:

      1. In the left frame, expand Resources > JDBC > Connection Pools.

      2. Select the database connection pool that is defined for your master index application.

      3. On the Edit Connection Pool page, select either javax.sql.DataSource or javax.sql.ConnectionPoolDataSource for the Resource Type and click Save.

    • If the database connection is not already defined, follow the instructions provided in Defining the Database Connection Pools in Developing Sun Master Indexes . Select either javax.sql.DataSource or javax.sql.ConnectionPoolDataSource for the connection pool Resource Type.

ProcedureTo Configure the Master Index to Distributed Transactions Across Applications

  1. In the Projects window, right-click the Configuration node in the project you want to modify, and then click Edit.

    The Configuration Editor appears.

  2. Click the Deployment tab.

  3. In the Transaction Mode field, select XA (across applications).

  4. On the Configuration Editor toolbar, click Save.

  5. Launch the application server Admin Console (from NetBeans, click the Services tab, expand Servers, right-click the domain, and select View Admin Console).

  6. To configure the database connection, launch the application service Admin Console, and do one of the following:

    • If the database connection is already defined, do the following on the Admin Console:

      1. In the left frame, expand Resources > JDBC > Connection Pools.

      2. Select the database connection pool that is defined for your master index application.

      3. On the Edit Connection Pool page, select javax.sql.XADataSource for the Resource Type and click Save.

    • If the database connection is not already defined, follow the instructions provided in Defining the Database Connection Pools in Developing Sun Master Indexes . Select javax.sql.XADataSource for the Resource Type.

ProcedureTo Configure the Master Index for Distributed Transactions Within the Master Index Application Only

  1. In the Projects window, right-click the Configuration node in the project you want to modify, and then click Edit.

    The Configuration Editor appears.

  2. Click the Deployment tab.

  3. In the Transaction Mode field, select XA (within application only).

  4. On the Configuration Editor toolbar, click Save.

  5. To configure the database connection, launch the application server Admin Console and do one of the following:

    • If the database connection is already defined, do the following on the Admin Console:

      1. In the left frame, expand Resources > JDBC > Connection Pools.

      2. Select the database connection pool that is defined for your master index application.

      3. On the Edit Connection Pool page, select javax.sql.XADataSource for the Resource Type and click Save.

    • If the database connection is not already defined, follow the instructions provided in Defining the Database Connection Pools in Developing Sun Master Indexes . Select javax.sql.XADataSource for the Resource Type.