WebSphere WebSphere Business Integration Message Service Clients for C/C++ Version 1.2.7 and .NET Version 1.2.6 Operating Systems: AIX, Linux, Solaris, Windows

Non-existent properties handling in .NET

The handling of non-existent properties in the XMS .NET is broadly consistent with the JMS specification, and also with the C and C++ implementations of XMS.

In JMS, accessing a non-existent property can result in a Java system exception when a method tries to convert the non-existent (null) value to the required type. If a property does not exist the following exceptions occur:

If a property does not exist in XMS .NET the following exceptions occur:

This implementation is different from Java, but it is broadly consistent with the JMS specification, and with the XMS C and C++ interfaces. Like the Java implementation, XMS .NET propagates any exceptions from the System.Convert call to the caller. Unlike Java however,XMS explicitly throws NullReferenceExceptions rather than just using the native behavior of the .NET framework through passing null to system conversion routines. If your application sets a property to a String like "abc" and calls GetIntProperty, the System.FormatException thrown by Convert.ToInt32("abc") is propagated to the caller, which is consistent with Java. MessageFormatException is thrown only if the types used for setProperty and getProperty are incompatible. This behavior is also consistent with Java.


Concept topic

Terms of Use | Rate this page

Last updated: 18 Jun 2008

© Copyright IBM Corporation 2005, 2008. All Rights Reserved.