Module com.microsoft.sqlserver.jdbc
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
Constructor
Description
`SQLServerDataSourceObjectFactory()`
Constructs a SQLServerDataSourceObjectFactory.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### SQLServerDataSourceObjectFactory

public SQLServerDataSourceObjectFactory()
Constructs a SQLServerDataSourceObjectFactory.

## Method Details

### 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`