// Deploy the JAR
shrinkwrapEjbContainer.deploy(archive);
// Look up the EJB
final Context context = ejbContainer.getContext();
final OutputLocalBusiness bean;
try
{
bean = (OutputLocalBusiness) context.lookup(OutputLocalBusiness.JNDI_NAME);
}
catch (final NamingException e)
{
throw new RuntimeException("Could not find bean proxy at " + OutputLocalBusiness.JNDI_NAME, e);
}
// Invoke
final String value = bean.getOutput();
// Undeploy
shrinkwrapEjbContainer.undeploy(archive);
// Shut down EJBContainer