user manual
330 BES Developer’s Guide
Other Considerations
{
String cxManagerStr = (String)ref.get( "connectionmanager-class"
).getContent();
Class cxmClass = Class.forName( cxManagerStr );
java.lang.ClassLoader cloader = cxmClass.getClassLoader();
refCm = (ConnectionManager)cxmClass.newInstance();
}
GoodConnectionFactory cf = null;
if ( refCm != null )
{
cf = new GoodConnectionFactory( refMcf, refCm );
}
else
{
cf = new GoodConnectionFactory( refMcf );
}
return cf;
}
return null;
}
}
Update the classes in the ra.xml standard deployment descriptor file. For
example, before extending the implementation, the ra.xml may look something
like this:
<managedconnectionfactory-class>com.shme.shmeAdapter.
LocalTxManagedConnectionFactory</managedconnectionfactory-class>
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-
interface>
<connectionfactory-impl-class>com.shme.shmeAdapter.BadConnnectionFactory</
connectionfactory-impl-class>
<connection-interface>java.sql.Connection</connection-interface>
<connection-impl-class>com.shme.Connection</connection-impl-class>
After extending the interfaces, the ra.xml may look something like this:
<managedconnectionfactory-class>com.shme.shmeAdapter.
LocalTxManagedConnectionFactory </managedconnectionfactory-class>
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-
interface>
<connectionfactory-impl-class>com.shme.shmeAdapter.GoodConnectionFactory</
connectionfactory-impl-class>
<connection-interface>java.sql.Connection</connection-interface>
<connection-impl-class>com.shme.shmeAdapter.Connection</connection-impl-
class>
As this illustrates, this conversion only impacts the connection factory. No
other Resource Adapter classes are affected by this conversion.










