IBM WebSphere Adapters Network Card User Manual


 
fdesc2.setGenericDataBindingClassName("com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl");
fdesc2.setFaultName(FaultBOUtil.MATCHES_EXCEEDED_LIMIT_NAME);
FaultDataDescription desc[] = new FaultDataDescription[] {fdesc1, fdesc2};
funcDesc.setFaultSelectorClassname("com.ibm.j2ca.extension.emd.runtime.WBIFaultSelectorImpl");
funcDesc.setFaultDataDescriptions(desc);
} catch (Exception e) {
throw new MetadataException(
"Unable to create fault BO definitions " + e.getMessage(), e); //$NON-NLS-1$
}
}
The following example shows code for implementing FaultDataDescription in the
JDEBFFaultDataDescription class:
public class JDEBFFaultDataDescription implements
FaultDataDescription {
public JDEBFFaultDataDescription() {
super();
// TODO Auto-generated constructor stub
}
private String faultName = null;
public String getFaultName() {
// TODO Auto-generated method stub
return faultName;
}
public void setFaultName(String faultName) {
this.faultName = faultName;
}
}
Configuration for fault handling:
Adapter Foundation Classes fault names and the corresponding fault binding
names are used in the fault configuration.
A fault name is defined within each fault class. The base fault binding is
configured unless attributes are unique.
The following table includes examples of situations when an adapter might throw
each type of fault. These are examples only.
Table 4. Fault name and configured fault binding
Fault Name Configured Fault Binding
DUPLICATE_RECORD com.ibm.j2ca.extension.emd.runtime.WBIFaultDataBindingImpl
The adapter throws this fault when processing an outbound Create operation
when an error occurs because the specified file already exists in the specified
directory path.
172 WebSphere Adapters: WebSphere Adapter Toolkit User Guide