[Jan-2022] 1Z0-900 Dumps Full Questions - Java EE and Web Services Exam Study Guide [Q47-Q70]

Share

[Jan-2022] 1Z0-900 Dumps Full Questions - Java EE and Web Services Exam Study Guide

Exam Questions and Answers for  1Z0-900 Study Guide


Oracle 1Z0-900 Exam Syllabus Topics:

TopicDetails
Topic 1
  • Define Java to XML Schema mappings to marshall and unmarshall Java Objects by using JAXB API
  • Create, package and deploy Java EE application
Topic 2
  • Create REST Services and clients using JAX-RS API
  • Create REST Services and clients using JAX-RS API
Topic 3
  • Create JPA Entity and Relationship Object-Relational Mappings (ORM)
  • Produce and consume, encode and decode WebSocket messages
Topic 4
  • Handle errors using Servlets and Java Server Pages
  • Describe JSP syntax, use tag libraries and Expression Language (EL)
Topic 5
  • Use Entity Manager to perform database operations, transactions and locking with JPA entities
  • Create and execute JPQL statements
Topic 6
  • Manage servlet life cycle with container callback methods and WebFilters
  • Create SOAP Web Services and Clients using JAX-WS API
Topic 7
  • Handle entity data with conversions, validations, and key generation
  • Describe Java EE 7 standards, containers, APIs, and services
Topic 8
  • Create sessionEJB components containing synchronous and asynchronous business methods
  • Demonstrate understanding of the relationship between bean components

 

NEW QUESTION 47
Your class requires multiple resources defined, as shown in the following:

Which annotation do you use to group multiple @Resource declarations together for class-based injection, replacing <XXXX> in the code above?

  • A. @ResourceCollection
  • B. @ResourceGroup
  • C. @Resource
  • D. @Resources

Answer: C

 

NEW QUESTION 48
Your web application requires logic to remember items that a user placed into a shopping cart.
Which two mechanisms should you use to associate that information with the user? (Choose two.)

  • A. a database
  • B. ServletContext objects
  • C. HttpSession objects
  • D. HttpServletResponse objects

Answer: B,C

 

NEW QUESTION 49
Given:

If an exception is thrown inside the ifblock, what effect will it have on the transaction?

  • A. The transaction will be suspended.
  • B. The transaction will be rolled back.
  • C. The transaction will be committed.

Answer: B

 

NEW QUESTION 50
Given the code fragment:

Which URL triggers the invocation of the getEmployee() method?

  • A. <base url>/Employees/89724
  • B. <base url>/Employees/id/J6349
  • C. <base url>/Employees/J6349
  • D. <base url>/Employees/id:a7280

Answer: C

 

NEW QUESTION 51
Your organization is using min-max planning to replenish stock and the planning parameters are set at item organization level with a default subinventory.
Item: A, Min Qty: 25, Max Qty: 150 and Current Level: 20
The item above is purchased from a supplier. Although there is subinventory on hand, the subinventory is below the minimum required level. This should trigger a Min-Max report entry, but the requisition is not generated. Why?

  • A. Fixed lot multiplier is not set.
  • B. Min-Max planning can be performed at the Organization level.
  • C. No value has been set for the "Min-Max Replenishment Reorder Approval" profile.
  • D. Item is not defined in Manage Item Subinventories.
  • E. Rounding the Reorder Quantity is disabled.

Answer: D

 

NEW QUESTION 52
An inventory transaction is important to the system through an FBDI template.
Which transaction state denotes that an inventory transaction is created in the Oracle Inventory Management application?

  • A. New
  • B. Created
  • C. Validated
  • D. Deferred
  • E. Staged

Answer: C

 

NEW QUESTION 53
Identify two valid WebSocket message types for which you can register handlers. (Choose two.)

  • A. Binary Message
  • B. Error Message
  • C. Ping Message
  • D. Pong Message

Answer: A,D

Explanation:
Explanation
Reference https://docs.oracle.com/javaee/7/api/javax/websocket/Session.html

 

NEW QUESTION 54
Given the code fragments:

What code should you add to the body of the updateEmployeemethod in order to save pending changes to the database?

  • A. entityManager.getTransaction().begin();
    entityManager.merge(emp);
    entityManager.getTransaction().commit();
  • B. entityManager.merge(emp);
  • C. Context. Ctx = new InitialContext();
    UserTransaction utx = (UserTransaction)ctx.lookup("java:comp/
    UserTransaction");
    utx.begin();
    entityManager.merge(emp);
    utx.commit();
  • D. entityManager.lock(emp);
    EntityManager.merge(emp);

Answer: C

 

NEW QUESTION 55
Given the code fragment:

How can you apply DateConverter to the birthday field?

  • A. by adding @Convert(to=Date.class) at line 3
  • B. by adding @Converter(autoApply=true) at line 1
  • C. by adding @Convert((DateConverter.class)) at line 2
  • D. by invoking the setConverter(DateConverter.class) method on the EntityManager object

Answer: A

 

NEW QUESTION 56
Given the code sample:

And:

And:

And the next fragment from beans.xml:

And this injection point:
@Inject GenericMessenger messageHandler;
Which type would be injected at run time and referenced by the messageHandlervariable?

  • A. None of the above. An exception would be thrown due to ambiguous bean references.
  • B. GenericMessenger
  • C. SmsHandler
  • D. MsgHandler

Answer: B

 

NEW QUESTION 57
Given the following code:

What should you do at line 1 to enable this servlet receive request data without blocking?

  • A. Define a ReadListener and assign it to the request input stream.
  • B. Create a Callable class and delegate this operation to a ManagedExecutorService by using the dispatch method of AsyncContext.
  • C. Define an AsyncListener and assign it to the AsyncContext object.
  • D. Use a Runnable instance with the start () method of AsyncContext.

Answer: C

 

NEW QUESTION 58
The physical inventory process is carried out for a particular inventory organization with the following parameters:
* Negative quantity Tolerance Percentage is set to 10%
* Approval Type = 'Always'
The system says that there are 100 on band, but you only counted 95. What will happen?

  • A. The system will ask a user to recount before posting.
  • B. The setup is invalid; it will give an error message.
  • C. Because the 95 is within the 10% tolerance, it will post without approval.
  • D. An approval will be required before posting.

Answer: C

 

NEW QUESTION 59
Your supplier sent you stock against a consigned agreement. You transferred at the stock to owned and generated a consumption advice. An invoice was raised by the supplier and the payment made. A few days after using some of the quantities of the stock, you realized that some of the stock sent by the supplier is not of suitable quality and you need to send the stock back.
What is the process of returning the material?

  • A. You cannot return consigned items that are invoiced and paid. Treat the material as scrap.
  • B. You have to transfer the ownership of item and perform the return transaction.
  • C. You have to cancel the invoice and send the material back without changing the ownership.
  • D. Return the material and create a debit memo for the supplier.

Answer: D

 

NEW QUESTION 60
Given the code fragment:

And

Which two steps, when performed independently, enable the index.xhtml page to print the following text: The Id is 12345? (Choose two.)

  • A. Replace line 3 with: @Inject public Account getAcc()
  • B. Replace line 1 with: @Inject private Account acc;
  • C. Replace line 3 with: public @Inject Account getAcc()
  • D. Replace line 2 with: public void setAcc(@Inject Account acc)
  • E. Replace line 2 with: @Inject public void setAcc(Account acc)
  • F. Replace line 1 with: private @Inject Account acc;

Answer: C,D

 

NEW QUESTION 61
Given the code fragment:

Which method should be used on line 3 to enable default validation mechanism?

  • A. u.setEventHandler(ValidationEventHandler)
  • B. u.setProperty(Schema)
  • C. u.setProperty(String, Object)
  • D. u.setAdapter(XmlAdapter)

Answer: D

Explanation:
Explanation
Reference https://docs.oracle.com/javaee/6/api/javax/xml/bind/Unmarshaller.html

 

NEW QUESTION 62
Given the following code:

What should you do at line 1to enable this servlet receive request data without blocking?

  • A. Define an AsyncListenerand assign it to the AsyncContext object.
  • B. Create a Callable class and delegate this operation to a ManagedExecutorServiceby using the dispatch method of AsyncContext.
  • C. Define a ReadListener and assign it to the request input stream.
  • D. Use a Runnableinstance with the start ()method of AsyncContext.

Answer: A

Explanation:
Explanation

 

NEW QUESTION 63
Which statement is true about the relationship between HTTP and WebSockets?

  • A. A WebSocket connection can be initialized by either client or server.
  • B. A WebSocket connection uses HTTP protocol to exchange data with the browser.
  • C. A WebSocket connection is initialized with an HTTP handshake.
  • D. A WebSocket connection is a bi-directional HTTP session with message-handling support.

Answer: B

 

NEW QUESTION 64
You are working with JMS publish-subscribe operations.
What happens when a producer publishes a message to a topic for which a durable subscription exists but there are no subscribers available?

  • A. The publisher waits for a subscriber, who then consumes it. However, the publisher will time out if no consumer arrives within the given timeout period.
  • B. The publisher sends the message. However, it is never consumed because there wasn't anything listening when it arrived, regardless of the message timeout length.
  • C. The message publisher is immediately notified about the lack of subscribers and can decide for itself if, and when, to resend.
  • D. The publisher successfully sends a message, which will be consumed later, once there is a subscriber, assuming the message hasn't timed out.

Answer: D

Explanation:
Explanation/Reference:
Reference: https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/ com.ibm.websphere.nd.multiplatform.doc/ae/tjn0012_.html

 

NEW QUESTION 65
Which URL represents an invalid approach to pass a parameter to a REST resource?

  • A. <base-url>/Employees/1
  • B. <base-url>/Employees?value=1
  • C. <base-url>/Employees;value=1
  • D. <base-url>/Employees&value=1

Answer: C

 

NEW QUESTION 66
Identify two valid WebSocket message types for which you can register handlers. (Choose two.)

  • A. Binary Message
  • B. Error Message
  • C. Ping Message
  • D. Pong Message

Answer: A,D

Explanation:
Explanation/Reference: https://docs.oracle.com/javaee/7/api/javax/websocket/Session.html

 

NEW QUESTION 67
Given a JSL document describing a batch job:

How do you initiate a batch job?

  • A. Get the JobExecution object from BatchRuntime and call its start() method.
  • B. Get the JobOperator object from BatchRuntime and call its start() method.
  • C. Call BatchRunTime.initialize("ProductLoadJob");
  • D. Get the JobExecution object from BatchRuntime and set its status to JobStatus.INITIATED.

Answer: A

 

NEW QUESTION 68
Given the code fragment:

How long does this cookie persist?

  • A. until server shutdown
  • B. this request
  • C. until garbage collection in the servlet instance
  • D. until browser shutdown

Answer: D

Explanation:
Explanation/Reference:
Reference: https://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html

 

NEW QUESTION 69
What is true about Message-Driven Beans (MDBs)?

  • A. MDBs retain data caches between client calls.
  • B. MDBs are invoked synchronously.
  • C. Each MDBs can process messages only from a single client.
  • D. MDBs can participate in transactions.

Answer: D

Explanation:
Explanation/Reference:
Reference: https://docs.oracle.com/javaee/7/tutorial/ejb-intro003.htm

 

NEW QUESTION 70
......

Java EE 7 Application Developer Free Update With 100% Exam Passing Guarantee: https://www.actual4dumps.com/1Z0-900-study-material.html