11 Transactions in RMI Applications

Learn about the guidelines and additional references for using transactions in RMI applications that run under Oracle WebLogic Server.

This chapter includes the following sections:

Before You Begin

Before proceeding with transactions in WebLogic Server RMI applications, you should be familiar with the concepts of the RMI transactions and its implementation.

Before you begin, read Introducing Transactions, particularly the following topics:

For more information about RMI applications, see Developing Stand-alone Clients for Oracle WebLogic Server.

General Guidelines

There are certain guidelines for implementing transactions in RMI applications for WebLogic Server.

  • WebLogic Server allows for flat transactions only. Transactions cannot be nested.

  • Use standard programming techniques to optimize transaction processing. For example, properly demarcate transaction boundaries and complete transactions quickly.

  • For RMI applications, callback objects are not recommended for use in transactions because they are not subject to WebLogic Server administration.

    By default, all method invocations on the remote objects are transactional. If a callback object is required, you must compile these classes using the WebLogic RMI compiler using the -nontransactional flag. See Using the WebLogic RMI Compiler and WebLogic RMI Compiler Options in Developing RMI Applications for Oracle WebLogic Server.

  • In RMI applications, an RMI client can initiate a transaction, but all transaction processing must occur on server objects or remote objects hosted by WebLogic Server. Remote objects hosted on a client JVM cannot participate in the transaction processing.

    As a work-around, you can suspend the transaction before making a call to a remote object on a client JVM, and then resume the transaction after the remote operation returns.

For general guidelines about the WebLogic Server Transaction Service, see Capabilities and Limitations.