9.2. Creating a Transaction

To create a transaction, we first need access to a transaction manager. Transaction managers are remote services, like spaces, that are typically located through a registry or lookup service such as the RMI registry or the Jini Lookup service. Like our SpaceAccessor class that we've used to obtain access to spaces, we have also defined a TransactionManagerAccessor class that can be used to obtain access to a transaction manager. As with the SpaceAccessor, you can either use this class in your code or plug in your own means of accessing a transaction manager. The definition of TransactionManagerAccessor can be found in the complete source code.

Using TransactionManagerAccessor we can obtain a reference to a transaction ...

Get JavaSpaces™ Principles, Patterns, and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.