/** * MF FIXME these are implemented on the client */ public EJBLocalHome getEJBLocalHome(Invocation mi) { return localProxyFactory.getEJBLocalHome(); }
public EJBLocalHome getEJBLocalHome(Invocation mi) { return localProxyFactory.getEJBLocalHome(); }
public EJBLocalHome getEJBLocalHome() { if (con.getLocalHomeClass() == null) throw new IllegalStateException("No local home defined."); if (con instanceof EntityContainer) return ((EntityContainer) con).getLocalProxyFactory().getEJBLocalHome(); else if (con instanceof StatelessSessionContainer) return ((StatelessSessionContainer) con).getLocalProxyFactory().getEJBLocalHome(); else if (con instanceof StatefulSessionContainer) return ((StatefulSessionContainer) con).getLocalProxyFactory().getEJBLocalHome(); // Should never get here throw new EJBException("No EJBLocalHome available (BUG!)"); }
/** * This method is called only for CMR fields with foreign key fields mapped to CMP fields * to check the validity of the foreign key value. * * @param fk the foreign key to check * @return true if there is related entity with the equal primary key */ public boolean isForeignKeyValid(Object fk) { boolean valid; if(relatedManager.getReadAheadCache().getPreloadDataMap(fk, false) != null) { valid = true; } else { EJBLocalHome relatedHome = getRelatedContainer().getLocalProxyFactory().getEJBLocalHome(); try { relatedFindByPrimaryKey.invoke(relatedHome, new Object[]{fk}); valid = true; } catch(Exception ignore) { // no such entity. it is ok to ignore valid = false; } } return valid; }
EJBLocalHome relatedHome = relatedContainer.getLocalProxyFactory().getEJBLocalHome(); try
/** * The EJBDeployer calls this method. The EJBDeployer has set * all the plugins and interceptors that this bean requires and now proceeds * to initialize the chain. The method looks for the standard classes in * the URL, sets up the naming environment of the bean. The concrete * container classes should override this method to introduce * implementation specific initialization behaviour. * * @throws Exception if loading the bean class failed * (ClassNotFoundException) or setting up "java:" * naming environment failed (DeploymentException) */ protected void createService() throws Exception { // Acquire classes from CL beanClass = classLoader.loadClass(metaData.getEjbClass()); if (metaData.getLocalHome() != null) localHomeInterface = classLoader.loadClass(metaData.getLocalHome()); if (metaData.getLocal() != null) localInterface = classLoader.loadClass(metaData.getLocal()); localProxyFactory.setContainer(this); localProxyFactory.create(); if (localHomeInterface != null) ejbModule.addLocalHome(this, localProxyFactory.getEJBLocalHome()); ejbModule.createMissingPermissions(this, metaData); // Allow the policy to incorporate the policy configs Policy.getPolicy().refresh(); }