This task configures container internationalization for enterprise
bean business methods.
Before you begin
This topic assumes that you have an assembly tool such as Application Server Toolkit (AST), Rational Application Developer or Rational Web Developer.
For
information about assembly, refer to the online documentation or information
center for your assembly tool. This topic points you to AST documentation.
The AST information center accompanies the WebSphere Application Server information
center.
This topic assumes that you have started the assembly tool,
configured the assembly tool for work on Java 2 Platform, Enterprise Edition
(J2EE) modules, and created or imported an EJB project. Refer to the following
topics in AST documentation:
You must also have one or more enterprise beans
set to container-managed internationalization (CMI) by default.
About this task
This procedure relates one or more business methods to one or
more container-managed internationalization (CMI) attributes. Use this procedure
also for stateless session beans that are enabled for Web services.
Procedure
- In the J2EE perspective, open the EJB project for which you want
to configure container internationalization.
- Double-click EJB Projects.
- Double-click the name of the EJB project to see its contents.
- Double-click the deployment descriptor object.
The EJB Deployment Descriptor panel is displayed.
- In the EJB Deployment Descriptor panel, click the Internationalization
tab. Any business methods that are already configured are displayed
in the Internationalization attributes list.
- To configure a CMI business method, click Add following
the Internationalization attributes list. The Internationalization
Attributes wizard opens.
- Set the Run As field by selecting Caller, Server,
or Specified. Add a meaningful description. As a group,
the CMI attribute settings comprise an internationalization policy.
- The description appears as Internationalization description (runAsSetting) in
the Internationalization attributes list when you are finished.
- If you do not provide a description, the policy name appears as Internationalization
(runAsSetting).
If the bean is to be run as Specified, complete the following steps
to specify the context elements that the container scopes to bean method invocations.
- Set a time zone ID and add a time zone description as needed.
If you do not find the appropriate time zone in the ID list, click Custom to
define one relative to Greenwich Mean Time (GMT).
- Set a locale. Select a language and (optional) geographic
region; specify a variant as needed. Add a locale description as needed and
click OK to finish.
- Click Next.
- Select the beans for which you want to configure method-level internationalization
attributes and click Next.
- Select the methods that you want to configure and click Next.
A check box is displayed next to each method name that you select.
- Click Apply to All to place a check box next to the displayed bean
name.
- Click Select Beans to select more beans with CMI.
- Click Finish to exit the wizard.
- From the menu bar, click File > Save.
Results
The bean methods are now configured to run under the associated internationalization
settings.