Click View Selections. Click Import. The connector file is imported into Oracle Identity Manager.

21-42 Oracle Fusion Middleware Developers Guide for Oracle Identity Manager Connections should always be returned this way. service.releaseConnectionmyConnection; } catchConnectionServiceException e { handle } } You can also request connections to the target using ITResource Key. Here is an example: ConnectionService service = new ConnectionService; ResourceConnection myConnection = service.getConnectionitResourceKey;

21.4.4 Using a Third-party Pool

As mentioned earlier in the section, you can use any third-party pool for your custom connector. However, in addition to the steps described earlier, you must provide a concrete implementation of the GenericPool interface as a wrapper to the third-party pool. Table 21–7 lists the methods invoked for the GenericPool interface:

21.4.5 Example: Implementation of ResourceConnection

This example demonstrates an implementation of the ResourceConnection interface. Key methods are highlighted. Example 21–1 An Example of ResourceConnection Implementation Sample implementation for Socket Connections: import java.io.IOException; Note: It If the custom connector does not wish to use the UCP pool, it can choose to use GCP with the Native option, though there are no significant advantages to this. With the Native pool preference, the responsibility of maintaining and implementing the pool rests with the custom connector. Table 21–7 Methods of the GenericPool Interface Method Purpose initializePoolPoolConfiguration poolConfig To initialize the pool. The PoolConfiguration data object contains all pool-related parameters. borrowConnectionFromPool To request a connection. returnConnectionToPoolResourc eConnection resConn To return a connection to the pool. refreshPoolPoolConfiguration newPoolConfig To refresh the pool with updated values. destroyPool To remove the pool for example when ITResource is deleted. Creating and Managing Generic Technology Connectors 21-43 import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketException; import java.net.UnknownHostException; import com.oracle.oim.gcp.exceptions.ResourceConnectionCloseException; import com.oracle.oim.gcp.exceptions.ResourceConnectionCreateException; import com.oracle.oim.gcp.exceptions.ResourceConnectionValidationxception; import com.oracle.oim.gcp.resourceconnection.ResourceConnection; public class SocketResourceConnectionImpl extends Socket implements ResourceConnection { public SocketResourceConnectionImpl { super; } Sample: Concrete implementation for closing a socket connection public void closeConnection throws ResourceConnectionCloseException{ ifthis.isClosed{ try { this.close; } catch IOException e { throw new ResourceConnectionCloseException[Client ResourceConnection implementation] Failed to close socket connection ; } } } Sample : Concrete implementation for creating a socket connection. The return value is the actual physical socket connection public ResourceConnection createConnectionHashMap itResInfoMap throws ResourceConnectionCreateException { ResourceConnection r = null ; SocketResourceConnectionImpl i = new SocketResourceConnectionImpl; try { HashMap has all ITResource related information that is needed for connecting to target. String serverAddress= String itResInfoMap.get Server Address.trim; utility method getIntValue returns an int for a String int port = getIntValueStringitResInfoMap.getPort.trim; System.out.printlnConnecting to Socket with IP Address + serverAddress+ at port + port; InetSocketAddress inet = new InetSocketAddressserverAddress,port; i.connectinet; ifi.isConnected{ throw new ResourceConnectionCreateException Failed to create socket: connection failure;