Welcome to TestSimulate

Pass Your Next Certification Exam Fast!

Everything you need to prepare, learn & pass your certification exam easily.

365 days free updates. First attempt guaranteed success.

Java EE and Web Services 1Z0-900 Practice Test Engine Try These 142 Exam Questions [Q20-Q45]

Share

Java EE and Web Services 1Z0-900 Practice Test Engine: Try These 142 Exam Questions

Guaranteed Success in Java EE and Web Services 1Z0-900 Exam Dumps


Oracle 1Z0-900 Exam Syllabus Topics:

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

 

NEW QUESTION 20
Given the code fragment:

Which code can be added to register both of these methods to receive BankEvent notifications only if an instance of BankActivityService is already instantiated in the current context?

  • A. @Observes(notifyObserver=IF_EXISTS) on line 4 and line 7 before method parameter declaration
  • B. @Observes(during=AFTER_COMPLETION) on line 1
  • C. @Observes(notifyObserver=IF_EXISTS) on line 3 and line 6
  • D. @Observes(during=IN_PROGRESS) on line 1

Answer: C

 

NEW QUESTION 21
Given the code fragments:

Which action completes this composite primary key implementation?

  • A. Add @Embeddableannotation at line 1and @EmbeddedId(ContactId.class)at line 2.
  • B. Add @Embeddableannotation at line 1 and replace both @Idannotations with @EmbeddedIdannotations.
  • C. Add @IdClassannotation at line 1.
  • D. Add @IdClass(ContactId.class)annotation at line 2.

Answer: A

 

NEW QUESTION 22
Given the code fragment:

How are transactions managed?

  • A. through a separate transaction per JMS Consumer
  • B. through a single transaction for the entire JMS Topic
  • C. through a single shared transaction across the connection factory
  • D. through a single shared transaction in the JMS Context

Answer: D

 

NEW QUESTION 23
For an Item to be enabled for back-to-back order process, which attribute do you need to set?

  • A. Item attribute: Reservations Enabled
  • B. Item attribute: Allow purchase orders off of sales orders
  • C. Item attribute: Back-To-Back Enabled
  • D. Organization attribute: Allow Reservations
  • E. Organization attribute: Allow Back to Back Processing

Answer: C

 

NEW QUESTION 24
Given the code fragments:

Which action completes this composite primary key implementation?

  • A. Add @Embeddableannotation at line 1and @EmbeddedId(ContactId.class)at line 2.
  • B. Add @IdClassannotation at line 1.
  • C. Add @Embeddableannotation at line 1 and replace both @Idannotations with @EmbeddedId annotations.
  • D. Add @IdClass(ContactId.class)annotation at line 2.

Answer: A

 

NEW QUESTION 25
Identify the availability type that is applicable for the item quantities maintained in a unit of measure different from the primary unit of measure and is available for various transactions.

  • A. Secondary On-hand Quantity
  • B. Reserved
  • C. On Hand
  • D. Secondary Available Quantity
  • E. Available

Answer: D

Explanation:
Explanation/Reference:

 

NEW QUESTION 26
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 27
Which class do you use to handle an incoming JSON Message as a stream?

  • A. JsonReader
  • B. JsonObject
  • C. JsonParser
  • D. JsonObjectBuilder

Answer: A

Explanation:
Explanation
Reference https://docs.oracle.com/javaee/7/tutorial/jsonp002.htm

 

NEW QUESTION 28
Given the code fragment:

How can you get all property names of a JMS message in the JMS consumer onMessage operation?

  • A. Enumeration props = msg.getPropertyNames();. Iterator props = msg.getPropertyNames();
  • B. String [] props = msg.getPropertyNames();
  • C. List<String> props = msg.getProperties();

Answer: B

 

NEW QUESTION 29
Given the code fragment:

How can you apply DateConverterto the birthdayfield?

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

Answer: C

 

NEW QUESTION 30
Given the code fragment:

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

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

Answer: D

 

NEW QUESTION 31
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 32
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 33
Which class do you use to handle an incoming JSON Message as a stream?

  • A. JsonReader
  • B. JsonObject
  • C. JsonParser
  • D. JsonObjectBuilder

Answer: A

 

NEW QUESTION 34
Which statement is true about the WS-Security standard?

  • A. It provides message-level security.
  • B. It relies on HTTP security mechanism to protect SOAP messages in transmit.
  • C. It is a Java EE standard for protecting SOAP services.
  • D. It defines protocol-specific ways of protecting SOAP messages.

Answer: A

Explanation:
Explanation
Reference https://docs.oracle.com/cd/E19226-01/820-7627/gjiou/index.html

 

NEW QUESTION 35
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 36
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: https://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html

 

NEW QUESTION 37
Your company is an automobile spares manufacturing organization, which follows a discrete process. It has its own manufacturing and distribution centers located globally.
It has these business units:
US - USA business unit
CAN - Canadian business unit
UK - UK business unit
MX - Mexican business unit
IND - India business unit
SPA - Spain business unit
FRA - France business unit
NL - Netherlands business unit
GER - Germany business unit
These are the inventory organizations that exist in each business unit:

Which two statements are true?

  • A. Items defined in the GM organization can be assigned to US1, US2, NL1, and MX1 inventory organizations.
  • B. Item organizations are also supported to serve as inventory organizations.
  • C. Items cannot be assigned to inventory organizations across business units.
  • D. You can define an item in the IN1 inventory organization and assign it to the DE1 inventory organization.
  • E. Operational Attributes can be controlled only at the Master Level.
  • F. All inventory organizations do not need to be in the same business unit to assign items.

Answer: A,F

 

NEW QUESTION 38
Given:

What will be the response to a HEADrequest?

  • A. No method will be invoked and no error will be returned.
  • B. The findAll()method will be called and no employees will be returned.
  • C. No method will be invoked and a 404 error will be returned.
  • D. The findAll()method will be called and the employee list will be returned.

Answer: A

 

NEW QUESTION 39
Given:

You are creating an Alarm management system. When you create a new alarm, you want it to create an alert that is triggered once at the specified time.
Which method should you call on Line 9 to create the timer?

  • A. timerService.createCalendarTimer(alarmDate, config);
  • B. timerService.createTimer(alarmDate, -l, config);
  • C. timerService.createIntervalTimer(alarmDate, -l, config);
  • D. timerService.createSingleActionTimer(alarmDate, config);

Answer: B

Explanation:
Explanation
Reference https://docs.oracle.com/javaee/6/api/javax/ejb/TimerService.html

 

NEW QUESTION 40
A third-party service equipment is used for various purposes in a manufacturing facility and needs to be overhauled once a year. This equipment is charged based on its consumption without a project dependency.
At this point, it should be transferred out of the vendor's warehouse for maintenance and then returned back in the future depending upon the requirement.
The material stock transfer should happen with an offline approval and with an account alias as a logical reference.
What is the ideal way to handle this process?

  • A. Subinventory Transfer
  • B. Miscellaneous Transaction
  • C. Move Request
  • D. Transfer Order
  • E. Requisitions

Answer: B

 

NEW QUESTION 41
You have been assigned to the Widget Editor portion of an application. It contains a Widget Editor Facelet page, the Widgetclass, and a simple WidgetEditorbacking bean, which contains a reference to the current Widgetinstance.
Given the code fragment from the Widgetclass:

Given the code fragment from the Facelet page:

The page displays Conversion Error when a user fills out all the form fields and clicks the Save button.
Which step do you perform to fix this problem?

  • A. Insert <f:convertDateTime"/>at Line 1
  • B. Replace Line 1with:
    <
    h:inputText id="createDate"
    value="#{widgetEditor.widget.createdDate}">
    < f:convertDateTime pattern="dd-mm-yyyy"/>
    < /h:inputText>
  • C. Enclose the code fragment within the <f:view/>tag
  • D. Replace Line 1with:
    < h: inputText id="createDate"
    value="#{widgetEditor.widget.createdDate}"
    converter="java.util.Date"/>

Answer: B

 

NEW QUESTION 42
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 43
When should a JPA entity implement the Serializableinterface?

  • A. when JPA entities are used as parameters or return values by the remote EJB operations
  • B. when JPA entities are used outside of the EJB Lite container
  • C. when JPA entities are used in the EJB Full container
  • D. always, because JPA entities are required to implement the Serializableinterface

Answer: A

Explanation:
Explanation/Reference:
Reference: https://stackoverflow.com/questions/2020904/when-and-why-jpa-entities-should-implement- serializable-interface

 

NEW QUESTION 44
Given:

What code needs to be added to line 1 for MyMapper bean instances to be correctly passivated?

  • A. @Stateful @PassivationCapable
  • B. @Stateless
  • C. @Stateful
  • D. @Stateless @PassivationCapable

Answer: C

Explanation:
Explanation/Reference:
Reference: https://docs.oracle.com/javaee/6/tutorial/doc/giplj.html#gipln

 

NEW QUESTION 45
......

Test Engine to Practice 1Z0-900 Test Questions: https://www.testsimulate.com/1Z0-900-study-materials.html