Initializing some resources My code style is capped 128 characters, not 80 characters. This abstract base class constructor initializes some resources which are injected in the implementations. However, I cannot assume that will be always the case, so I used some try catching to and Apache Commons Lang3 Validate to validate my inputs and throw applicable errors. The base class is normally implemented as a stateless ejb, because of the database rollback features. The BusinessConfigurationException extends Exception and is annotated with @ApplicationException(rollback = true), so that these checked exceptions will be thrown without being wrapped in an EJBException and will do a rollback of all database actions correctly.

/**
 * BaseController constructor with injectable parameters.
 *
 * @param configBundle Configuration parameters for the application.
 * @param errorsBundle Error messages thrown by the application.
 * @param em Needs to be injected from implementation.
 * @param clazz The class that implements the BaseEntity.
 * @throws BusinessConfigurationException When the property value returns an error somehow.
 */
public BaseController(final ResourceBundle configBundle, final ResourceBundle errorsBundle, final EntityManager em,
        final Class&lt;T&gt; clazz) throws BusinessConfigurationException {
    try {
        Validate.notNull(configBundle);
        this.baseURI = configBundle.getString("HOST_NAME") + configBundle.getString("APPLICATION_NAME")
                + configBundle.getString("BASE_PATH");
    } catch (NullPointerException | MissingResourceException | ClassCastException ex) {
        log.error("Cannot initialize baseURI in BaseController constructor.", ex);
        throw new BusinessConfigurationException(ex.getMessage());
    }
    try {
        Validate.notNull(errorsBundle);
        this.errorsBundle = errorsBundle;
    } catch (NullPointerException ex) {
        log.error("Cannot initialize errorsBundle in BaseController constructor.", ex);
        throw new BusinessConfigurationException(ex.getMessage());
    }
    try {
        Validate.notNull(em);
        this.em = em;
    } catch (NullPointerException ex) {
        log.error("Cannot initialize em in BaseController constructor.", ex);
        throw new BusinessConfigurationException(findErrMsg("EM_NOT_AVAILABLE"));
    }
    // No business exceptions thrown for valdidations below. This is a programmer fault.
    Validate.notNull(clazz);
    Validate.isAssignableFrom(clazz, BaseEntity.class);
    this.clazz = clazz;
    this.resourceName = clazz.getSimpleName().toLowerCase();
}
What can be a bit improved:

1) Some Validate.notNull() are not needed, see my comments in the code below.

2) When possible to avoid try/catch avoid it.

3) Recommended to put an error message in Apache Validate calls. See the changed isAssignableFrom().

public BaseController(final ResourceBundle configBundle, final ResourceBundle errorsBundle, final EntityManager em,
        final Class&lt;T&gt; clazz) throws BusinessConfigurationException {
    try {
        // Validate.notNull(configBundle);  &lt;--- Validation for null is not needed because you will get a NPE in any case in the next line.
        this.baseURI = configBundle.getString("HOST_NAME") + configBundle.getString("APPLICATION_NAME")
                + configBundle.getString("BASE_PATH");
    } catch (NullPointerException | MissingResourceException | ClassCastException ex) {
        log.error("Cannot initialize baseURI in BaseController constructor.", ex);
        throw new BusinessConfigurationException(ex.getMessage());
    }

    if (errorsBundle != null) {
        this.errorsBundle = errorsBundle;
    } else {
        log.error("Cannot initialize errorsBundle in BaseController constructor.", ex);
        throw new BusinessConfigurationException(ex.getMessage());
    }

    if (em != null) {
        this.em = em;
    } else {
        log.error("Cannot initialize em in BaseController constructor.", ex);
        throw new BusinessConfigurationException(findErrMsg("EM_NOT_AVAILABLE"));
    }

    // No business exceptions thrown for valdidations below. This is a programmer fault.
    // Validate.notNull(clazz); &lt;---- Not needed because the next validation will detect null clazz.
    Validate.isAssignableFrom(clazz, BaseEntity.class, "To construct BaseController the given clazz is to be of BaseEntity type but was %s", clazz);
    this.clazz = clazz;
    this.resourceName = clazz.getSimpleName().toLowerCase();
}