In each transaction, the session bean has to use local interface to invoke any Container-Managed Persistence (CMP) enterprise beans. Remote interfaces of CMP enterprise beans are not supported and will cause unexpected behavior. Therefore, ensure your session bean uses a local interface to invoke CMP enterprise bean. If some session beans are involved in the same transaction which access the CMP EJBs with Proxy DataSource support, all calls to these session beans should use local interfaces. No remote interfaces can be used to access CMP EJBs with Proxy DataSource support or session beans which access these CMP EJBs.
At the beginning of every transaction (method), the Session bean has to specify the datasource the current transaction will use by using API WSProxyDataSourceHelper.setCurrentDataSourceJNDIName method. If the session bean does not specify the datasource JNDI name. The first datasource JNDI name from the jndiNames custom property of the proxy datasource will be used, and a warning will be logged.
The problem experienced is Performance Monitoring Instrumentation (PMI) is not available for statement cache used in Proxy DataSource.
Proxy DataSource uses a special statement cache for caching the prepared statements. In this release, there is no performance monitoring instrumentation for this statement cache.
The problem experienced is that the test connection does not work for Proxy DataSource.
The Test Connection button from the administrative console will not work for Proxy DataSource. If you configure your proxy datasource correctly, you will see exceptions when you click the Test Connection button. Using the testConnection function from the MBean will not work.
If you want to make sure the datasource is configured, click the Test Connection button of the underlying datasources for the proxy data source. For example, if your proxy datasource has the custom property jdbc/dsName1;jdbc/dsName2, you can test the connection to datasources with the JNDI name jdbc/dsName1 and jdbc/dsName2.
Configure the right statement cache size for a proxy datasource.
When you create a proxy datasource, set the statement cache size to 0 in the datasource panel. Configure the statement cache size for the proxy datasource using the custom property statementCacheSizes. If the value is a single integer, the statement cache sizes for all underlying datasources will be set to that value. Alternatively, you can set the statement cache size for individual underlying data sources using a semicolon separator with the format value1;value2;...;value2. For example, 10;20;30 means the statement cache size for the underlying datasource 1 is 10, the statement cache size for the underlying datasource 2 is 20, and the statement cache size for the underlying datasource 3 is 30.
Override the datastore helper class when creating the proxy datasource.
Currently, there is only two proxy datasource JDBC provider for all supported databases, one for non-XA, and one for XA. Specify the right datastore helper class when creating the datasources. If a wrong datastore helper class is specified, you might get exceptions. For example, if your underlying datasources use DB2 Universal JDBC provider, the datastore helper class should be overridden as com.ibm.websphere.proxyds.helper.DB2UniversalDSProxyDataStoreHelper.
If you use enterprise beans whose connection factory is mapped to a proxy datasource, your should access enterprise beans in global transactions.