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.


See Also:
    WSProxyDataSourceHelper


Field Summary
public  StringJNDI_NAME
          

Method Summary
public  StringresolveDataSourceReference(java.lang.String)
           Resolve the datasource reference to the global JNDI name. For example, .
public  voidsetCurrentDataSourceJndiName(java.lang.String)
          

Set the JNDI name (not the resource reference name) of the Delegate DataSource that the current transaction will access.


Field Detail

JNDI_NAME

public 
  static JNDI_NAME
The JNDI name for user to look up an instance of WSDataSourceHelper

Method Detail

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