Example usage for javax.ejb EJBMetaData isStatelessSession

List of usage examples for javax.ejb EJBMetaData isStatelessSession

Introduction

In this page you can find the example usage for javax.ejb EJBMetaData isStatelessSession.

Prototype

boolean isStatelessSession();

Source Link

Document

Test if the enterprise bean's type is "stateless session".

Usage

From source file:org.openamf.invoker.EJBServiceInvoker.java

private boolean checkPersistService(Object home) throws Exception {
    boolean persistService = false;
    if (home instanceof EJBHome) {
        EJBMetaData metaData = ((EJBHome) home).getEJBMetaData();
        if (metaData.isSession()) {
            if (metaData.isStatelessSession()) {
                log.debug("Stateless Session Bean");
                persistService = false;//from   ww  w .  ja  v  a 2  s.  com
            } else {
                log.debug("Stateful Session Bean");
                persistService = true;
            }
        } else {
            log.debug("Not Session Bean, assume Entity EJB");
            persistService = true;
        }
    }

    return persistService;
}