27 Java EE 7 Application Developer Practice Questions - Free
You can access 27 Practice Questions for Oracle Certified Professional Java EE 7 Application Developer, from MyExamCloud Exam Simulator
Take Free Practice Testfor Oracle Certified Professional, Java EE 7 Application Developer Certification
MyExamCloud Java EE 7 Application Developer Practice Tests helps you to pass the exam in first attempt. Prepare with one of the best Java EE 7 Application Developer Study Course developed by Java Certified Experts. 100% Test Pass Guarantee.
Java EE 7 Application Developer Practice Tests and eBooks are available online at MyExamCloud Exam Simulator. This course contents can be accessed from PC, Mac, iPhone®, iPad®, Android™ Device. Mobile Apps available on iTunes and Android stores.
Inside MyExamCloud's Java EE 7 Application Developer Practice Course
Set Goals on Java EE 7 Application Developer exam topics
(MyExamCloud PPA Tracker)
2 Full length mock exams
(MyExamCloud Practice Exams)
1 Free Trial mock exam
(MyExamCloud Practice Exam)
Study mode to access topic based questions
Exhaustive explanation with every question
Reports to assess performance history, strengths & weaknesses
Track your goals
Focus lab to pinpoint your weak areas
Unlimited lifetime access, Any where & Any time
The Java EE 7 Application Developer Practice Questions and explanations are created by highly qualified and Java Certified experts. The Authors has created this online course covering all Java EE 7 Application Developer exam objectives based on latest Oracle's changes.
The Java EE 7 Application Developer (Oracle Certified Professional, Java EE 7 Application Developer) certification improves object-orientated programming and Java fundamental skills. This Java Certification also tests Java SE 7 new features such as 'Lambda expressions' and 'Date and Time API'. As Java Language Specification has been updated for these new features, the experienced Java developers also need to learn the new style of coding by preparing for this exam.
Passing this exam, one can achieve Oracle Certified Professional, Java EE 7 Application Developer from Oracle. The real exam tests your OO and Java EE 7 skills by Single and Multiple choice questions.
Number of Questions: | 70 Questions |
---|---|
Exam Duration | 150 Minutes |
Passing Score: | 66% |
Exam Format | Multiple Choice (which can have single or multiple answers) |
Validated Against | Java EE 7 |
Exam Price | Price May vary from Country to country. Refer Oracle site for latest pricing. |
The real exam is a computer based test provided by pearsonvue and it can be taken from any local test centers in your country.
Set The New Java Standard With Java EE 7 OCP Certification. Java EE 7 significantly changes the way you write code. Java SE 7 Certification gives you the tools to make the most of new features. The Java EE 7 Oracle Certified Professional (OCP) certification provides a foundational understanding of Java as well as programming in general. So it suits for most Java Professionals starting from beginner to expert.
The following practice question is taken from MyExamCloud Java EE 7 Application Developer Study Plan.
Prev Question Next QuestionQuestion 1.Topic: Understand Java EE ArchitectureCode:
Which of the following code snippet inserted at // code here injects TransientCartSession in CartServlet?
|
Choice A is correct.The existence of two implementations of the CartSession @Local interface breaks the convention and throws an exception during deployment when we use @EJB annotation without beasnName attribute.Enhancement of the @EJB annotation with the beanName attribute fixes the problem.The value of the beanName attribute is the simple name(getSimpleName) of the desired bean.
Exam Objective: Demonstrate understanding of the relationship between bean components, annotations, injections, and JNDI |
Question 2.Topic: Understand Java EE ArchitectureYou are developing a Java EE application where most of the user interface page requires responsive HTML output. The page must populate navigation menu based on logged in role. Which of the following Java EE web components can achieve this goal?
|
Choice A and C are correct answers.The functionality of Java EE web tier is to handle HTTP / HTTPS requests and generate dynamic contents.The Java EE web components are 1. Java Servlet, 2. Java Server Pages(JSP).They will run inside web container. Choice B is incorrect.JavaServer Faces(JSF) is a web application framework and it is not a Java EE component. Choice D is incorrect.Contexts and Dependency Injection(CDI) for the Java EE platform is one of several Java EE 6 features that help to knit together the web tier and the transactional tier of the Java EE platform.CDI is a set of services that, used together, make it easy for developers to use enterprise beans along with JavaServer Faces technology in web applications. Exam Objective: Differentiate between application component functionalities as they apply to different tiers and containers, including Java EE Web Container, Business Logic implementation and WebServices |
Question 3.Topic: Manage Persistence using JPA Entities and BeanValidationWhich of the following statements are not true about entities?
|
Choice B and D are correct answers.Entities support inheritance, polymorphic associations, and polymorphic queries. Exam Objective: Create JPA Entity and Relationship Object-Relational Mappings (ORM) |
Question 4.Topic: Manage Persistence using JPA Entities and BeanValidationA developer working in EPractize Labs wants to fetch all customers whose order amount is greater than 500 USD. Assume that Customer entity is super class of PersonalCustomer and CorporateCustomer.
|
Choice B is correctBy default, all queries are polymorphic. That is, the FROM clause of a query designates not only instances of the specific entity class(es) to which it explicitly refers, but subclasses as well. The instances returned by a query include instances of the subclasses that satisfy the query conditions. The following query returns all customer, including subtypes of Customer, such as PersonalCustomer and CorporateCustomer. select c from Customer c where c.orderTotal > 500 Exam Objective: Create and execute JPQL statements |
Question 5.Topic: Implement Business Logic by Using EJBsWhich statement is true about stateful session beans and stateless session beans?
|
Choice D is correctIn a stateless session bean with bean-managed transactions, a business method must commit or roll back a transaction before returning. However, a stateful session bean does not have this restriction. The container passivates and activates them using methods annotated with Exam Objective: Create session EJB components containing synchronous and asynchronous business methods, manage the life cycle container callbacks and use interceptors |
Question 6.Topic: Implement Business Logic by Using EJBsAn EJB developer writes a CMT stateless session bean with one local business interface. All business methods are declared as REQUIRED. The bean has an injected field sessionCtx of the type SessionContext. Which two operations are allowed in a business method of the bean?
|
Choice B and D are correct answers.Call to getEJBObject is not valid, since the bean is local. IllegalStateException - Thrown if the instance invokes this method while the instance is in a state that does not allow the instance to invoke this method, or if the instance does not have a remote interface. Call to Call to Call to Exam Objective: Demonstrate understanding of how to control EJB transactions, distinguish Container Managed (CMT) and Bean Managed (BMT) transactions |
Question 7.Topic: Implement Business Logic by Using EJBsWhat is true about TimerService interface?
|
Choice B is correctA stateless session bean or singleton session bean can be registered with the EJB Timer Service for time-based event notifications. The container invokes the appropriate bean instance timeout callback method when a timer for the bean has expired. Exam Objective: Create EJB timers |
Question 8.Topic: Use Java Message Service APIWhich statement about message-driven beans is correct?
|
Choice A is correctMessage-driven beans (MDBs) support concurrent processing for both topics and queues. Previously, only concurrent processing for queues was supported. To ensure concurrency, the container uses threads from the execute queue. The maximum number of MDBs configured—via the max-beans-in-free-pool deployment descriptor element—to receive messages at one time cannot exceed the maximum number of execution threads. For example, if max-beans-in-free-pool is set to 50 but 25 is the maximum number of execution threads allowed, only 25 of the MDBs will actually receive messages. Each message-driven bean instance will be invoked only one thread at a time. Exam Objective: Describe the Java Message Service (JMS) messaging models and implement Java SE and Java EE message producers and consumers, including Message-Driven beans |
Question 9.Topic: Use Java Message Service APIWhich of the following statements are true about Java EE 7 JMS message-driven bean with bean-managed transactions?
|
Choice B and D are correct answers.A message-driven bean is an enterprise bean that allows Java EE applications to process messages asynchronously. It acts as a JMS message listener, which is similar to an event listener except that it receives messages instead of events. The messages may be sent by any Java EEcomponent--an application client, another enterprise bean, or a Web component--or by a JMS application or system that does not use Java EE technology. Message acknowledgement is automatically handled by the container. Two messages read from the same queue may be processed at the same time within the same EJB container. Exam Objective: Use transactions with JMS API |
Question 10.Topic: Implement SOAP Services by Using JAX-WS and JAXB APIsWhich of the following session management mechanisms JAX-WS can support?
|
Choice A, B and C are correct answers.JAX-WS specification supports the following session management mechanisms. Session APIs Definition of a session interface and methods to obtain the session interface and initiate sessions for handlers and service endpoint implementations. HTTP based sessions The session management mechanism must support HTTP cookies and URL rewriting. SOAP based sessions The session management mechanism must support SOAP based session information. Exam Objective: Create SOAP Web Services and Clients using JAX-WS API |
Question 11.Topic: Implement SOAP Services by Using JAX-WS and JAXB APIsGiven in the below code snippet
Which of the following JAXB marshal annotation convert Customer object as valid XML?
|
Choice B is correct.The process of converting Java Objects into XML files are marshalling. The JAXB @XmlRootElement annotation denotes as root element and it is defined just before class starts.
@XmlType to indicate special options like to order of appearance in the XML. Exam Objective: Define Java to XML Schema mappings to marshall and unmarshall Java Objects by using JAXB API |
Question 12.Topic: Implement SOAP Services by Using JAX-WS and JAXB APIsAssume that you have defined Customer class with valid JAXB marshal annotations.
Which of the following code initiate JAXB marshaller?
|
Choice B is correct.The class Exam Objective: Define Java to XML Schema mappings to marshall and unmarshall Java Objects by using JAXB API |
Question 13.Topic: Create Java Web Applications using ServletsYou are assigned to define servlet mappings in web.xml for the following classes.
Which of the following web.xml fragments are correct?
|
Choice B is correct.Why Choice D is incorrect because the tag names are wrong. Why Not Exam Objective: Create Java Servlets, describe how they are mapped to urls and use HTTP methods |
Question 14.Topic: Create Java Web Applications using ServletsCode : A Servlet is mapped in the web.xml of the web application "order" as
Which of the following URLs would be served by this Servlet?
|
Choice D is correctWhy Why Not Exam Objective: Create Java Servlets, describe how they are mapped to urls and use HTTP methods |
Question 15.Topic: Create Java Web Applications using JSPsWhich EL implicit object gives access to the parameters stored in ServletContext object?
|
Choice C is correctWhy Why Not Exam Objective: Describe JSP syntax, use tag libraries and Expression Language (EL) |
Question 16.Topic: Create Java Web Applications using JSPsGiven the JSP code:
and the Classic tag handler code:
Assume there are no other "orderNumber" attributes in the web application. Which invocation on the pageContext object, inserted at line 9, assigns "12345" to the variable orderID?
|
Choice D is correctWhy Why Not Exam Objective: Describe JSP syntax, use tag libraries and Expression Language (EL) |
Question 17.Topic: Create Java Web Applications using JSPsWhich of the following syntax is used to embed a Java scriptlet in a JSP page?
|
Choice B is correctWhy Why Not Exam Objective: Describe JSP syntax, use tag libraries and Expression Language (EL) |
Question 18.Topic: Implement REST Services using JAX-RS APIWhich of the following EJB's can use JAX-RS @Path annotation?
|
Choice A and C are correct answers.JAX-RS works with Enterprise JavaBeans technology (enterprise beans) and Contexts and Dependency Injection for the Java EE Platform (CDI). The @Path annotation can be used with stateless session and singleton session beans. Exam Objective: Create REST Services and clients using JAX-RS API |
Question 19.Topic: Implement REST Services using JAX-RS APIGiven:
A developer wants to convert this resource class scope as application. Which CDI managed bean code can achieve this?
|
Choice C is correctJAX-RS and CDI have slightly different component models. By default, JAX-RS root resource classes are managed in the request scope, and no annotations are required for specifying the scope. CDI managed beans annotated with @RequestScoped or @ApplicationScoped can be converted to JAX-RS resource classes. Exam Objective: Create REST Services and clients using JAX-RS API |
Question 20.Topic: Create Java Applications using WebSocketsA developer want to create a server endpoint to wait for text messages. Which of the following code can achieve this goal?
|
Choice C is correct.The endpoint class can be implemented by API classes or by annotations. The Choice A code uses Websocket API classes and Choice B uses WebSocket API annotations. The class level @ServerEndpoint annotation indicates that a Java class is to become a websocket endpoint at runtime. Developers may use the value attribute to specify a URI mapping for the endpoint. Exam Objective: Create WebSocket Server and Client Endpoint Handlers using JSR 356 API and JavaScript |
Question 21.Topic: Create Java Applications using WebSockets
Which annotation inserted at // Code here will enabled handleNewConnection method must be called when there is a new connection?
|
Choice A is correct.The method level @OnOpen and @OnClose annotations allow the developers to decorate methods on their @ServerEndpoint annotated Java class to specify that they must be called by the implementation when the resulting endpoint receives a new connection from a peer or when a connection from a peer is closed, respectively. Exam Objective: Understand and utilise WebSockets communication style and lifecycle |
Question 22.Topic: Develop Web Applications using JSFsGiven code :
Which navigation rule correctly defines examBoatSearch? Assume that ExamBoat search page is search.jsp.
|
Choice B is correctThe form-action element along with from-outcome is needed for dynamic navigation where the output of the action method specified in the from-action element is compared to the from-outcome value. Here it is static navigation where we just need to call next page. For this static navigation, this is the navigation from-outcome value i.e. examBoatSearch that will map to search.xhtml in the navigation rule. Exam Objective: Describe JSF architecture, lifecycle and navigation |
Question 23.Topic: Develop Web Applications using JSFsWhich JavaServer Faces life cycle will be started when a link or a button component is clicked?
|
Choice D is correct.When a request for a JavaServer Faces page is made, usually by an action such as when a link or a button component is clicked, the JavaServer Faces implementation begins the Restore View phase. During this phase, the JavaServer Faces implementation builds the view of the page, wires event handlers and validators to components in the view, and saves the view in the FacesContext instance, which contains all the information needed to process a single request. All the application's components, event handlers, converters, and validators have access to the FacesContext instance. If the request for the page is an initial request, the JavaServer Faces implementation creates an empty view during this phase and the lifecycle advances to the Render Response phase, during which the empty view is populated with the components referenced by the tags in the page. If the request for the page is a postback, a view corresponding to this page already exists in the FacesContext instance. During this phase, the JavaServer Faces implementation restores the view by using the state information saved on the client or the server. Exam Objective: Identify the life cycle stages of JSF, flow of request processing, and purpose of FacesContext. Exam Objective: Describe JSF architecture, lifecycle and navigation |
Question 24.Topic: Secure Java EE 7 ApplicationsWhich of the following code defines login-config for Form-based authentication?
|
Choice A is correct.Why A custom HTML form is used to capture the username and password, which leads to this customization.
The login form must contain fields for entering a username and a password. These fields must be named j_username and j_password, respectively. Why Not Exam Objective: Describe Java EE declarative and programmatic security and configure authentication using application roles and security constraints and Login Modules |
Question 25.Topic: Use CDI BeansGiven the below CDI beans
How many qualifiers are defined Customer and product beans?
|
Choice C is correct.Every bean has the built-in qualifier @Any, even if it does not explicitly declare this qualifier, except for the special @New qualified beans defined in @New qualified beans. If a bean does not explicitly declare a qualifier other than @Named or @Any, the bean has exactly one additional qualifier, of type @Default. This is called the default qualifier. Both Customer and Product declarations result in a bean with two qualifiers: @Any and @Default. Exam Objective: Create CDI Bean Qualifiers, Producers, Disposers, Interceptors, Events and Stereotypes |
Question 26.Topic: Use Concurrency API in Java EE 7 Applications
Which of the following inserted at //code here correctly submit ReportTask to MyAppTasksExecutor?
|
Choice C is correct.The submit method submit the task to the ManagedExecutorService. To handle to the task, the Future is cached so that the client can query the results of the report. The Future will contain the results once the task has completed. Exam Objective: Demonstrate understanding of Java Concurrency Utilities and use Managed Executors |
Question 27.Topic: Use Batch API in Java EE 7 ApplicationsThe PayrollJob batch job involves reading input data for payroll processing from a XL sheet. Each line in the file contains an employee ID and the base salary (per month) for one employee. The batch job then calculates the tax to be withheld, the bonus, and the net salary. The job finally needs to write out the processed payroll records into a database table.
Which JSL correctly defines chunk-style step for these batch jobs?
|
Choice A is correct.It is a chunk-style step and has (as required for a chunk-style step), an ItemReader, an ItemProcessor, and an ItemWriter. The implementations for ItemReader, ItemProcessor, and ItemWriter for this step are specified using the ref attribute in the <reader>, <processor>, and <writer> elements. Exam Objective: Describe batch jobs using JSL XML documents and JSR 352 API |
You can access 27 Practice Questions for Oracle Certified Professional Java EE 7 Application Developer, from MyExamCloud Exam Simulator
Take Free Practice TestWithin 30 minutes of completing your Java EE 7 Application Developer exam, you will receive an email from Oracle notifying you that your exam results are available in CertView. If you have previously authenticated your CertView account, simply login and select the option to "See My New Exam Result Now."
If you have not authenticated your CertView account yet at this point, you will need to proceed with your account authentication.
Authentication requires an Oracle Single Sign On username and password and the following information from your Pearson VUE profile: email address and Oracle Testing ID. You will be taken to CertView to log in once your account has been authenticated.
The reason for taking Oracle Java Certification is to differentiate general programmers from certified experts. You may get additional benefits like getting a good job, salary hike, designation changes, role changes and higher promotion.
Stand out from the millions of Java crowd. Increase your marketability with Java EE 7 Application Developer Certification on the most used programming language in the world - Java.
Related Articles:https://www.epractizelabs.com/myexamcloud/2018/06/20/java-ee-7-application-developer-certification/
Congrats, you have successfully scheduled your Java Certification exam.
Understand Java EE Architecture
Implement Business Logic by Using EJBs
Implement SOAP Services by Using JAX-WS and JAXB APIs
Create Java Web Applications using JSPs
Create Java Applications using WebSockets
Secure Java EE 7 Applications
Use Concurrency API in Java EE 7 Applications
Manage Persistence using JPA Entities and BeanValidation
Use Java Message Service API
Create Java Web Applications using Servlets
Implement REST Services using JAX-RS API
Develop Web Applications using JSFs
Use CDI Beans
Use Batch API in Java EE 7 Applications
|
I found the Training Lab Exams to be fantastic! The questions were more intense than the actual exams. It has become a common practice for the training staff at our company to recommend your products. Thanks!