| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |
com.ibm.websphere.proxyds
WSDataSourceHelper
WSDataSourceHelper interface is an interface used for CMP multiple
datasource support added in XD Version 5.1 (also called V5 Proxy DataSource).
Users can lookup an
instance of WSDataSourceHelper from the JNDI name space using JNDI name
WSDataSourceHelper.JNDI_NAME.
This interface is deprecated in XD version 6.0. Please use
WSProxyDataSourceHelper instead.
There are two helper methods in this interface.
- resolveDataSourceReference(String):
This helper method is used to resolve the global JNDI name of the
datasource associated with a resource reference. For example, if a
resource reference "jdbc/myDS1" is mapped to a datasource with global
JNDI name "jdbc/Bank1", method call resolveDataSourceReference("jdbc/myDS1")
will return "jdbc/Bank1".
- setCurrentDataSourceJndiName(String):
This method is used to set the JNDI name (not the resource reference name) of
the Delegate DataSource that the current transaction will access. Currently,
one transaction can only access one Delegate DataSource.
See Also:
WSProxyDataSourceHelper
Method Summary |
public
String | resolveDataSourceReference(java.lang.String)
Resolve the datasource reference to the global JNDI name. For example, .
|
public
void | setCurrentDataSourceJndiName(java.lang.String)
Set the JNDI name (not the resource reference name) of the Delegate DataSource
that the current transaction will access.
|
JNDI_NAME
public
static JNDI_NAME
The JNDI name for user to look up an instance of WSDataSourceHelper
resolveDataSourceReference
public String resolveDataSourceReference( | | String dsResRefName )
|
Resolve the datasource reference to the global JNDI name. For example,
if a resource reference "jdbc/myDS1" is mapped to a datasource with
global JNDI name "jdbc/Bank1", resolveDataSourceReference("jdbc/myDS1")
will return "jdbc/Bank1".
Parameters:
dsResRefName
-
resource reference name
Returns:
the resolved datasource global JNDI name for this resource reference.
Throws:
com.ibm.websphere.proxyds.ResRefNotFoundException
setCurrentDataSourceJndiName
public void setCurrentDataSourceJndiName( | | String dsJndiName )
|
Set the JNDI name (not the resource reference name) of the Delegate DataSource
that the current transaction will access. Currently, one transaction can
only access one Delegate DataSource.
During the development time, the developers cannot know the global JNDI
name of the datasource that a resource reference will be mapped to. The
only known fact is the resource reference name. The recommneded practice is
to call the resolveDataSourceRefrence(String) method to get the JNDI name of
the mapped datasource, and then call setCurrentDataSourceJndiName with the
global JNDI name.
Parameters:
dsJndiName
-
the current datasource JNDI name
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |