Oracle Java EE 7 Application Developer Exam Practice Test
The Oracle Java EE 7 Application Developer Exam covers server-side Java technologies used to build web and enterprise applications. Practice questions sample tasks such as handling HTTP requests with servlets, exposing REST endpoints with JAX-RS, connecting JSF pages to managed beans, and applying CDI, EJB, and container services in application code.
Exam overview
About the Oracle Java EE 7 Application Developer Exam
Java EE development involves coordinating web components, business logic, and container-managed services. Servlet work includes retrieving request data and producing responses; JAX-RS work includes mapping resource classes and methods to HTTP operations, selecting media types, and returning large payloads efficiently. JSF expression language connects page components to bean properties, while CDI injection supplies managed dependencies. Enterprise beans add business methods, security-role restrictions, and transaction behavior such as starting a new transaction context. Developers also use container-configured resources, including JavaMail sessions, rather than constructing every service directly. The practice bank touches these APIs through short implementation scenarios, so use each item to distinguish similar annotations, method calls, and runtime responsibilities. For example, identify whether a requirement belongs to the servlet layer, REST resource layer, presentation binding, dependency injection, or enterprise-bean configuration.
Sample Practice Questions
Review a selection from this exam's published US Practice Tests practice bank.
A Java EE application must transmit a large file without buffering the entire response in memory. Which JAX-RS capability is most directly suited to this requirement?
Show answer
Correct answer: AJAX-RS StreamingOutput allows an application to write a response entity to an output stream, supporting streamed response content rather than requiring the whole representation to be assembled in memory first.
A servlet needs to read a request parameter named "region" from an HTTP request. Which API call returns its value as a String?
Show answer
Correct answer: BHttpServletRequest.getParameter(String) retrieves a named request parameter, such as one submitted in a query string or form body. Request attributes are server-side values set during request processing, while headers are accessed through separate methods.
In a Java EE 7 application, which component is primarily responsible for handling HTTP requests and responses in a web tier?
Show answer
Correct answer: AA servlet runs in a web container and can process HTTP requests and construct HTTP responses. The other choices serve persistence or messaging roles.
A JAX-RS endpoint should accept and produce JSON using the standard media-type constant. Which constant represents application/json?
Show answer
Correct answer: CMediaType.APPLICATION_JSON represents the application/json media type and is commonly used with JAX-RS @Consumes and @Produces declarations.
Which JAX-RS annotation commonly marks a Java class as a root resource that can define REST endpoints?
Show answer
Correct answer: A@Path associates a URI path with a JAX-RS resource class or method. The other annotations belong to persistence or servlet-related APIs.
An enterprise bean method should be unavailable to callers that do not have a specified security role. Which EJB annotation can restrict access by role?
Show answer
Correct answer: A@RolesAllowed limits invocation to callers in one or more specified security roles. @PermitAll allows all callers, @RunAs sets the role identity used for calls made by the component, and @DeclareRoles declares roles referenced by the application.
In a Java EE application using container-managed transactions, what is the usual transaction context for a bean method annotated with @TransactionAttribute(REQUIRES_NEW)?
Show answer
Correct answer: BREQUIRES_NEW causes the container to start a new transaction for the method. If the caller has an associated transaction, that transaction is suspended until the method completes.
How to use this practice test
Access is free. A session selects up to 20 random questions from the available bank of 50 and shows results after you finish. Use the questions to check recognition of Java EE APIs and application-layer responsibilities; revisit any missed item by tracing the requirement to the relevant component, annotation, or method.
Preparation tips
- Practice tracing an HTTP request through a servlet, including retrieving named parameters and producing a response.
- For JAX-RS, distinguish resource-class annotations, HTTP method mappings, media-type constants, and streaming approaches for large responses.
- Write JSF expression-language references to bean properties, then compare them with CDI’s role in injecting managed dependencies.
- Review EJB transaction attributes and role-based access controls, focusing on how each changes method invocation behavior.
- Identify container-managed resources such as JavaMail Session and the resource-injection annotations used to supply them.