[Version 5.0.2 and later]Container internationalization attributes

The internationalization policy of every CMI servlet and EJB business method has a container internationalization attribute that specifies which internationalization context the container is to scope to its invocation.

The container internationalization attribute has three main fields:

As a convenience, you can create named container internationalization attributes and associate them to the following:

Run-as field

The Run-as field specifies one of three types of invocation context that a container can scope to a method. For servlet service and EJB business methods, the container constructs the invocation internationalization context according to the Run as field setting and associates this context to the current thread before delegating to the method's implementation.

By default, invocations of servlet service methods and EJB business methods implicitly run as caller (RunAsCaller) unless the Run as field of a policy's attribute specifies otherwise. EJB client applications and AMI server components always run as server (RunAsServer).

Invocation context types specifiable with the Run as field are:

Caller
The container invokes the method under the internationalization context of the calling process. For any missing context element, the container supplies the corresponding default context element of the JVM. Select run as caller when you want the invocation to execute under the invocation context of the calling process.
Server
The container invokes the method under the default locale and time zone of the JVM. Select run as server when you want the invocation to execute under the invocation context of the JVM.
Specified
The container invokes the method under the internationalization context specified in the attribute. Select run as specified when you want the invocation to execute under the custom invocation context specified in the policy, then provide the custom context elements by completing the Locales and Time zone ID fields.

Note: JMS messages do not contain internationalization context. Although container-managed message-driven beans can be configured to run as caller, the container associates the default elements of the server process when invoking the onMessage() method of any message-driven bean configured as [CMI, RunAsCaller].

[5.0 only][Version 5.0.1][Version 5.0.2]With the Application Assembly Tool, the Run as field is configurable for any CMI servlet and business method of a CMI enterprise bean.

[Version 5.0.2 and later]You can also configure the Run as field for Web service business methods.

Locales field

The Locales field specifies an ordered list of locales that the container scopes to an invocation. A locale represents a specific geographical, cultural, or political region and contains three fields:

A valid locale must specify at least a language code or a country code; the variant is always optional. The first locale of the list is returned when accessing invocation context using the internationalization context API method getLocale().

[5.0 only][Version 5.0.1][Version 5.0.2]With the Application Assembly Tool, the Locales field is configurable for CMI servlets and for business methods of supported enterprise beans that run as specified.

Time zone ID field

The Time zone ID field specifies a shorthand identifier for a time zone that the container scopes to an invocation.

[5.0 only][Version 5.0.1][Version 5.0.2]With the Application Assembly Tool, the Time zone ID field is configurable for CMI servlets and for CMI EJB business methods that run as specified.

[Version 5.0.2 and later]You can also configure the Time zone ID field for Web service business methods.

A time zone represents a temporal offset and computes daylight savings information. A valid ID indicates any time zone supported by the SDK type, java.util.TimeZone. Specifically, a valid ID is any of the IDs appearing in the list of time zone IDs returned by method java.util.TimeZone.getAvailableIds(), or a custom ID having the form GMT[+|-]hh[[:]mm]; for example, America/Los_Angeles, GMT-08:00 are valid time zone IDs.


Related concepts
Internationalization type
Internationalization context: Management policies
Related tasks
Setting the internationalization type for servlets
Setting internationalization type for enterprise beans



Searchable topic ID:   cin_containerattribute
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/i18n/concepts/cin_containerattribute.html

Library | Support | Terms of Use | Feedback