/** * Returns true if the passed EJB component description has at least one remote view * @param ejbComponentDescription * @return */ private boolean hasRemoteView(final EJBComponentDescription ejbComponentDescription) { final Set<ViewDescription> views = ejbComponentDescription.getViews(); for (final ViewDescription view : views) { if (!(view instanceof EJBViewDescription)) { continue; } final MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf(); if (viewType == MethodIntf.REMOTE || viewType == MethodIntf.HOME) { return true; } } return false; } });
public void addLocalHome(final String localHome) { final EjbHomeViewDescription view = new EjbHomeViewDescription(this, localHome, MethodIntf.LOCAL_HOME); view.getConfigurators().add(new Ejb2ViewTypeConfigurator(Ejb2xViewType.LOCAL_HOME)); getViews().add(view); // setup server side view interceptors setupViewInterceptors(view); // setup client side view interceptors setupClientViewInterceptors(view); // return created view this.ejbLocalHomeView = view; }
public void addRemoteHome(final String remoteHome) { final EjbHomeViewDescription view = new EjbHomeViewDescription(this, remoteHome, MethodIntf.HOME); view.getConfigurators().add(new Ejb2ViewTypeConfigurator(Ejb2xViewType.HOME)); getViews().add(view); // setup server side view interceptors setupViewInterceptors(view); // setup client side view interceptors setupClientViewInterceptors(view); // return created view this.ejbHomeView = view; }
protected EJBViewDescription registerView(final String viewClassName, final MethodIntf viewType, final boolean ejb2xView) { // setup the ViewDescription final EJBViewDescription viewDescription = new EJBViewDescription(this, viewClassName, viewType, ejb2xView); getViews().add(viewDescription); // setup server side view interceptors setupViewInterceptors(viewDescription); // setup client side view interceptors setupClientViewInterceptors(viewDescription); // return created view if (viewType == MethodIntf.REMOTE || viewType == MethodIntf.HOME) { setupRemoteView(viewDescription); } return viewDescription; }
final Map<String, InjectedValue<ComponentView>> remoteViews = new HashMap<String, InjectedValue<ComponentView>>(); final Map<String, InjectedValue<ComponentView>> localViews = new HashMap<String, InjectedValue<ComponentView>>(); for (final ViewDescription view : ejbComponentDescription.getViews()) { boolean remoteView = false; if (view instanceof EJBViewDescription) {
final Collection<ViewDescription> views = sessionBean.getViews(); if (views == null || views.isEmpty()) { EjbLogger.DEPLOYMENT_LOGGER.noJNDIBindingsForSessionBean(sessionBean.getEJBName());
/** * Returns true if the passed EJB component description has at least one remote view * @param ejbComponentDescription * @return */ private boolean hasRemoteView(final EJBComponentDescription ejbComponentDescription) { final Set<ViewDescription> views = ejbComponentDescription.getViews(); for (final ViewDescription view : views) { if (!(view instanceof EJBViewDescription)) { continue; } final MethodIntf viewType = ((EJBViewDescription) view).getMethodIntf(); if (viewType == MethodIntf.REMOTE || viewType == MethodIntf.HOME) { return true; } } return false; } });
public void addLocalHome(final String localHome) { final EjbHomeViewDescription view = new EjbHomeViewDescription(this, localHome, MethodIntf.LOCAL_HOME); view.getConfigurators().add(new Ejb2ViewTypeConfigurator(Ejb2xViewType.LOCAL_HOME)); getViews().add(view); // setup server side view interceptors setupViewInterceptors(view); // setup client side view interceptors setupClientViewInterceptors(view); // return created view this.ejbLocalHomeView = view; }
public void addRemoteHome(final String remoteHome) { final EjbHomeViewDescription view = new EjbHomeViewDescription(this, remoteHome, MethodIntf.HOME); view.getConfigurators().add(new Ejb2ViewTypeConfigurator(Ejb2xViewType.HOME)); getViews().add(view); // setup server side view interceptors setupViewInterceptors(view); // setup client side view interceptors setupClientViewInterceptors(view); // return created view this.ejbHomeView = view; }
protected EJBViewDescription registerView(final String viewClassName, final MethodIntf viewType, final boolean ejb2xView) { // setup the ViewDescription final EJBViewDescription viewDescription = new EJBViewDescription(this, viewClassName, viewType, ejb2xView); getViews().add(viewDescription); // setup server side view interceptors setupViewInterceptors(viewDescription); // setup client side view interceptors setupClientViewInterceptors(viewDescription); // return created view if (viewType == MethodIntf.REMOTE || viewType == MethodIntf.HOME) { setupRemoteView(viewDescription); } return viewDescription; }
final Map<String, InjectedValue<ComponentView>> remoteViews = new HashMap<String, InjectedValue<ComponentView>>(); final Map<String, InjectedValue<ComponentView>> localViews = new HashMap<String, InjectedValue<ComponentView>>(); for (final ViewDescription view : ejbComponentDescription.getViews()) { boolean remoteView = false; if (view instanceof EJBViewDescription) {
@Override protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription componentConfiguration) throws DeploymentUnitProcessingException { final Module module = deploymentUnit.getAttachment(org.jboss.as.server.deployment.Attachments.MODULE); processTransactionAttributeAnnotation(applicationClasses, deploymentReflectionIndex, componentClass, null, componentConfiguration); processTransactionTimeoutAnnotation(applicationClasses, deploymentReflectionIndex, componentClass, null, componentConfiguration); for (ViewDescription view : componentConfiguration.getViews()) { try { final Class<?> viewClass = module.getClassLoader().loadClass(view.getViewClassName()); EJBViewDescription ejbView = (EJBViewDescription) view; processTransactionAttributeAnnotation(applicationClasses, deploymentReflectionIndex, viewClass, ejbView.getMethodIntf(), componentConfiguration); processTransactionTimeoutAnnotation(applicationClasses, deploymentReflectionIndex, viewClass, ejbView.getMethodIntf(), componentConfiguration); } catch (ClassNotFoundException e) { throw MESSAGES.failToLoadEjbViewClass(e); } } }
final Collection<ViewDescription> views = sessionBean.getViews(); if (views == null || views.isEmpty()) { EjbLogger.EJB3_LOGGER.noJNDIBindingsForSessionBean(sessionBean.getEJBName());