/** creates the invokers */ protected void createInvokers() throws Exception { // Init container invoker for (Iterator it = proxyFactories.keySet().iterator(); it.hasNext();) { String invokerBinding = (String) it.next(); EJBProxyFactory ci = (EJBProxyFactory) proxyFactories.get(invokerBinding); ci.create(); } }
protected void destroyInvokers() { // Destroy container invoker for (Iterator it = proxyFactories.keySet().iterator(); it.hasNext();) { String invokerBinding = (String) it.next(); EJBProxyFactory ci = (EJBProxyFactory) proxyFactories.get(invokerBinding); ci.destroy(); } }
public EJBHome getEJBHome() { EJBProxyFactory proxyFactory = con.getProxyFactory(); if (proxyFactory == null) throw new IllegalStateException("No remote home defined."); return (EJBHome) proxyFactory.getEJBHome(); }
ci.setContainer(container); ci.setInvokerMetaData(imd); ci.setInvokerBinding(jndiBinding); if (ci instanceof XmlLoadable)
public EJBObject getEJBObject() { // Context can have no EJBObject (created by finds) in which case // we need to wire it at call time if(ejbObject == null && con.getProxyFactory() != null) { ejbObject = (EJBObject)con.getProxyFactory().getEntityEJBObject(id); } return ejbObject; }
public EJBObject getEJBObject() { AllowedOperationsAssociation.assertAllowedIn("getEJBObject", IN_EJB_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_BUSINESS_METHOD | IN_AFTER_BEGIN | IN_BEFORE_COMPLETION | IN_AFTER_COMPLETION); if (((StatefulSessionContainer)con).getRemoteClass()==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.getStatefulSessionEJBObject(id); } return ejbObject; }
public EJBMetaData getEJBMetaDataHome(Invocation mi) throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } return ci.getEJBMetaData(); }
public boolean isIdentical(Invocation mi) throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } return ci.isIdentical(this, mi); }
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; }
if (ci != null) ci.setContainer(null); ci.setInvokerBinding(null); ci.setInvokerMetaData(null);
/** * A method for the getEJBObject from the handle */ public EJBObject getEJBObject(Invocation mi) throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } // All we need is an EJBObject for this Id; return (EJBObject)ci.getEntityEJBObject(((EntityCache) instanceCache).createCacheKey(mi.getId())); }
return (EJBObject) ci.getStatefulSessionEJBObject(id);
public EJBMetaData getEJBMetaDataHome() throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } return ci.getEJBMetaData(); }
/** * @return Always false */ public boolean isIdentical(Invocation mi) throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } return ci.isIdentical(this, mi); }
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; }
public EJBObject getEJBObject() { AllowedOperationsAssociation.assertAllowedIn("getEJBObject", IN_EJB_POST_CREATE | IN_EJB_REMOVE | IN_EJB_ACTIVATE | IN_EJB_PASSIVATE | IN_EJB_LOAD | IN_EJB_STORE | IN_BUSINESS_METHOD | IN_EJB_TIMEOUT); if(((EntityContainer)con).getRemoteClass() == null) { throw new IllegalStateException( "No remote interface defined." ); } if (ejbObject == null) { // Create a new CacheKey Object cacheKey = ((EntityCache)((EntityContainer)con).getInstanceCache()).createCacheKey(id); EJBProxyFactory proxyFactory = con.getProxyFactory(); if(proxyFactory == null) { String defaultInvokerName = con.getBeanMetaData(). getContainerConfiguration().getDefaultInvokerName(); proxyFactory = con.lookupProxyFactory(defaultInvokerName); } ejbObject = (EJBObject)proxyFactory.getEntityEJBObject(cacheKey); } return ejbObject; }
public EJBHome getEJBHome(Invocation mi) throws RemoteException { EJBProxyFactory ci = getProxyFactory(); if (ci == null) { String msg = "No ProxyFactory, check for ProxyFactoryFinderInterceptor"; throw new IllegalStateException(msg); } return (EJBHome) ci.getEJBHome(); }
ctx.setEJBObject((EJBObject) getProxyFactory().getStatefulSessionEJBObject(id));