| java.lang.Object org.mockejb.test.BaseSessionBean org.mockejb.test.SampleServiceBean
SampleServiceBean | public class SampleServiceBean extends BaseSessionBean (Code) | | Sample EJB with methods to access other beans and JDBC.
|
HELPER_BEAN_JNDI_NAME | final public static String HELPER_BEAN_JNDI_NAME(Code) | | JNDI name used to access HelperBean. We assume that ejb-ref with
this name is configured in the deployment descriptor if this bean
runs in the app server.
|
echoString | public String echoString(String input)(Code) | | Simple method which returns an input parameter back to the caller.
|
getPrincipal | public Principal getPrincipal()(Code) | | Returns the principal provided by the "getCallerPrincipal" method of
the EJBContext for this bean.
current principal |
hasRole | public boolean hasRole(String role)(Code) | | Returns the result of the EJBContext.isCallerInRole check.
Parameters: name - role name true if the current user has the given role |
rollbackSampleTransaction | public void rollbackSampleTransaction() throws NamingException, SQLException, CreateException(Code) | | Example of using SessionContext to rollback
a database transaction
|
selectFromTable | public Collection selectFromTable(String tableName, String columnName) throws NamingException, SQLException(Code) | | Retrieves all values for the column from the provided table
Parameters: columnName - column name to select from Parameters: tableName - table name to select from collection of retrieved values |
sendMessage | public void sendMessage(String message) throws NamingException, JMSException(Code) | | Sends the message with the provided message text to the test topic
Parameters: message - message text to send throws: NamingException - throws: JMSException - |
Fields inherited from org.mockejb.test.BaseSessionBean | protected SessionContext sessionCtx(Code)(Java Doc)
|
|
|