Component design and implementation  Connection cache settings

Chapter 6: Database Access Tuning

Server and component transaction settings

These server properties affect the performance of the EAServer transaction manager and components that use server-managed transactions.


Transaction timeout

Make sure you have configured a transaction timeout if your application uses EJB bean-managed transactions, or if you use components of other types that keep transactions open across method calls. The transaction timeout setting specifies the maximum duration of an EAServer transaction. The default configuration allows transactions to remain open indefinitely. A finite timeout allows transactions to be closed when the client crashes or hangs during an open transaction.

You can set the timeout for components on the Resources tab in the EAServer Manager Component Properties dialog box. If you are using jagtool, the property name is com.sybase.jaguar.component.tx_timeout.

You can set a default timeout at the server level by setting server property com.sybase.jaguar.server.tx_timeout (set on the Advanced tab in the Server Properties dialog box). EAServer determines the transaction timeout period as follows:

For both the component and server setting, the timeout period is configured in seconds, with 0 indicating no timeout. The default for a new server is 0. When specifying timeouts, Sybase recommends a resolution of 5 seconds. Network transport time is included in the measured timeout period. You may need to configure a larger timeout period if clients connect over slow networks.

EAServer checks for timeouts after each method returns. Your component will not be deactivated in the middle of an invocation because of a timeout. When a transaction times out, the next method invocation in the client-side ORB throws the CORBA::TRANSACTION_ROLLEDBACK system exception.


Transaction memory table size

The transaction manager uses an internal table to track the status of pending transactions. You can tune the size of the table by setting the server property com.sybase.jaguar.server.jta.tranTableSize. The default is 1024.

This table provides cached storage of the transaction information. If the number of pending transactions exceeds the table size, new memory is allocated and deallocated as needed. For best performance, set the value to at least one-half the maximum number of simultaneous transactions expected in your application.


Unexpected deadlock errors

If you see unexpected deadlock or slow database throughput when executing transactional components, check for the following setting in the properties of the component that initiates the transaction:

com.sybase.jaguar.component.iso_level=serializable

This setting causes the transaction to run with serializable isolation level, which can cause deadlocks or degraded performance for any component that uses JDBC connections, other than EJB 1.0 session beans. For components that are not EJB 1.0 session beans, delete this setting using the Advanced tab in the component properties dialog box. This setting was erroneously used as a default for new components in earlier versions of EAServer.

If the component is an EJB 1.0 session bean, verify that the Transaction Isolation Level setting on the Transactions tab matches your application requirements.





Copyright © 2005. Sybase Inc. All rights reserved. Connection cache settings