Package org.jboss.metadata.web.spec

Examples of org.jboss.metadata.web.spec.ListenerMetaData


      addInput("localscis."+WebMetaData.class.getName());
     
      setStage(DeploymentStages.POST_CLASSLOADER);
      setOptionalWeldXml(true);
      // create wbl listener
      WBL = new ListenerMetaData();
      WBL.setListenerClass("org.jboss.weld.servlet.WeldListener");
      JIL = new ListenerMetaData();
      JIL.setListenerClass("org.jboss.weld.integration.webtier.jsp.JspInitializationListener");
      CPF = new FilterMetaData();
      CPF.setFilterName("Weld Conversation Propagation Filter");
      CPF.setFilterClass("org.jboss.weld.servlet.ConversationPropagationFilter");
      CPF.setAsyncSupported(true);
View Full Code Here


      JBossWebMetaData jbwmd = unit.getAttachment(JBossWebMetaData.class);
      assertNotNull(jbwmd);
      List<ListenerMetaData> listeners = jbwmd.getListeners();
      assertNotNull(listeners);
      assertEquals(2, listeners.size());
      ListenerMetaData lmd = listeners.get(0);
      assertNotNull(lmd);
      assertEquals("org.jboss.weld.servlet.WeldListener", lmd.getListenerClass());
   }
View Full Code Here

    private static final String WELD_SERVLET_LISTENER = "org.jboss.weld.environment.servlet.Listener";

    public WebIntegrationProcessor() {

        // create wbl listener
        WBL = new ListenerMetaData();
        WBL.setListenerClass(WELD_LISTENER);
        JIL = new ListenerMetaData();
        JIL.setListenerClass(JSP_LISTENER);
        CPF = new FilterMetaData();
        CPF.setFilterName("Weld Conversation Propagation Filter");
        CPF.setFilterClass(CONVERSATION_FILTER);
        CPF.setAsyncSupported(true);
View Full Code Here

        } else {
            //if the weld servlet listener is present remove it
            //this should allow wars to be portable between AS7 and servlet containers
            final ListIterator<ListenerMetaData> iterator = listeners.listIterator();
            while (iterator.hasNext()) {
                final ListenerMetaData listener = iterator.next();
                if (listener.getListenerClass().trim().equals(WELD_SERVLET_LISTENER)) {
                    WeldLogger.DEPLOYMENT_LOGGER.debugf("Removing weld servlet listener %s from web config, as it is not needed in EE6 environments", WELD_SERVLET_LISTENER);
                    iterator.remove();
                    break;
                }
            }
View Full Code Here

          }
        }
       
        if(!isListener) {
          // register as Servlet Context Listener
          ListenerMetaData listener = new ListenerMetaData();
          listener.setListenerClass(paClassName);
          listeners.add(listener);
       
          // synthesize WebComponent
          WebComponentDescription paWebComponent = new WebComponentDescription(paClassName,
              paClassName,
View Full Code Here

          }
        }
       
        if(!isListener) {
          // register as Servlet Context Listener
          ListenerMetaData listener = new ListenerMetaData();
          listener.setListenerClass(paClassName);
          listeners.add(listener);
       
          // synthesize WebComponent
          WebComponentDescription paWebComponent = new WebComponentDescription(paClassName,
              paClassName,
View Full Code Here

         if (listeners == null)
         {
            listeners = new ArrayList<ListenerMetaData>();
            jbwmd.setListeners(listeners);
         }
         ListenerMetaData listener = new ListenerMetaData();
         listener.setListenerClass(listenerClass);
      }

      for (Iterator it = jbwmd.getServlets().iterator(); it.hasNext();)
      {
         JBossServletMetaData servlet = (JBossServletMetaData)it.next();
View Full Code Here

        // @WebListener
        final List<AnnotationInstance> webListenerAnnotations = index.getAnnotations(webListener);
        if (webListenerAnnotations != null && webListenerAnnotations.size() > 0) {
            List<ListenerMetaData> listeners = new ArrayList<ListenerMetaData>();
            for (final AnnotationInstance annotation : webListenerAnnotations) {
                ListenerMetaData listener = new ListenerMetaData();
                AnnotationTarget target = annotation.target();
                if (!(target instanceof ClassInfo)) {
                    throw new DeploymentUnitProcessingException("@Weblistener is only allowed at class level " + target);
                }
                ClassInfo classInfo = ClassInfo.class.cast(target);
                listener.setListenerClass(classInfo.toString());
                AnnotationValue descriptionValue = annotation.value();
                if (descriptionValue != null) {
                    DescriptionGroupMetaData descriptionGroup = getDescriptionGroup(descriptionValue.asString());
                    if (descriptionGroup != null) {
                        listener.setDescriptionGroup(descriptionGroup);
                    }
                }
                listeners.add(listener);
            }
            metaData.setListeners(listeners);
View Full Code Here

         if (listeners == null)
         {
            listeners = new ArrayList<ListenerMetaData>();
            jbwmd.setListeners(listeners);
         }
         ListenerMetaData listener = new ListenerMetaData();
         listener.setListenerClass(listenerClass);
      }

      for (Iterator it = jbwmd.getServlets().iterator(); it.hasNext();)
      {
         JBossServletMetaData servlet = (JBossServletMetaData)it.next();
View Full Code Here

    private static final ParamValueMetaData CONVERSATION_FILTER_INITIALIZED = new ParamValueMetaData();

    public WebIntegrationProcessor() {

        // create wbl listener
        INITIAL_LISTENER_METADATA = new ListenerMetaData();
        INITIAL_LISTENER_METADATA.setListenerClass(WELD_INITIAL_LISTENER);
        TERMINAL_LISTENER_MEDATADA = new ListenerMetaData();
        TERMINAL_LISTENER_MEDATADA.setListenerClass(WELD_TERMINAL_LISTENER);
        conversationFilterMetadata = new FilterMetaData();
        conversationFilterMetadata.setFilterClass(CONVERSATION_FILTER_CLASS);
        conversationFilterMetadata.setFilterName(CONVERSATION_FILTER_NAME);
        conversationFilterMetadata.setAsyncSupported(true);
View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.spec.ListenerMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.