Package com.microsoft.sqlserver.jdbc

## Class SQLServerDataSourceObjectFactory

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.SQLServerDataSourceObjectFactory

All Implemented Interfaces:
  `ObjectFactory`

    public final class SQLServerDataSourceObjectFactory
    extends Object
    implements ObjectFactory

Defines an object factory to materialize datasources from JNDI.

### Constructor Summary

Constructors
`SQLServerDataSourceObjectFactory()` Constructs a SQLServerDataSourceObjectFactory.

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `getObjectInstance​(Object ref, Name name, Context c, Hashtable<?,?> h)` Returns an reference to the SQLServerDataSource instance getObjectInstance is a factory for rehydrating references to SQLServerDataSource and its child classes.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SQLServerDataSourceObjectFactory

    public SQLServerDataSourceObjectFactory()

Constructs a SQLServerDataSourceObjectFactory.

### Method Detail

#### getObjectInstance

    public Object getObjectInstance​(Object ref,
                                    Name name,
                                    Context c,
                                    Hashtable<?,?> h)
                             throws SQLServerException

Returns an reference to the SQLServerDataSource instance getObjectInstance is a factory for rehydrating references to SQLServerDataSource and its child classes. Caller gets the reference by calling SQLServerDataSource.getReference. References are used by JNDI to persist and rehydrate objects.

Specified by:
  `getObjectInstance` in interface `ObjectFactory`
Throws:
  `SQLServerException`