At runtime, when business objects containing the CxIgnore or CxBlank attribute values are sent from a source adapter to the WebSphere Application Server broker implementation, the CwXML data handler sets reserved values in place of those attribute values in the XML instance document that it passes to the broker; after the broker processes the business object and returns it as an XML message to the destination adapter, the data handler in the destination adapter restores the CxIgnore and CxBlank values. This sequence of actions is necessary to prevent the java object in the broker from assigning a default value of zero to those attributes when it processes the business object.
The following table shows the reserved values that are used in place of the values CxIgnore and CxBlank for each data type:
Data type | CxIgnore | CxBlank |
---|---|---|
int | Integer.MIN_VALUE | Integer.MAX_VALUE |
float | Float.MIN_VALUE | Float.MAX_VALUE |
double | Double.MIN_VALUE | Double.MAX_VALUE |
string, date, longtext | "CxIgnore" |
TestCustomerElement customer = new TestCustomerElement(); AddressElement address = new AddressElement();
customer.setAddress(address); BusinessObjectUtilities.initializeBO(customer);
customer.setCustomerId("2424234"); address.setCountry("USA");
Note that you should create all your business objects, create their parent/child structure, and invoke the initialization routine on the parent business object, before any business object attributes are set.