In the Java EE 7 platform, which container is responsible for managing the lifecycle of servlets and JSP pages?
Java Ee Architecture
Question · Easy
A developer needs to package a Java EE 7 application that contains both web components (a WAR) and enterprise beans (an EJB JAR) for deployment to an application server. Which archive type is designed to bundle these modules together?
Which statement correctly describes the role of a deployment descriptor such as web.xml in a Java EE 7 web application?
Question · Medium
Tech Exam Prep Podcast
Listen on Spotify
Podcast
In a typical multi-tier Java EE 7 application, which tier is primarily responsible for implementing business logic and transactional services?
Which Java EE 7 technology provides type-safe dependency injection and contextual lifecycle management that 'knits together' the web tier and the business tier?
Which of the following is NOT one of the standard Java EE component types that the web container directly manages as a Java EE web component?
How does a Java EE 7 component most commonly obtain a reference to a container-managed resource such as a JDBC DataSource declared in the environment?
Which Java EE 7 specification standardizes the validation of bean data using annotations such as @NotNull and @Size, and is used by JPA, JSF, and JAX-RS?
What is the primary purpose of the @PostConstruct annotation (from JSR 250 Common Annotations) on a managed bean method?
Which statement best distinguishes the responsibilities of the web container from the EJB container in Java EE 7?
Which annotation marks a Java class as a JPA entity that can be mapped to a database table?
Jpa Persistence Bean Validation
An EntityManager method must be used to make a new, transient entity instance managed and scheduled for insertion into the database. Which method is correct?
In a @OneToMany relationship, a developer wants child entities to be automatically persisted and removed along with the parent. Which configuration achieves this?
Which JPQL query correctly selects all Employee entities whose salary is greater than a named parameter?
What does the @Id annotation combined with @GeneratedValue(strategy = GenerationType.IDENTITY) indicate for a JPA entity's primary key?
A JPA application reads an entity, modifies one of its fields inside an active transaction, and does nothing else. What happens when the transaction commits?
Question · Hard
Which Bean Validation annotation ensures that a String field is neither null nor that its trimmed length is zero in Bean Validation 1.1 (Java EE 7)?
When should you use an @AttributeConverter (JPA 2.1 / Java EE 7) in your entity model?
Which LockModeType requests pessimistic write locking so that concurrent transactions cannot read or modify the locked rows until the lock is released?
In a default JPA mapping, what is the default fetch strategy for a @OneToMany association?
Which EntityManager call is used to execute a query defined with the @NamedQuery annotation on an entity?
A developer annotates an entity field with @Transient. What effect does this have?
Which file defines a JPA persistence unit, including the data source and provider configuration?
What does an optimistic-locking @Version field provide in a JPA entity?
Which annotation is used to map a Java enum so that its name (rather than its ordinal position) is stored in the database column?
Which annotation declares a stateless session bean in EJB 3.x (Java EE 7)?
Ejb Business Logic
Which session bean type maintains conversational state with a particular client across multiple method invocations?
By default, when a method on a session bean with container-managed transactions is invoked outside an existing transaction, which transaction attribute causes the container to start a new transaction?
Which transaction attribute guarantees that a method always executes in its own new transaction, suspending any transaction that the caller already started?
A developer wants a Singleton session bean to be instantiated by the container when the application starts, rather than on first use. Which annotation accomplishes this?
By default, how does the container manage concurrent access to business methods of a @Singleton session bean?
Which annotation marks a session bean business method to be executed asynchronously, returning control to the caller immediately?
A developer needs an EJB method to run automatically every day at midnight. Which approach uses the EJB Timer Service declaratively?
How can a bean using container-managed transactions programmatically force the current transaction to roll back?
Which statement about a no-interface (local) view of an EJB in Java EE is correct?
What is the recommended way to inject an EJB into another managed component in Java EE 7?
In EJB, what is the effect of throwing an application exception annotated with @ApplicationException(rollback = false) from a business method?
Which JMS 2.0 messaging model delivers each message to exactly one consumer using a queue?
Jms Messaging
Which simplified API was introduced in JMS 2.0 (Java EE 7) to reduce boilerplate when producing and consuming messages?
Which annotation is required on a class to make it a message-driven bean (MDB) that asynchronously consumes JMS messages?
Which method must a message-driven bean implement to receive messages as a javax.jms.MessageListener?
Which JMS message type is designed to carry a stream of uninterpreted bytes, useful for binary payloads?
What is the purpose of a JMS message selector configured on a consumer or message-driven bean?
In a Java EE container, what happens to a JMSContext that is injected with @Inject and @JMSConnectionFactory into a transacted bean method?
Which JMS destination type supports durable subscriptions so a subscriber can receive messages published while it was disconnected?
Which annotation declares a Java class as a JAX-WS SOAP web service endpoint implementation?
Jax Ws Soap Services
In JAX-WS, which contract document describes the operations, messages, bindings, and endpoint address of a SOAP web service?
Loading more…