Question 17 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question 17 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question

Given:

public class AppException extends Exception {}

‘@Stateless
public class CustomerService {
‘@TransactionA ttribute(TransactionA ttributeType.REQUIRED)
public boolean addCustomer(int id, String name throws AppException {
//assume database insert operation succeeds
Customer c = insertIntoDB(id, name);
if(id < 20) {
throw new AppException();
}
}

If an exception is thrown inside the if block, what effect will it have on the transaction?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C.

C.