An enterprise developer needs to modify the order of interceptor method execution specified by the Bean Provider, but does NOT have access to the bean's source
code. No deployment descriptor was provided in the ejB. jar delivered by the Bean Provider. Which represents the solution to this problem?
Given the following code snippet from an EJB 3.0 entity class: 1. package com.foo; 2. //more code here... 10. @Entity 11. @Table(name="A") 12. public class Order { And the following excerpt from the persistence unit's orm.xml mapping file: 10. 11. What is the name of the database table for Order objects?
A developer wants to create a Java Persistence query that restricts the results of an age. based query. Specifically, the developer wants to select everyone who is
NOT a teenager. (A teenager is someone who is 13,14,15,16,17,18, or 19 years old.) Which expression in the query's WHERE clause is correct?
A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the
user registration. The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client
invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?
1. public class MyException extends Exception { }
The remote business interface Foo declares a method work():
5. public void work() throws MyException;
The bean class FooBean contains the following:
10. @Stateless
11. @Remote(Foo.class)
12. public class FooBean {
13. public void work() throws MyException {
14. throw new MyException();
15. }
Which exception can be received in the client as a result of invoking the work method?
A developer implemented a Java class called Store. The class is annotated correctly to act as an entity. The developer created a stateless session bean to create,
lookup, and remove Store objects. This session bean has a container-managed entity manager injected into field em and a removeStore method with transaction
attribute REQUIRED.
Given the following code :
32. public void removeStore(Store store) {
33. em.remove(store);
34. }
What is a possible reason that an lllegalArgumentException is thrown at Line 33 when the removeStore method is called by a remote client?
Given:
A session bean Foo uses container-managed transactions The container throws a javax.transaction.TransactionRolledBackException when the doStuff method
runs Which transaction attribute can the doStuff method have for this to occur?