1Z0-900 Exam Questions
136 real 1Z0-900 exam questions with expert-verified answers and explanations. Page 1 of 3.
- Question #1Create Java Applications using WebSockets
You need to develop a chat application, which allows the display of emoticons and images together with text messages. How should you configure a WebSocket endpoints to receive both...
WebSocket endpoints@onMessage decoderbinary/text messagesmessage type handling - Question #2Use Concurrency API in Java EE 7 Applications
Which two capabilities are provided by the Java Authentication and Authorization Services (JAAS) API? (Choose two.)
Concurrency APITask ManagementManagedTaskListenerExecutor Services - Question #4Implement REST Services using JAX-RS API
Given the code fragment: Which URL triggers the invocation of the getEmployee () method?
JAX-RS path patternspath parametersURL routingREST endpoint mapping - Question #5Use Java Message Service API
What is true about Message-Driven Beans (MDBs)?
Message-Driven BeansJMS messagingEJB transactionsasynchronous processing - Question #6Develop Web Applications using JSFs
You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?
JSF InternationalizationFacelet ConfigurationLocale Managementf:view tag - Question #7Use CDI Beans
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 instanti...
CDI Observer MethodsEvent HandlingBean Lifecycle AwarenotifyObserver Parameter - Question #8Create Java Web Applications using JSPs
Which code snippet prints the exception error message as part of the page output?
JSP exception handlingJSP implicit objectsJSP syntaxerror pages - Question #9Secure Java EE 7 Applications
Java EE's support for WS-Security includes handling which two types of security credentials? (Choose two.)
WS-SecurityX.509 certificatesSAML tokenscredential handling - Question #10Develop Web Applications using JSFs
Given the code fragment from a Facelet page: On Line 1, you ae asked to insert a search box that displays the text "Search Here" via a placeholder. Assume searchMB is a valid Manag...
JSF FormsHTML5 AttributesManaged BeansJSF 2.2+ Features - Question #11Implement SOAP Services by Using JAX-WS and JAXB APIs
Given the code fragment: Which method should be used on line 3 to enable default validation mechanism?
JAXBXmlAdapterXML BindingMarshalling - Question #12Create Java Web Applications using Servlets
How do you specify a default error page in your web.xml file?
web.xmlerror handlingservlet configurationdeployment descriptor - Question #13Use CDI Beans
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.)
CDIDependency Injection@Inject annotationInjection points - Question #14Use Concurrency API in Java EE 7 Applications
Given: How often does the submitted task run?
task schedulingconcurrencytask executionconfiguration context - Question #15Implement Business Logic by Using EJBs
: 15 Given: What code needs to be added to line 1 for MyMapper bean instances to be correctly passivated?
EJB passivationStateful beansBean lifecycleState management - Question #16Implement REST Services using JAX-RS API
Which URL represents an invalid approach to pass a parameter to a REST resource?
REST URL syntaxquery parameterspath parametersmatrix parameters - Question #17Implement Business Logic by Using EJBs
Given: If an exception is thrown inside the if block, what effect will it have on the transaction?
TransactionsException HandlingRollbackEJB - Question #19Develop Web Applications using JSFs
When handling a JSF request, your application code decided to redirect the call to another URL by using HTTP redirect. Which action should you take to correctly complete the handli...
JSF LifecycleFacesContext MethodsHTTP RedirectPhase Control - Question #20Create Java Web Applications using Servlets
Given the code fragment: mapping?
servlet mappingURL patternsweb configurationcontainer startup - Question #21Manage Persistence using JPA Entities and BeanValidation
Given the code fragments: Which action completes this composite primary key implementation?
Composite Primary KeyJPA Annotations@EmbeddedIdEntity Design - Question #22Manage Persistence using JPA Entities and BeanValidation
Given the code fragment: How can you apply DateConverter to the birthday field?
JPA Converters@Convert annotationEntity field mappingDate conversion - Question #23Implement REST Services using JAX-RS API
Which class do you use to handle an incoming JSON Message as a stream?
JSON-P APIJsonReaderStream processingJSON handling - Question #24Create Java Web Applications using JSPs
Which two approaches would result in the current date being added to the output of a JSP? (Choose two.)
JSP expression tagsJSP scriptlet tagsimplicit out objectoutput generation - Question #25Use Java Message Service API
Given the code fragment: How are transactions managed?
JMS ContextTransaction ManagementJMS TransactionsMessage Service - Question #26Create Java Applications using WebSockets
You need to exchange large binary messages using chunks in a WebSocket application. Identify two ways in which you can receive partial messages. (Choose two.)
WebSocket partial messagesMessageHandler.Partial@OnMessagechunking - Question #27Create Java Applications using WebSockets
: 27 Given: Which client-side Java method will send the employee object to the WebSocket Server Endpoint?
WebSocket client APISession objectMessage serializationsendObject() - Question #28Use Java Message Service API
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 subscrib...
JMSPub-Sub MessagingDurable SubscriptionsMessage Persistence - Question #29Create Java Web Applications using Servlets
Which type allows you to share servlet attributes across your entire web application?
ServletContextApplication ScopeServlet AttributesWeb Application Sharing - Question #30Secure Java EE 7 Applications
Which annotation allows a request to be executed with another Principal's identity?
annotationssecurityprincipal-identityauthorization - Question #31Secure Java EE 7 Applications
Which statement is true about the WS-Security standard?
WS-SecurityMessage-level securitySOAP servicesWeb services security - Question #32Create Java Web Applications using JSPs
Which two statements are true about the relationship between JavaServer Pages (JSP) and servlets? (Choose two.)
JSPServletsCompilationImplicit Objects - Question #33Implement Business Logic by Using EJBs
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 yo...
EJB Timer ServiceSingle-action timerTimer creationScheduled execution - Question #34Use CDI Beans
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 a...
CDI injectionbean resolutiontype-based selectiondependency injection - Question #35Develop Web Applications using JSFs
On your JSF page, you have a form in which you have a command button: A user submits the form by clicking the button, and no errors occur while processing the request. Which statem...
JSFaction processingmethod execution orderform submission - Question #36Use Java Message Service API
Given the code fragment: How can you get all property names of a JMS message in the JMS consumer onMessage operation?
JMSMessage propertiesMessage APIEnumeration - Question #37Use Batch API in Java EE 7 Applications
Given a JSL document describing a batch job: How do you initiate a batch job?
Batch Job InitiationBatchRuntime APIJobExecutionBatch Processing - Question #38Create Java Web Applications using Servlets
Given the code fragment: How long does this cookie persist?
HTTP CookiesCookie PersistenceSession ManagementServlet Context - Question #39Manage Persistence using JPA Entities and BeanValidation
When should a JPA entity implement the Serializable interface?
JPA EntitiesSerializationRemote EJBRMI - Question #40Implement REST Services using JAX-RS API
Which statement is true about JAX-RS resource implementation?
JAX-RSREST resourcesresource implementationApplication class - Question #41Implement Business Logic by Using EJBs
How can you inject a target web service into an EJB?
EJB injectionresource-refweb service injectionJAX-WS - Question #42Use Concurrency API in Java EE 7 Applications
How can you configure, in a portable way, the number of threads used by a ManagedExecutorService?
ManagedExecutorServicethread pool configurationConcurrency APIportable configuration - Question #43Secure Java EE 7 Applications
Given an HttpServletRequest request and an EJB SessionContext ctx. Which is a valid way to retrieve the Principal invoking either behavior?
Principal retrievalEJB SessionContextServlet securityCaller identity - Question #44Develop Web Applications using JSFs
Given the set of navigation rules: Which two define a valid flow of view IDs through the application? (Choose two.)
JSF Navigation RulesView Navigation FlowNavigation ConfigurationPage Sequencing - Question #45Create Java Web Applications using Servlets
How can a servlet indicate to the browser that cookie data should be sent over a secure connection?
cookiessecure flagHTTPS/SSLservlet API - Question #46Create Java Web Applications using JSPs
Which two features are provided by the JSTL Core library for a JSP? (Choose two.)
JSTL CoreIterationConditionalsJSP Tags - Question #47Manage Persistence using JPA Entities and BeanValidation
Which of these can be a JPA entity?
entity constraintsclass typesabstract classesenums - Question #48Create Java Web Applications using Servlets
You created two filters for your web application by using the @WebFilter annotation, one for authorization and the other for narrowing results by the provided search criteri
@WebFilter annotationFilter priorityServlet filtersFilter execution order - Question #50Create Java Applications using WebSockets
Identify two valid WebSocket message types for which you can register handlers. (Choose two.)
WebSocket handlersMessage typesHandler registrationJava WebSocket API - Question #51Create Java Web Applications using Servlets
Given the following code: What should you do at line 1 to enable this servlet receive request data without blocking?
async-servletsAsyncContextAsyncListenernon-blocking-io - Question #52Use CDI Beans
Which two elements CANNOT be injected by using an @Inject annotation? (Choose two.)
CDI@Inject annotationdependency injection constraintsbean lifecycle - Question #53Create Java Web Applications using JSPs
Which code snippet indicates that the page you are designing is capable of handling errors?
JSP directiveserror handlingpage configurationexception pages