Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | 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`, `DBTransactionImpl2`

Constructor Summary
`DatabaseTransactionFactory()`

Method Summary
`DBTransactionImpl2` | `create()` Instantiates a DBTransactionImpl2 instance.
`DBTransactionImpl` | `create(java.sql.Connection connection)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(javax.sql.DataSource ds)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(javax.sql.DataSource ds, java.lang.String user, java.lang.String passwd)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(java.lang.String url)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(java.lang.String url, java.util.Properties info)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(java.lang.String url, java.lang.String user, java.lang.String password)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`DBTransactionImpl` | `create(java.lang.String url, java.lang.String user, java.lang.String password, java.util.Properties info)` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`NullDBTransactionImpl` | `createNullTransaction()` Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
`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

    public 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 DBTransactionImpl2 create()

  Instantiates a DBTransactionImpl2 instance. Applications who wish to provide custom DBTransaction implementation should override this method to return the custom DBTransactionImpl2 instance.
  Since:
    9.0.3

### create

    public DBTransactionImpl create(java.lang.String url)

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  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)`, `DBTransactionImpl2`

### create

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

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  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)`, `DBTransactionImpl2`

### create

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

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  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)`, `DBTransactionImpl2`

### create

    public DBTransactionImpl create(java.sql.Connection connection)

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  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)`, `DBTransactionImpl2`

### create

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

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  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)`, `DBTransactionImpl2`

### create

    public DBTransactionImpl create(javax.sql.DataSource ds)

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  See Also:
    `DBTransactionImpl2`

### create

    public DBTransactionImpl create(javax.sql.DataSource ds,
                                    java.lang.String user,
                                    java.lang.String passwd)

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  See Also:
    `DBTransactionImpl2`

### createNullTransaction

    public NullDBTransactionImpl createNullTransaction()

  Deprecated. Since 9.0.3. This method is no longer called to create a connected DBTransaction instance. Instead, DBTransactionImpl2 instance, created by `create()`, migrates from disconnected to connected state.
  See Also:
    `DBTransactionImpl2`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Application Development Framework Model and Business Components Java API Reference 10g Release 3 (10.1.3) B16005-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1997, 2005, Oracle. All rights reserved.