Java EE Enterprise Application - Sample Interview Question (Senior Level)

Consider the following exception class, You would like to mark the above exception class as an Application Exception. You also wish to instruct the Container to rollback the transaction whenever BookingException is raised. Which of the following will provide an ideal solution?

package org.codelect.ejb3.exceptions;

public class BookingException extends java.lang.Exception
{
    public BookingException( )
    {
        super( );
    }

    public BookingException(String msg)
    {
        super(msg);
    }
}
  1. Add the Annotation @ApplicationException
    to the BookingException class.
  2. Add the Annotation @ApplicationException(commit = 'false')
    to the BookingException class.
  3. Add the Annotation @ApplicationException(rollback = 'true')
    to the BookingException class.
  4. Make the BookingException class extend ApplicationException.
  5. None of the above.
Tests in Java EE Enterprise Application for Seniors

Test Name Difficulty Time (minutes) No. of Questions
Java EE Enterprise Application Online Test for Seniors Java EE Enterprise Application Senior 60 30

More Specific Tests in Java EE Enterprise Application for Seniors

Test Name Difficulty Time (Minutes) No. of Questions
Java-EE-Enterprise-Application-EJB Online Test for Seniors Java EE Enterprise Application - EJB Senior 20 10
Java-EE-Enterprise-Application-Java-Persistence-API Online Test for Seniors Java EE Enterprise Application - Java Persistence API Senior 20 10
Java-EE-Enterprise-Application-Java-Transaction-API Online Test for Seniors Java EE Enterprise Application - Java Transaction API Senior 20 10