|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.plugin.ejb.OfficeFloorEjb
public class OfficeFloorEjb
Stateless SessionBean along with utility methods for integrating
OfficeFloor into an Application Server.
The deployment descriptor for using this SessionBean is as follows
(replacing the contents of the square brackets - [...]):
<ejb-jar>
...
<enterprise-beans>
...
<session>
<ejb-name>[EJB Name]</ejb-name>
<ejb-class>net.officefloor.plugin.ejb.OfficeFloorEjb</ejb-class>
<env-entry>
<env-entry-name>officeFloorJndiName</env-entry-name>
<env-entry-value>[JNDI resource path to OfficeFloor configuration]</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>officeName</env-entry-name>
<env-entry-value>[Name of Office]</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>workName</env-entry-name>
<env-entry-value>[Name of Work]</env-entry-value>
</env-entry>
</session>
...
</enterprise-beans>
...
</ejb-jar>
The EjbOrchestrator and EjbOrchestratorRemote provide a
generic interface for orchestration. It is also possible to extend this class
to provide a typed interface:
Local interface:
@Local
public interface TypedEjbOrchestrator {
public void typedOrchestration(String parameter) throws NamingException;
}
Bean implementation:
@Stateless
public class TypedOfficeFloorEjb extends OfficeFloorEjb implements
TypedEjbOrchestrator {
public void typedOrchestration(String parameter) throws NamingException {
this.orchestrate(parameter);
}
}
| Field Summary | |
|---|---|
protected String |
officeFloorJndiName
JDNI name for the OfficeFloor. |
protected String |
officeName
Name of the Office within the OfficeFloor. |
protected String |
workName
Name of the Work to be invoked. |
| Constructor Summary | |
|---|---|
OfficeFloorEjb()
|
|
| Method Summary | ||
|---|---|---|
static void |
doOrchestration(String officeFloorJndiName,
String officeName,
String workName,
Object parameter)
Does the orchestration. |
|
void |
ejbCreate()
Validates the dependency injection of configuration available. |
|
void |
orchestrate(Object parameter)
Orchestrates the EJBs. |
|
|
orchestrateRemotely(P parameter)
Remotely orchestrates EJBs. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String officeFloorJndiName
OfficeFloor.
protected String officeName
Office within the OfficeFloor.
protected String workName
Work to be invoked.
| Constructor Detail |
|---|
public OfficeFloorEjb()
| Method Detail |
|---|
public static void doOrchestration(String officeFloorJndiName,
String officeName,
String workName,
Object parameter)
throws NamingException
officeFloorJndiName - OfficeFloor JNDI name.officeName - Name of the Office within the OfficeFloor.workName - Name of Work within the Office.parameter - Parameter for the Work.
NamingException - If fails to instigate the orchestration.
@PostConstruct
public void ejbCreate()
throws javax.ejb.EJBException
javax.ejb.EJBException - If configuration is not dependency injected.
public <P> P orchestrateRemotely(P parameter)
throws NamingException
EjbOrchestratorRemote
orchestrateRemotely in interface EjbOrchestratorRemoteparameter - Parameter for the initial Work of the
OfficeFloor initiating the orchestration of the EJBs.
Remote invocations pass by value (serialised), the
input parameter is returned to allow changes to the parameter to
be obtained by the caller.
NamingException
public void orchestrate(Object parameter)
throws NamingException
EjbOrchestrator
orchestrate in interface EjbOrchestratorparameter - Parameter for the initial Work of the
OfficeFloor initiating the orchestration of the EJBs.
NamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||