September 2010
Intermediate to advanced
766 pages
18h 35m
English
Following is a full listing of all source code used in this runnable example.
package org.jboss.ejb3.examples.ch15.secureschool.api;
/**
* Represents a fire department capable of declaring
* a state of emergency. Anyone may invoke this support,
* and when an alert is raised we'll close the local school.
*
* @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a>
* @version $Revision: $
*/
public interface FireDepartmentLocalBusiness
{
// ---------------------------------------------------------------------------||
// Contracts -----------------------------------------------------------------||
// ---------------------------------------------------------------------------||
/**
* Declares a state of emergency, so we must close the local school
*/
void declareEmergency();
}package org.jboss.ejb3.examples.ch15.secureschool.api; import javax.ejb.ApplicationException; import javax.ejb.EJBAccessException; import org.jboss.ejb3.examples.ch15.secureschool.impl.Roles; /** * Thrown when a user in role other than {@link Roles#ADMIN} * attempts to open the front door to school while it's closed * * @author <a href="mailto:andrew.rubinger@jboss.org">ALR</a> * @version $Revision: $ */ @ApplicationException(rollback = true) // So this isn't wrapped in EJBException public class SchoolClosedException extends EJBAccessException { //--------------------------------------------------------------------------|| ...