org.controlhaus.ejb
Interface EJBControl

All Known Subinterfaces:
EntityEJBControl, SessionEJBControl

public interface EJBControl

Enterprise Java Bean Control base interface


Nested Class Summary
static interface EJBControl.EJBHome
          EJBHome specifies the target EJB's home interface for the EJB control - jndiName specifies the JNDI name of the target EJB's home interface (e.g.
static interface EJBControl.JNDIContextEnv
          JNDIContextEnv specifies the environment properties for the JNDI context that will be used to lookup the target EJB.
 
Method Summary
 Object getEJBBeanInstance()
          Returns the current target instance of the bean business interface used for business interface method invocations.
 Throwable getEJBException()
          Returns the last EJB exception serviced by the EJB control on the developers behalf.
 Object getEJBHomeInstance()
          Returns an instance of the home interface associated with the target bean component.
 boolean hasEJBBeanInstance()
          Returns true if the EJB control currently has a target bean instance upon which bean business interface methods may be invoked.
 

Method Detail

getEJBHomeInstance

Object getEJBHomeInstance()
Returns an instance of the home interface associated with the target bean component.


hasEJBBeanInstance

boolean hasEJBBeanInstance()
Returns true if the EJB control currently has a target bean instance upon which bean business interface methods may be invoked. This will be true after a successful create() or single select finder method execution, or in cases where implicit creation or find has occurred by the control on the control users behalf. This provides a simple way to procedurally check the status of explicit or implicit bean instance creation or find operations.


getEJBBeanInstance

Object getEJBBeanInstance()
Returns the current target instance of the bean business interface used for business interface method invocations. This API is provided for advanced use cases were direct access to the local/ remote interfaces outside of the control is required. It will return null if no target instance is currently selected.


getEJBException

Throwable getEJBException()
Returns the last EJB exception serviced by the EJB control on the developers behalf. This can be used to discover or log additional information, for example when a create or find method is unable to locate a target bean instance.