Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo.server
Class DatabaseTransactionFactory

    java.lang.Object
      |
      +--oracle.jbo.server.DatabaseTransactionFactory

public class DatabaseTransactionFactory
extends java.lang.Object

The factory for creating `DBTransaction` instances.

This class is used by the framework to create an instance when the client attempts to establish a connection to the database. Applications may provide custom `DBTransaction` implementations. Such applications will need to subclass this class and `DBTransactionImpl`.

The framework calls the ``getFactory()`` method to get the currently installed factory, and calls its `create()` method to establish a connection.

This class has a single active instance, which cannot be replaced.

Since:
  JDevloper 3.0
See Also:
  `DBTransaction`, `DBTransactionImpl`

Constructor Summary
`protected` | `DatabaseTransactionFactory()`

Method Summary
`DBTransactionImpl` | `create(java.sql.Connection connection)` Instantiates a DBTransactionImpl object.
`DBTransactionImpl` | `create(java.lang.String url)` Instantiates a DBTransactionImpl object.
`DBTransactionImpl` | `create(java.lang.String url, java.util.Properties info)` Instantiates a DBTransactionImpl object.
`DBTransactionImpl` | `create(java.lang.String url, java.lang.String user, java.lang.String password)` Instantiates a DBTransactionImpl object.
`DBTransactionImpl` | `create(java.lang.String url, java.lang.String user, java.lang.String password, java.util.Properties info)` Instantiates a DBTransactionImpl object.
`static DatabaseTransactionFactory` | `getFactory()` Returns the installed factory using setFactory().
`static void` | `setFactory(DatabaseTransactionFactory impl)` Establishes the custom factory instance.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DatabaseTransactionFactory

    protected DatabaseTransactionFactory()

Method Detail

### setFactory

    public static void setFactory(DatabaseTransactionFactory impl)
                           throws java.lang.IllegalArgumentException

  Establishes the custom factory instance. The substitution can only be done once before the getFactory() method is called.
  Parameters:
    `impl` - The subclassed factory implementation to be used
  Throws:
    java.lang.IllegalArgumentException - if the instance is already created
  See Also:
    `getFactory()`

### getFactory

    public static DatabaseTransactionFactory getFactory()

  Returns the installed factory using setFactory(). If no factory is installed creates and sets the default instance.
  Returns:
    DatabaseTransactionFactory singleton

### create

    public DBTransactionImpl create(java.lang.String url)

  Instantiates a DBTransactionImpl object.
  Parameters:
    `url` - Url to be used for creating DBTransactionImpl.
  Returns:
    The newly created DBTransactionImpl instance.
  See Also:
    `DBTransactionImpl.DBTransactionImpl(String)`, `Transaction.connect(String)`

### create

    public DBTransactionImpl create(java.lang.String url,
                                    java.lang.String user,
                                    java.lang.String password)

  Instantiates a DBTransactionImpl object.
  Parameters:
    `url` - Url to be used for creating DBTransactionImpl.
    `user` - Username to be used to create DBTransactionImpl
    `password` - Password to be used to create DBTransactionImpl
  Returns:
    The newly created DBTransactionImpl instance.
  See Also:
    `DBTransactionImpl.DBTransactionImpl(String, String, String)`, `Transaction.connect(String, String, String)`

### create

    public DBTransactionImpl create(java.lang.String url,
                                    java.lang.String user,
                                    java.lang.String password,
                                    java.util.Properties info)

  Instantiates a DBTransactionImpl object.
  Parameters:
    `url` - Url to be used for creating DBTransactionImpl.
    `user` - Username to be used to create DBTransactionImpl
    `password` - Password to be used to create DBTransactionImpl
    `info` - Properties to be used to create DBTransactionImpl
  Returns:
    The newly created DBTransactionImpl instance.
  See Also:
    `DBTransactionImpl.DBTransactionImpl(String, String, String)`, `Transaction.connect(String, String, String)`

### create

    public DBTransactionImpl create(java.sql.Connection connection)

  Instantiates a DBTransactionImpl object.
  Parameters:
    `Connection` - Connection to be used for creating DBTransactionImpl.
  Returns:
    The newly created DBTransactionImpl instance.
  See Also:
    `DBTransactionImpl.DBTransactionImpl(Connection)`, `DBTransaction.connect(Connection)`

### create

    public DBTransactionImpl create(java.lang.String url,
                                    java.util.Properties info)

  Instantiates a DBTransactionImpl object.
  Parameters:
    `url` - Url to be used for creating DBTransactionImpl.
    `info` - Properties to be used to create DBTransactionImpl
  Returns:
    The newly created DBTransactionImpl instance.
  See Also:
    `DBTransactionImpl.DBTransactionImpl(String, Properties)`, `Transaction.connect(String, Properties)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD