Multiple choice java

When a packaged enterprise application (EAR file) is deployed to the application server, which activities can be performed? (2 correct answers)

  1. Specify the "context root" for each web application

  2. Generate access beans for any enterprise beans

  3. Assign alias names to the attributes of the Entity beans

  4. Map the Entity beans’ attributes to the relational database tables

Reveal answer Fill a bubble to check yourself
A,D Correct answer
Explanation

During EAR deployment, the application server allows specifying the web application's context root (URL path) and mapping entity bean abstract persistence schema to actual database tables. These are deployment-time configuration steps that vary by environment.

AI explanation

The two correct activities are specifying the context root for each web application and mapping Entity beans' attributes to relational database tables. When an EAR file is deployed to a J2EE/Java EE application server, deployment-time bindings must be resolved: each WAR module packaged inside the EAR needs a context root assigned (the URL path prefix under which its servlets/JSPs are accessed), and any CMP (container-managed persistence) Entity beans need their abstract persistence schema fields mapped to actual database table/column names for the specific target database. 'Generating access beans' and 'assigning alias names to Entity bean attributes' are not standard deployment-time activities in this context — access beans (an EJB client-helper pattern) and attribute aliasing aren't part of the required EAR deployment configuration.