IPublisherSessionLocalHome publishersessionhome = (IPublisherSessionLocalHome) lookup("java:comp/env/ejb/PublisherSessionLocal", IPublisherSessionLocalHome.class); publishersession = publishersessionhome.create();
IPublisherSessionLocalHome home = (IPublisherSessionLocalHome) getLocator().getLocalHome(IPublisherSessionLocalHome.COMP_NAME); publishersession = home.create();
    private IPublisherSessionLocal getPublisherSession() {        if (publishersession == null) {            try {                IPublisherSessionLocalHome publishersessionhome = (IPublisherSessionLocalHome) lookup("java:comp/env/ejb/PublisherSessionLocal", IPublisherSessionLocalHome.class);                publishersession = publishersessionhome.create();            } catch (Exception e) {                throw new EJBException(e);            }        }        return publishersession;    } //getPublisherSession