nerdexam
Oracle

1Z0-895 · Question #66

A developer wants to package an enterprise bean FooBean within a .war file: @Stateless public xlass FooBean { public void foo () {} } Which package approach is correct?

The correct answer is D. / (Root). To include enterprise bean class files in aWARmodule, the class files should be in the WEB- INF/classes directory. Note: Enterprise beans often provide the business logic of a web application. In these cases, packaging the enterprise bean within the web application'sWARmodule…

EJB Module Packaging and Deployment

Question

A developer wants to package an enterprise bean FooBean within a .war file: @Stateless public xlass FooBean { public void foo () {} } Which package approach is correct?

Options

  • A/ (Root)
  • B/ (Root)
  • C/ (Root)
  • D/ (Root)

How the community answered

(36 responses)
  • A
    11% (4)
  • B
    6% (2)
  • C
    6% (2)
  • D
    78% (28)

Explanation

To include enterprise bean class files in aWARmodule, the class files should be in the WEB- INF/classes directory. Note: Enterprise beans often provide the business logic of a web application. In these cases, packaging the enterprise bean within the web application'sWARmodule simplifies deployment and application organization. Enterprise beans may be packaged within aWARmodule as Java programming language class files or within a JAR file that is bundled within theWARmodule. The Java EE 6Tutorial, Packaging Enterprise Beans inWAR Modules

Topics

#war packaging#stateless session bean#deployment structure

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice