IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.xs.ra
Class XSManagedConnectionFactory

java.lang.Object
  extended by com.ibm.websphere.xs.ra.XSManagedConnectionFactory
All Implemented Interfaces:
Serializable, ManagedConnectionFactory, ResourceAdapterAssociation

public final class XSManagedConnectionFactory
extends Object
implements ManagedConnectionFactory, ResourceAdapterAssociation

The XSManagedConnectionFactory create managed connections to the eXtreme Scale ObjectGrids.

Since:
8.5, XC10
See Also:
Serialized Form

Constructor Summary
XSManagedConnectionFactory()
           
 
Method Summary
 Object createConnectionFactory()
          Creates a non-managed XSConnectionFactory instance.
 Object createConnectionFactory(ConnectionManager conMgr)
          Creates a managed XSConnectionFactory instance.
 ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo conReq)
          Creates a new physical connection to the underlying ObjectGrid
 void destroy()
          Destroy this MCF and release any other resources.
 boolean equals(Object obj)
           
 String getCatalogServiceDomain()
          Get the eXtreme Scale specific property: CatalogDomain
 String getCatalogServiceEndpoints()
          Get the eXtreme Scale specific property: CatalogServiceEndpoints
 String getClientPropertiesResource()
          Get the eXtreme Scale specific property: ClientPropertiesResource
 String getClientPropertiesURL()
          Get the eXtreme Scale specific property: ClientPropertiesURL
 String getConnectionName()
          Get the eXtreme Scale specific property: ConnectionName
 PrintWriter getLogWriter()
          Get the log writer for this XSManagedConnectionFactory instance.
 String getObjectGridName()
          Get the eXtreme Scale specific property: ObjectGridName
 String getObjectGridResource()
          Get the eXtreme Scale specific property: ObjectGridResource
 String getObjectGridURL()
          Get the eXtreme Scale specific property: ObjectGridURL
 ResourceAdapter getResourceAdapter()
          Retrieve the associated eXtreme Scale resource adapter instance.
 int hashCode()
           
 boolean isLocalGrid()
          Get the eXtreme Scale specific property: LocalGrid
 ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo)
          Returns a matched connection from the candidate set of connections.
 void setCatalogServiceDomain(String catalogServiceDomain)
          Set the eXtreme Scale specific property: CatalogDomain
 void setCatalogServiceEndpoints(String catalogServiceEndpoints)
          Set the eXtreme Scale specific property: CatalogServiceEndpoints
 void setClientPropertiesResource(String clientPropsResource)
          Get the eXtreme Scale specific property: ClientPropertiesResource
 void setClientPropertiesURL(String clientPropsURL)
          Set the eXtreme Scale specific property: ClientPropertiesURL
 void setConnectionName(String connName)
          Set the eXtreme Scale specific property: ConnectionName
 void setLocalGrid(boolean useLocal)
          Set the eXtreme Scale specific property: LocalGrid
 void setLogWriter(PrintWriter out)
          Set the log writer for this ManagedConnectionFactory instance
 void setObjectGridName(String objectGridName)
          Set the eXtreme Scale specific property: ObjectGrid Name
 void setObjectGridResource(String objectGridResource)
          Set the eXtreme Scale specific property: ObjectGridResource
 void setObjectGridURL(String objectGridURL)
          Set the eXtreme Scale specific property: ObjectGridURL
 void setResourceAdapter(ResourceAdapter ra)
          Associate this object with an eXtreme Scale resource adapter.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XSManagedConnectionFactory

public XSManagedConnectionFactory()
Method Detail

getResourceAdapter

public ResourceAdapter getResourceAdapter()
Retrieve the associated eXtreme Scale resource adapter instance.

Specified by:
getResourceAdapter in interface ResourceAdapterAssociation
Returns:
The associated eXtreme Scale resource adapter
See Also:
ResourceAdapterAssociation.getResourceAdapter()

setResourceAdapter

public void setResourceAdapter(ResourceAdapter ra)
                        throws ResourceException
Associate this object with an eXtreme Scale resource adapter. Note, this method must be called exactly once. That is, the association must not change during the lifetime of this object.

Specified by:
setResourceAdapter in interface ResourceAdapterAssociation
Parameters:
ra - the eXtreme Scale resource adapter
Throws:
ResourceException
IllegalStateException
See Also:
ResourceAdapterAssociation.setResourceAdapter(ResourceAdapter)

createConnectionFactory

public Object createConnectionFactory()
                               throws ResourceException
Creates a non-managed XSConnectionFactory instance. The XSConnectionFactory instance gets initialized with a default XSConnectionManager instance provided by the eXtreme Scale resource adapter.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Returns:
the new XSConnectionFactory instance
Throws:
ResourceException
See Also:
ManagedConnectionFactory.createConnectionFactory()

createConnectionFactory

public Object createConnectionFactory(ConnectionManager conMgr)
                               throws ResourceException
Creates a managed XSConnectionFactory instance. The XSConnectionFactory instance gets initialized with the passed ConnectionManager. In the managed scenario, ConnectionManager is provided by the application server.

Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Parameters:
conMgr - - Connection Manager to be associated with the XSConnectionFactory.
Returns:
the new XSConnectionFactory instance
Throws:
ResourceException - ResourceAdapterInternalException
See Also:
ManagedConnectionFactory.createConnectionFactory(ConnectionManager)

createManagedConnection

public ManagedConnection createManagedConnection(Subject subject,
                                                 ConnectionRequestInfo conReq)
                                          throws ResourceException
Creates a new physical connection to the underlying ObjectGrid

Specified by:
createManagedConnection in interface ManagedConnectionFactory
Parameters:
subject - - Caller's security information. WebSphere eXtreme Scale client uses the credentials specified in a CredentialGenerator as part of the ConnectionSpec or the client properties.
conReq - - XS specific connection properties
Returns:
the new XSManagedConnection instance
Throws:
ResourceException
See Also:
ManagedConnectionFactory.createManagedConnection(Subject, ConnectionRequestInfo)

getLogWriter

public PrintWriter getLogWriter()
                         throws ResourceException
Get the log writer for this XSManagedConnectionFactory instance.

Specified by:
getLogWriter in interface ManagedConnectionFactory
Returns:
PrintWriter
Throws:
ResourceException
See Also:
ManagedConnectionFactory.getLogWriter()

matchManagedConnections

public ManagedConnection matchManagedConnections(Set connectionSet,
                                                 Subject subject,
                                                 ConnectionRequestInfo cxRequestInfo)
                                          throws ResourceException
Returns a matched connection from the candidate set of connections.

Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Parameters:
connectionSet - - candidate connection set
subject - - caller's security information
cxRequestInfo - - XS specific connection properties
Returns:
XSManagedConnection instance if acceptable match found otherwise null
Throws:
ResourceException
See Also:
ManagedConnectionFactory.matchManagedConnections(Set, Subject, ConnectionRequestInfo)

setLogWriter

public void setLogWriter(PrintWriter out)
                  throws ResourceException
Set the log writer for this ManagedConnectionFactory instance

Specified by:
setLogWriter in interface ManagedConnectionFactory
Parameters:
out - - PrintWriter - an out stream for error logging and tracing
Throws:
ResourceException
See Also:
ManagedConnectionFactory.setLogWriter(PrintWriter)

destroy

public void destroy()
Destroy this MCF and release any other resources.


getConnectionName

public String getConnectionName()
Get the eXtreme Scale specific property: ConnectionName

Returns:
The name of the eXtreme Scale client connection

setConnectionName

public void setConnectionName(String connName)
Set the eXtreme Scale specific property: ConnectionName

Parameters:
connName - - The name of the eXtreme Scale client connection

getObjectGridName

public String getObjectGridName()
Get the eXtreme Scale specific property: ObjectGridName

Returns:
The data grid name

setObjectGridName

public void setObjectGridName(String objectGridName)
Set the eXtreme Scale specific property: ObjectGrid Name

Parameters:
objectGridName - - The data grid name

getCatalogServiceEndpoints

public String getCatalogServiceEndpoints()
Get the eXtreme Scale specific property: CatalogServiceEndpoints

Returns:
The catalog service domain end points

setCatalogServiceEndpoints

public void setCatalogServiceEndpoints(String catalogServiceEndpoints)
Set the eXtreme Scale specific property: CatalogServiceEndpoints

Parameters:
catalogServiceEndpoints - - The catalog service domain end points

getCatalogServiceDomain

public String getCatalogServiceDomain()
Get the eXtreme Scale specific property: CatalogDomain

Returns:
The catalog service domain name defined in WebSphere Application Server

setCatalogServiceDomain

public void setCatalogServiceDomain(String catalogServiceDomain)
Set the eXtreme Scale specific property: CatalogDomain

Parameters:
catalogServiceDomain - - The catalog service domain name defined in WebSphere Application Server

getObjectGridURL

public String getObjectGridURL()
Get the eXtreme Scale specific property: ObjectGridURL

Returns:
The URL of the client data grid override XML file

setObjectGridURL

public void setObjectGridURL(String objectGridURL)
Set the eXtreme Scale specific property: ObjectGridURL

Parameters:
objectGridURL - The URL of the client data grid override XML file

getObjectGridResource

public String getObjectGridResource()
Get the eXtreme Scale specific property: ObjectGridResource

Returns:
The resource path of the client data grid override XML file

setObjectGridResource

public void setObjectGridResource(String objectGridResource)
Set the eXtreme Scale specific property: ObjectGridResource

Parameters:
objectGridResource - - The resource path of the client data grid override XML file

getClientPropertiesURL

public String getClientPropertiesURL()
Get the eXtreme Scale specific property: ClientPropertiesURL

Returns:
The URL of the client properties file

setClientPropertiesURL

public void setClientPropertiesURL(String clientPropsURL)
Set the eXtreme Scale specific property: ClientPropertiesURL

Parameters:
clientPropsURL - - The URL of the client properties file

getClientPropertiesResource

public String getClientPropertiesResource()
Get the eXtreme Scale specific property: ClientPropertiesResource

Returns:
The resource path of the client properties file

setClientPropertiesResource

public void setClientPropertiesResource(String clientPropsResource)
Get the eXtreme Scale specific property: ClientPropertiesResource

Parameters:
clientPropsResource - - The resource path of the client properties file

setLocalGrid

public void setLocalGrid(boolean useLocal)
Set the eXtreme Scale specific property: LocalGrid

Parameters:
useLocal - - Indicates if this managed connection factory is used only for access to a local ObjectGrid instance

isLocalGrid

public boolean isLocalGrid()
Get the eXtreme Scale specific property: LocalGrid

Returns:
Is this managed connection factory used only for access to a local ObjectGrid instance?

hashCode

public int hashCode()
Specified by:
hashCode in interface ManagedConnectionFactory
Overrides:
hashCode in class Object
See Also:
ManagedConnectionFactory.hashCode()

equals

public boolean equals(Object obj)
Specified by:
equals in interface ManagedConnectionFactory
Overrides:
equals in class Object
See Also:
ManagedConnectionFactory.equals(Object)

toString

public String toString()
Overrides:
toString in class Object

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.