+

Search Tips   |   Advanced Search

Configure container internationalization for enterprise beans

This task configures container internationalization for enterprise bean business methods.

This topic assumes that we have an assembly tool such as Rational Application Developer.

For information about assembly, refer to the documentation for the assembly tool. The steps in this topic refer to Rational Application Developer.

This topic assumes that we have started the assembly tool, configured the assembly tool for work on JEE modules, and created or imported an EJB project.

We must also have one or more enterprise beans set to container-managed internationalization (CMI) by default.

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.

  1. In the Java EE perspective, open the EJB project for which 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 we are finished.

    • If we do not provide a description, the policy name appears as Internationalization (runAsSetting).

    If the bean is to be run as Specified...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 we 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 to configure method-level internationalization attributes and click Next.

  7. Select the methods to configure and click Next. A check box is displayed next to each method name selected.

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


Results

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


Related concepts

  • Container internationalization attributes


    Related tasks

  • Set the internationalization type for enterprise beans