Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Free practice questions with explanations

Oracle 1Z0-900 Dumps 2026 with Free Practice Questions and Answers

14 original Java EE 7 Application Developer exam practice questions with answers and explanations.

Covers Create Java Applications Using WebSockets, Create Java Web Applications Using JSPs, Create Java Web Applications Using Servlets, Develop Web Applications Using JSFs and 10 more.

Question types: single answer, multiple answers, drag and drop, dropdown and order list. A new question is added every 15 days.

1Z0-900 Practice Set Details

Vendor
Oracle
Exam Code
1Z0-900
Questions On This Page
14
Exam Topics Covered
14 of 14
Question Types
5
Newest Question
New Question
Every 15 days
Full Question Set
142
Certification
Oracle Java
14 questions

Oracle 1Z0-900 Exam Questions and Answers by Topic

Understand Java EE Architecture

1 practice question on this topicWhat this topic covers

Question 1

Added

Drag And Drop

A company is separating a Java EE 7 application into components while preserving portability across compliant application servers. Each responsibility must be assigned to the Java EE component or container best suited to it. Match each responsibility to its target.

Drag each item onto its matching target. On a phone: tap an item, then tap a target.

Run a transactional business service exposed as a local EJB
Render dynamic HTML using JSP and servlet request handling
Manage an injected contextual object with a request scope
Package application modules and deployment descriptors together
EJB container
Web container
CDI container services
Enterprise archive
Correct answer:
  • Render dynamic HTML using JSP and servlet request handling → Web container
  • Run a transactional business service exposed as a local EJB → EJB container
  • Manage an injected contextual object with a request scope → CDI container services
  • Package application modules and deployment descriptors together → Enterprise archive

Servlets and JSPs execute in the web container, while EJB components receive services such as container-managed transactions from the EJB container. CDI contextual lifecycle and injection apply through CDI services, including request-scoped beans. An enterprise archive packages Java EE modules and application-level deployment information for deployment. Assigning request handling to the EJB container confuses web and business tiers, and an EAR is a packaging unit rather than an execution container.

Manage Persistence Using JPA Entities and BeanValidation

1 practice question on this topicWhat this topic covers

Question 2

Added

Dropdown

A persistence service must update an existing managed entity and ensure that a competing transaction cannot silently overwrite the value read by the service. The application uses container-managed JPA transactions and does not require database-specific locking syntax. Complete the code with the correct lock mode and persistence operation.

Choose the correct value for each blank.

Customer customer = em.find(Customer.class, id, ); customer.setStatus(status); em.(customer);
Correct answer:

Customer customer = em.find(Customer.class, id, LockModeType.OPTIMISTIC); customer.setStatus(status); em.merge(customer);

The optimistic lock mode requests version-based conflict detection without holding a database lock for the duration of the transaction, which fits the requirement to detect rather than silently overwrite concurrent changes. merge copies the state of the supplied entity into a managed instance and returns that managed instance. PESSIMISTIC_WRITE takes a database lock and is a heavier strategy than required. NONE provides no requested lock behavior. persist is for making a new entity persistent, and remove deletes rather than updates.

Implement Business Logic by Using EJBs

1 practice question on this topicWhat this topic covers

Question 3

Added

Single Answer

An order-processing EJB uses container-managed transactions. Its public method places an order and invokes a second public method on the same bean that is annotated with @TransactionAttribute(REQUIRES_NEW), because inventory logging must commit independently. Testing shows the inner method participates in the outer transaction instead. The team wants to retain CMT and avoid introducing a remote interface. What is the best correction?

Correct answer: C

EJB transaction attributes are applied by the container when a call crosses the bean's business interface or no-interface view through its proxy. A direct self-invocation bypasses that interception, so the REQUIRES_NEW attribute is not applied. Moving the method to a separate injected EJB makes the call pass through the container and permits the independent transaction. Switching to BMT changes transaction demarcation rather than fixing the self-invocation. Asynchronous invocation does not provide the requested transaction-attribute semantics, and MANDATORY requires an existing transaction.

Use Java Message Service API

1 practice question on this topicWhat this topic covers

Question 4

Added

Multiple Answers

A Java EE 7 application consumes inventory commands from a JMS queue using a message-driven bean. Each command must update a database row and acknowledge the message only if the database work commits. The application server provides a transactional JMS connection factory and the MDB uses container-managed transactions. Which two design choices meet the requirement? (Choose two.)

Correct answer: C, D

With a transactional resource setup and container-managed transactions, the MDB listener invocation runs in a transaction that can encompass message consumption and database updates. REQUIRED is the standard transaction attribute for this listener behavior, and a failed invocation causes rollback so the message is not acknowledged as successfully processed. Acknowledging first can lose work if the database update fails. Returning normally after failure permits commit, while independent local transactions cannot guarantee atomic coordination between the database change and message consumption.

Implement SOAP Services by Using JAX-WS and JAXB APIs

1 practice question on this topicWhat this topic covers

Question 5

Added

Single Answer

A Java EE 7 SOAP endpoint accepts a request containing a Java property whose name is accountId, but the published XML schema must use the element name account-number without changing the Java API used by existing callers. The property type is a String, and the service must continue using JAXB's default mapping for all other properties. Which change is the most appropriate?

Correct answer: A

@XmlElement controls the XML element name mapped to a JAXB property, allowing accountId to remain the Java property while the schema element is account-number. @WebParam names a method parameter in the JAX-WS operation mapping, not an unrelated JAXB property within a complex type. @XmlType names the XML type rather than one property element. A SOAP handler would add unnecessary message rewriting and would not be the appropriate JAXB mapping mechanism.

Create Java Web Applications Using Servlets

1 practice question on this topicWhat this topic covers

Question 6

Added

Multiple Answers

A Java EE 7 application accepts a search form by POST and redirects users to a canonical GET URL. A filter adds a security header to every response, and an audit requirement says the original form parameters must be recorded before the redirect. The existing filter is mapped only to REQUEST dispatches, and the servlet currently reads parameters after calling sendRedirect. Which two changes satisfy the requirements? (Choose two.)

Correct answer: A, D

The servlet must capture the POST parameters before redirecting because sendRedirect commits a response instructing the client to make a separate request; the new GET does not carry the original POST body. A client-side redirect creates a new REQUEST dispatch, so the REQUEST-mapped filter applies to that request. FORWARD mapping is irrelevant to a redirect. A RequestDispatcher forward remains server-side and does not make the browser request a new canonical URL.

Create Java Web Applications Using JSPs

1 practice question on this topicWhat this topic covers

Question 7

Added

Single Answer

A retail application renders a JSP that includes a reusable header and calls a tag library to display a customer's preferred name. In production, a malformed tag attribute causes a translation-time JSP error, while a separate runtime exception on another page must be shown through a branded error JSP. The operations team cannot change the web.xml deployment descriptor for this release. Which approach meets both needs with the least disruption?

Correct answer: B

The isErrorPage directive makes the branded JSP an error page with access to the implicit exception object, and the failing JSP can designate it with errorPage for runtime exceptions. A translation error occurs before the JSP executes, so it cannot be caught by a scriptlet or handled by a page directive on that same broken page. JSP errorPage does not automatically cover translation failures, and ServletContext error-page mappings are deployment configuration, not an annotation-based substitute here.

Implement REST Services Using JAX-RS API

1 practice question on this topicWhat this topic covers

Question 8

Added

Order List

A Java EE 7 service must expose a customer resource at /customers/{id}, accept JSON representations, and return a location for newly created customers. The service must remain portable across Java EE 7 application servers and must use JAX-RS resource annotations rather than vendor-specific routing. Arrange the implementation steps in the order they should be performed.

Drag the steps into the correct order, or use the arrows.

  1. Add a @POST method that consumes JSON and returns the created resource response
  2. Add a @PathParam method for the customer identifier
  3. Return a Response with the created resource URI in its Location header
  4. Create a root resource class with @Path("customers")
Correct answer:
  1. Create a root resource class with @Path("customers")
  2. Add a @POST method that consumes JSON and returns the created resource response
  3. Add a @PathParam method for the customer identifier
  4. Return a Response with the created resource URI in its Location header

The resource class establishes the common path first. The collection POST method can then define JSON input and creation behavior, while the identifier-bound method defines the individual resource route. A successful create response should include the new resource URI in Location, typically by building a Response with created status. In an implementation, the POST method would construct that URI from the assigned identifier before building the response; the URI requirement is the final response behavior.

Create Java Applications Using WebSockets

1 practice question on this topicWhat this topic covers

Question 9

Added

Single Answer

A telemetry dashboard uses a Java EE 7 WebSocket endpoint to push updates to browsers. During a load test, a client sends a large text message that arrives in several partial callbacks; the endpoint currently parses each callback as a complete JSON document and fails intermittently. The application must preserve message boundaries and must not buffer an unbounded amount of data in application code. Which change is the best fit?

Correct answer: D

A whole-message String handler receives the assembled text message, so JSON parsing runs only after the message is complete. The container manages the fragment assembly rather than requiring application code to treat each callback as a document. Parsing every partial callback still attempts to parse incomplete JSON, and discarding the final fragment loses data. AsyncRemote concerns outbound sending, not inbound reassembly. A decoder is not registered from @OnOpen; decoders are configured on the endpoint and are not a callback-time fragment merger.

Develop Web Applications Using JSFs

1 practice question on this topicWhat this topic covers

Question 10

Added

Single Answer

A multinational support portal stores the selected locale in a CDI bean and renders localized messages with JSF. Users can change their language from a menu, and the new selection must apply to the next render without restarting the application. A developer currently selects a bundle with a fixed locale in faces-config.xml and expects changing the bean field to switch bundles. Which design is the best fit?

Correct answer: D

JSF renders a view using its UIViewRoot locale, and selecting that locale for the view allows resource-bundle lookup to use the corresponding localized messages on the next render. A fixed bundle declaration does not dynamically change its locale by mutating a bundle instance. Changing the container-wide default affects users globally and is not an appropriate per-user setting. CDI does not automatically inject per-view localized message strings.

Secure Java EE 7 Applications

1 practice question on this topicWhat this topic covers

Question 11

Added

Single Answer

A Java EE 7 web application has a protected /finance/* area that must require an authenticated user in the finance role. The application already defines that role, and the team wants container-managed authorization with BASIC authentication over HTTPS. They must not add checks to every servlet, and unauthenticated users must be challenged by the container. Which configuration is the best fit?

Correct answer: A

A URL security constraint associates the protected pattern with the finance role, and BASIC login configuration causes the container to challenge unauthenticated clients. A confidential transport guarantee requires the protected traffic to use HTTPS. Per-servlet checks duplicate authorization logic and do not configure the requested container challenge. An empty auth-constraint denies access to all users, while HTTP violates the transport requirement. run-as configures the identity used for calls made by a component, not the caller's authorization to access a URL.

Use CDI Beans

1 practice question on this topicWhat this topic covers

Question 12

Added

Single Answer

A Java EE 7 application needs an audit event published when an order is submitted. The order service must not depend on the audit implementation, and the audit observer should run synchronously during event delivery so a failure can participate in the caller's processing path. The team also wants CDI to choose the observer by event type rather than using a global static registry. Which implementation best meets the design?

Correct answer: A

CDI event injection decouples the publisher from observers: the service fires an event, and a type-compatible observer method is notified synchronously by default. An asynchronous observer changes the required delivery behavior, and Instance is for obtaining contextual bean instances rather than publishing events. A static registry creates the coupling the design is intended to avoid, while @PostConstruct is a lifecycle callback. EJB timers schedule callbacks and are not CDI event delivery.

Use Concurrency API in Java EE 7 Applications

1 practice question on this topicWhat this topic covers

Question 13

Added

Single Answer

A Java EE 7 application must process independent reports concurrently. Each task needs container-managed security identity and naming context, and the deployment must not create unmanaged threads. The administrator controls the executor's pool size through the application server. Which approach is most appropriate?

Correct answer: A

ManagedExecutorService is the Java EE concurrency facility for submitting tasks while allowing the container to manage execution resources and propagate relevant application context, including security and naming context. Its configuration can be managed by the server. A Java SE executor and manually created threads are unmanaged and do not meet the context or lifecycle constraints. The common ForkJoinPool is also not a container-managed executor, and an EJB pool setting does not configure it.

Use Batch API in Java EE 7 Applications

1 practice question on this topicWhat this topic covers

Question 14

Added

Single Answer

A finance batch job has three steps: validate an input file, import valid records, and produce a reconciliation report. The import step must run only when validation completes with exit status COMPLETED; otherwise the job should stop and report the validation failure. The team wants declarative flow control in a JSR 352 JSL XML job and does not want the batchlet to launch another job. Which design is the best fit?

Correct answer: A

A JSR 352 decision element can inspect the prior step's exit status and direct the job flow to the appropriate next step. That provides the required conditional transition in JSL and avoids running import after failed validation. A split is intended for parallel flows, not status-dependent sequencing. A listener that always starts import ignores the required exit condition. Launching another job from a batchlet is unnecessary and does not provide the requested declarative flow control.

More Oracle Practice Questions

Get the Full Oracle 1Z0-900 Dumps as PDF and Practice Test

14 questions are free on this page and the full set has 142. It comes as a PDF and an online practice test, with 90 days of free updates.