public EJBObject createHome() throws RemoteException, CreateException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } createCount++; Object obj = ci.getStatelessSessionEJBObject(); return (EJBObject) obj; }
public EJBObject getEJBObject() { AllowedOperationsAssociation.assertAllowedIn("getEJBObject", IN_EJB_CREATE | IN_EJB_REMOVE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT | IN_SERVICE_ENDPOINT_METHOD); if (((StatelessSessionContainer)con).getProxyFactory()==null) throw new IllegalStateException( "No remote interface defined." ); if (ejbObject == null) { EJBProxyFactory proxyFactory = con.getProxyFactory(); if(proxyFactory == null) { String defaultInvokerName = con.getBeanMetaData(). getContainerConfiguration().getDefaultInvokerName(); proxyFactory = con.lookupProxyFactory(defaultInvokerName); } ejbObject = (EJBObject) proxyFactory.getStatelessSessionEJBObject(); } return ejbObject; }