@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EJBViewDescription that = (EJBViewDescription) o; // since the views are added to the component description, that should already be equal if (hasJNDIBindings != that.hasJNDIBindings) return false; if (methodIntf != that.methodIntf) return false; if (!getViewClassName().equals(that.getViewClassName())) return false; //we compare the components based on == //as you can have two components with the same name if (getComponentDescription() != that.getComponentDescription()) return false; return super.equals(o); }
@Override public int hashCode() { int result = methodIntf.hashCode(); result = 31 * result + (hasJNDIBindings ? 1 : 0); result = 31 * result + getViewClassName().hashCode(); result = 31 * result + getComponentDescription().getComponentName().hashCode(); return result; }
private void assertNoLocalView(final String viewClassName) { EJBViewDescription ejbView = null; for (final ViewDescription view : getViews()) { ejbView = (EJBViewDescription) view; if (viewClassName.equals(ejbView.getViewClassName()) && ejbView.getMethodIntf() == MethodIntf.LOCAL) { throw EjbLogger.ROOT_LOGGER.failToAddClassToLocalView(viewClassName, getEJBName()); } } }
private void assertNoRemoteView(final String viewClassName) { EJBViewDescription ejbView = null; for (final ViewDescription view : getViews()) { ejbView = (EJBViewDescription) view; if (viewClassName.equals(ejbView.getViewClassName()) && ejbView.getMethodIntf() == MethodIntf.REMOTE) { throw EjbLogger.ROOT_LOGGER.failToAddClassToLocalView(viewClassName, getEJBName()); } } }
ejbObjectClass = ClassLoadingUtils.loadClass(ejbObjectView.getViewClassName(), context.getDeploymentUnit()); } catch (ClassNotFoundException e) { throw EjbLogger.ROOT_LOGGER.failedToLoadViewClassForComponent(e, componentDescription.getComponentName());
@Override protected InjectionSource createInjectionSource(final ServiceName serviceName, Value<ClassLoader> viewClassLoader, boolean appclient) { if(methodIntf != MethodIntf.REMOTE && methodIntf != MethodIntf.HOME) { return super.createInjectionSource(serviceName, viewClassLoader, appclient); } else { final EJBComponentDescription componentDescription = getComponentDescription(); final EEModuleDescription desc = componentDescription.getModuleDescription(); final String earApplicationName = desc.getEarApplicationName(); return new RemoteViewInjectionSource(serviceName, earApplicationName, desc.getModuleName(), desc.getDistinctName(), componentDescription.getComponentName(), getViewClassName() , componentDescription.isStateful(),viewClassLoader, appclient); } }
remoteFactory = new RemoteViewManagedReferenceFactory(earApplicationName, moduleDescription.getModuleName(), moduleDescription.getDistinctName(), componentDescription.getComponentName(), description.getViewClassName(), componentDescription.isStateful(), viewClassLoader, appclient);
final Class<?> remoteClass; try { remoteClass = ClassLoadingUtils.loadClass(remoteView.getViewClassName(), module); } catch (ClassNotFoundException e) { throw EjbLogger.ROOT_LOGGER.failedToLoadViewClassForComponent(e, componentDescription.getEJBClassName()); final Class<?> homeClass; try { homeClass = ClassLoadingUtils.loadClass(homeView.getViewClassName(), module); } catch (ClassNotFoundException e) { throw EjbLogger.ROOT_LOGGER.failedToLoadViewClassForComponent(e, componentDescription.getEJBClassName());
final String viewClassName = ejbViewDescription.getViewClassName();
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; EJBViewDescription that = (EJBViewDescription) o; // since the views are added to the component description, that should already be equal if (hasJNDIBindings != that.hasJNDIBindings) return false; if (methodIntf != that.methodIntf) return false; if (!getViewClassName().equals(that.getViewClassName())) return false; //we compare the components based on == //as you can have two components with the same name if (getComponentDescription() != that.getComponentDescription()) return false; return super.equals(o); }
@Override public int hashCode() { int result = methodIntf.hashCode(); result = 31 * result + (hasJNDIBindings ? 1 : 0); result = 31 * result + getViewClassName().hashCode(); result = 31 * result + getComponentDescription().getComponentName().hashCode(); return result; }
private void assertNoRemoteView(final String viewClassName) { EJBViewDescription ejbView = null; for (final ViewDescription view : getViews()) { ejbView = (EJBViewDescription) view; if (viewClassName.equals(ejbView.getViewClassName()) && ejbView.getMethodIntf() == MethodIntf.REMOTE) { throw MESSAGES.failToAddClassToLocalView(viewClassName,getEJBName()); } } }
private void assertNoLocalView(final String viewClassName) { EJBViewDescription ejbView = null; for (final ViewDescription view : getViews()) { ejbView = (EJBViewDescription) view; if (viewClassName.equals(ejbView.getViewClassName()) && ejbView.getMethodIntf() == MethodIntf.LOCAL) { throw MESSAGES.failToAddClassToLocalView(viewClassName,getEJBName()); } } }
ejbObjectClass = classIndex.classIndex(ejbObjectView.getViewClassName()).getModuleClass(); } catch (ClassNotFoundException e) { throw MESSAGES.failedToLoadViewClassForComponent(e, componentDescription.getComponentName());
final Class<?> pkClass; try { ejbObjectClass = classIndex.classIndex(createdView.getViewClassName()).getModuleClass(); pkClass = classIndex.classIndex(componentDescription.getPrimaryKeyType()).getModuleClass(); } catch (ClassNotFoundException e) {
@Override protected InjectionSource createInjectionSource(final ServiceName serviceName, Value<ClassLoader> viewClassLoader) { if(methodIntf != MethodIntf.REMOTE && methodIntf != MethodIntf.HOME) { return super.createInjectionSource(serviceName, viewClassLoader); } else { final EJBComponentDescription componentDescription = getComponentDescription(); final EEModuleDescription desc = componentDescription.getModuleDescription(); final String earApplicationName = desc.getEarApplicationName(); return new RemoteViewInjectionSource(serviceName, earApplicationName, desc.getModuleName(), desc.getDistinctName(), componentDescription.getComponentName(), getViewClassName() , componentDescription.isStateful(),viewClassLoader); } }
remoteFactory = new RemoteViewManagedReferenceFactory(earApplicationName, moduleDescription.getModuleName(), moduleDescription.getDistinctName(), componentDescription.getComponentName(), description.getViewClassName(), componentDescription.isStateful(),viewClassLoader);
final ClassIndex remoteClass; try { remoteClass = classIndex.classIndex(remoteView.getViewClassName()); } catch (ClassNotFoundException e) { throw MESSAGES.failedToLoadViewClassForComponent(e, componentDescription.getEJBClassName()); final ClassIndex homeClass; try { homeClass = classIndex.classIndex(homeView.getViewClassName()); } catch (ClassNotFoundException e) { throw MESSAGES.failedToLoadViewClassForComponent(e, componentDescription.getEJBClassName());
final String viewClassName = ejbViewDescription.getViewClassName();