Chapter 13. Enterprise Edition
Prev | Part V. Kodo JDO Reference Guide | Next

## Chapter 13. Enterprise Edition

The features we've discussed thus far are all included in the Kodo JDO Standard Edition. This chapter presents features unique to the Kodo JDO Enterprise Edition. The Enterprise Edition primarily differs from the Standard Edition in its ability to integrate with application servers' global transactions and its advanced custom query capabilities. The Enterprise Edition also includes all the components of the Performance Pack, which we describe in the next chapter.

## 13.1. Integrating with the Transaction Manager

Kodo JDO persistence managers have the ability to automatically synchronize their transactions with an external transaction manager. Whether or not persistence managers from a given persistence manager factory exhibit this behavior by default depends on the factory's `kodo.TransactionMode` configuration property. The property can take the following values:

- `local`: Perform transaction operations locally.

- `managed`: Integrate with the application server's managed global transactions.

You can override the global transaction mode setting when you obtain a persistence manager by using the `KodoPersistenceManagerFactory`'s `getPersistenceManager(boolean managed, int connRetainMode)` method.

In order to use global transactions, Kodo JDO must be able to access the application server's `javax.transaction.TransactionManager` . Kodo JDO can automatically discover the transaction manager for most major application servers. Occasionally, however, you might have to point Kodo JDO to the transaction manager for an unrecognized or non-standard application server setup. This is accomplished through the `kodo.ManagedRuntime` configuration property. This property describes a `kodo.ee.ManagedRuntime` implementation to use for transaction manager discovery. You can specify your own implementation, or use one of the built-ins:

- `auto`: This is the default. It is an alias for the `kodo.ee.AutomaticManagedRuntime` class. This managed runtime is able to automatically integrate with several common application servers.

- `invocation`: An alias for the `kodo.ee.InvocationManagedRuntime` class. You can configure this runtime to invoke any static method in order to obtain the appserver's transaction manager.

- `jndi`: An alias for the `kodo.ee.JNDIManagedRuntime` class. You can configure this runtime to look up the transaction manager at any JNDI location.

See the Javadoc for of each class for details on the bean properties you can pass to these plugins in your configuration string.

Example 13.1. Configuring Transaction Manager Integration

    kodo.TransactionMode: managed
    kodo.ManagedRuntime: jndi(TransactionManagerName=java:/TransactionManager)

Prev | Up | Next
12.4. MBeans | Home | 13.2. XA Transactions