WebSphere WebSphere Application Server Express, Version 6.0.x Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

User properties

This topic describes the support provided by the SIMessage interface and the mediation configuration selector for user properties.

The JMS API supports user properties of primitive wrapper or string types. The property name can be any valid Java identfier providing it does not have the prefix JMS.

The SIMessage API also supports user properties of primitive wrapper or string types, and additionally supports byte[] and serializable types. Arbitrary serializable objects are stored as byte arrays, and are selected on as byte arrays only (using equals only).

User properties supported by the SIMessage API must have the prefix user. You can set and access these properties using getMessageProperty, setMessageProperty and deleteMessageProperty.

Interaction with JMS

Alternatively, you can set and access user properties using xxxUserProperty methods. In this case, the prefix user must be omitted. The property name, excluding the prefix user, exists in the same namespace as the JMS user properties.

For example, a JMS application calls a property as follows:
setStringProperty("color", "green");
A mediation can access the property by making one of the following calls:
  • getMessageProperty("user.color");  
  • getUserProperty("color");
Note: Mediation message selectors must contain the user prefix.
JMS property methods only affect user properties that have types supported by the JMS API:
  • clearProperties() clears only those properties supported by JMS.
  • propertyExists() returns true only when the property type is supported by JMS.
  • getPropertyNames() includes only those properties with types supported by JMS.
  • setObjectProperty("xxxx", null); clears a property only if it is supported by JMS.
Note that setxxxxProperty("xxxxx", value) overrides a user property of any type when the value is non-null.

Reference topic

Terms of Use | Feedback

Last updated: 2 Aug 2005
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.pmc.express.doc\ref\rjp0027_.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)