01. Given the JPQL code fragment: Select pub.title, pub.author, pub.pages FROM Publisher pub Which two clauses do you add to this JPQL query to retrieve only those books with between 500 and 750 total pages?
a) WHERE MIN(pages) >= 500 AND MAX(pages) <= 750
b) WHERE pub.pages <= 500 OR pub.pages >= 750
c) WHERE pub.pages BETWEEN 500 AND 750
d) WHERE pub.pages <= 500 AND pub.pages >=750
02. You have been asked to implement internationalization in your JSF web application. Where do you configure the supported locales?
a) in the <f:view> tag of the Facelet page
b) in the web.xml file
c) in the faces-config.xml file
d) in the src folder
03. Which statement is true about Java methods that are exposed as Web Service operations by using JAX-WS API?
a) The @WebResult annotation must exist
b) Method parameters and return types must be JAXB compatible.
c) Method parameters must be declared by using @WebParam.
d) The @WebMethod annotation must exist.
04. A Java EE application that uses an EJB container must communicate with a legacy system developed using non-Java technologies.
Which two Java EE technologies can be used in the integration tier of the application?
05. How can you configure, in a portable way, the number of threads used by a ManagedExecutorService?
a) using the ManagedExecutors utility class to define the execution properties
b) programmatically, using a ManagedExecutorService
c) This cannot be done because this configuration is dependent on the Java EE Product Provider
d) configuring the thread pool info in the deployment descriptor
06. 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 criteria. The authorization filter must be invoked first.
How can you specify this?
a) specifying the filter precedence order by using the @Priority annotation
b) placing @WebFilterMapping annotations in the required order
c) placing the filter mapping elements in the required order in the web.xml deployment descriptor
d) setting the priority attribute of the @WebFilter annotation for each of the filters
07. Which two elements CANNOT be injected by using an @Inject annotation?
a) static fields
b) instance fields declared final
c) concrete methods
d) abstract methods
08. A Persistence application locks entity x with a LockModeType.PESSIMISTIC_READ lock type. Which statement is true?
a) If the application updates the entity later, and the changes are flushed to the database, the lock will be converted to an exclusive look.
b) This operation will result in a TransactionRolledbackException if the lock cannot be obtained.
c) This operation will force serialization among transactions attempting to read the entity data.
d) LockModeType.PESSIMISTIC_READ is the synonym of LockModeType.READ
09. Which is a valid description of REST?
a) REST provides the same architectural properties as SOAP
b) REST is a library that is part of JEE called JAX-RS.
c) REST is the conventional way of interacting with information resources.
d) REST is a Web Services standard supported by JEE and JAX-RS.
10. Identify two valid WebSocket message types for which you can register handlers.
a) Error Message
b) Binary Message
c) Pong Message
d) Ping Message