This task configures container internationalization for enterprise
bean business methods.
Before you begin
This topic assumes that you have an assembly tool such as Rational® Application Developer.
For
information about assembly, refer to the documentation for your assembly tool.
The steps in this topic refer to Rational Application Developer.
This
topic assumes that you have started the assembly tool, configured the assembly
tool for work on Java Platform, Enterprise Edition (Java EE)
modules, and created or imported an EJB project.
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 Java EE 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.