Configure container internationalization for enterprise beans

This task configures container internationalization for enterprise bean business methods.

 

Before you begin

This article assumes that you have an assembly tool such as the Application Server Toolkit (AST) or Rational Web Developer.

This article also assumes that you have started the assembly tool, configured the assembly tool for work on J2EE 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.

 

Overview

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

  1. In the J2EE perspective, open the EJB project for which you want to configure container internationalization.

    1. Double-click EJB Projects.

    2. Double-click the name of the EJB project to see its contents.

    3. Double-click the deployment descriptor object.

    The EJB Deployment Descriptor panel is displayed.

  2. In the EJB Deployment Descriptor panel, click the Internationalization tab. Any business methods that are already configured are displayed in the Internationalization attributes list.

  3. To configure a CMI business method, click Add following the Internationalization attributes list. The Internationalization Attributes wizard opens.

  4. 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.

    1. 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).

    2. 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.

  5. Click Next.

  6. Select the beans for which you want to configure method-level internationalization attributes and click Next.

  7. 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.

  8. Click Finish to exit the wizard.

  9. From the menu bar, click File > Save.

 

Result

The bean methods are now configured to run under the associated internationalization settings.


 

See Also


Container internationalization attributes

 

Related Tasks


Setting the internationalization type for enterprise beans

 



 

 

Rational is a trademark of the IBM Corporation in the United States, other countries, or both.