IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.xs.ra
Class XSConnectionFactory

java.lang.Object
  extended by com.ibm.websphere.xs.ra.XSConnectionFactory
All Implemented Interfaces:
Serializable, Referenceable, ConnectionFactory

public final class XSConnectionFactory
extends Object
implements ConnectionFactory

The XSConnectionFactory creates connections to eXtreme Scale ObjectGrids.

Usage example:

 InitialContext ctx = new InitialContext();
 XSConnectionFactory cf = (XSConnectionFactory) ctx.lookup("java:comp/env/wxsconnection");
 XSConnection con = cf.getConnection("MyGrid");
 Session ogSession = con.getSession();
 ...
 
 con.close();
 
 
For additional examples, see the package documentation.

Since:
8.5, XC10
See Also:
Serialized Form

Constructor Summary
XSConnectionFactory()
           
 
Method Summary
 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
 Connection getConnection()
          Retrieve an XSConnection for the ObjectGrid configured on the ConnectionFactory.
 Connection getConnection(ConnectionSpec spec)
          Retrieve an XSConnection for the ObjectGrid using the specified XSConnectionSpec properties.
 Connection getConnection(String gridName)
          Retrieve an XSConnection for the specified ObjectGrid name.
 String getConnectionName()
          Get the eXtreme Scale specific property: ConnectionName
 ResourceAdapterMetaData getMetaData()
          Retrieve the metadata information regarding the eXtreme Scale resource adapter
 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
 RecordFactory getRecordFactory()
          Retrieve the RecordFactory instance
 Reference getReference()
          Gets the Reference instance
 boolean isLocalGrid()
          Get the eXtreme Scale specific property: LocalGrid
 void setReference(Reference ref)
          Sets the Reference instance
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XSConnectionFactory

public XSConnectionFactory()
Method Detail

setReference

public void setReference(Reference ref)
Sets the Reference instance

Parameters:
ref - - Reference instance
See Also:
Referenceable.setReference(Reference)

getReference

public Reference getReference()
                       throws NamingException
Gets the Reference instance

Specified by:
getReference in interface Referenceable
Returns:
Reference instance
Throws:
NamingException
See Also:
Referenceable.getReference()

getConnection

public Connection getConnection()
                         throws ResourceException
Retrieve an XSConnection for the ObjectGrid configured on the ConnectionFactory.

Specified by:
getConnection in interface ConnectionFactory
Returns:
the connection to the eXtreme Scale ObjectGrid
Throws:
ResourceException
See Also:
ConnectionFactory.getConnection()

getConnection

public Connection getConnection(ConnectionSpec spec)
                         throws ResourceException
Retrieve an XSConnection for the ObjectGrid using the specified XSConnectionSpec properties.

Specified by:
getConnection in interface ConnectionFactory
Parameters:
spec - the XSConnectionSpec properties used to retrieve the correct connection.
Returns:
the connection to the eXtreme Scale ObjectGrid
Throws:
ResourceException
See Also:
ConnectionFactory.getConnection(ConnectionSpec), XSConnectionSpec

getConnection

public Connection getConnection(String gridName)
                         throws ResourceException
Retrieve an XSConnection for the specified ObjectGrid name.

Parameters:
gridName - - The ObjectGrid name
Returns:
the connection to the eXtreme Scale ObjectGrid
Throws:
ResourceException

getMetaData

public ResourceAdapterMetaData getMetaData()
                                    throws ResourceException
Retrieve the metadata information regarding the eXtreme Scale resource adapter

Specified by:
getMetaData in interface ConnectionFactory
Returns:
The eXtreme Scale resource adapter metadata
Throws:
ResourceException
See Also:
ConnectionFactory.getMetaData()

getRecordFactory

public RecordFactory getRecordFactory()
                               throws ResourceException
Retrieve the RecordFactory instance

Specified by:
getRecordFactory in interface ConnectionFactory
Throws:
NotSupportedException
ResourceException
See Also:
ConnectionFactory.getRecordFactory()

toString

public String toString()
Overrides:
toString in class Object

getCatalogServiceDomain

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

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

getCatalogServiceEndpoints

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

Returns:
The catalog service domain end points

getClientPropertiesResource

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

Returns:
The resource path of the client properties file

getClientPropertiesURL

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

Returns:
The URL of the client properties file

getConnectionName

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

Returns:
The name of the eXtreme Scale client connection

getObjectGridName

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

Returns:
The data grid name

getObjectGridResource

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

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

getObjectGridURL

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

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

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?

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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