glassfish
  1. glassfish
  2. GLASSFISH-20497

[fishcat] Warning appear about JMS but I'm not using any JMS in my sample

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0_b88_RC4
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Description

      I created a basic jax-rs hello sample and added @inject into resource.

      I got this warning in GF 4 logs (WELD-001473)

      INFO: EJB5181:Portable JNDI names for EJB EJBManagedBean: [java:global/WebApplication1/EJBManagedBean!com.demo.EJBManagedBean, java:global/WebApplication1/EJBManagedBean]
      WARNING: WELD-001473 javax.enterprise.inject.spi.Bean implementation org.glassfish.jms.injection.JMSCDIExtension$LocalBean@1c35405 declared a normal scope but does not implement javax.enterprise.inject.spi.PassivationCapable. It won't be possible to inject this bean into a bean with passivating scope (@SessionScoped, @ConversationScoped). This can be fixed by assigning the Bean implementation a unique id by implementing the PassivationCapable interface.
      INFO: Registering the Jersey servlet application, named org.netbeans.rest.application.config.ApplicationConfig, at the servlet mapping /resources/*, with the Application class of the same name.
      INFO: Initialisation de Mojarra 2.2.0 (-SNAPSHOT 20130426-2159 https://svn.java.net/svn/mojarra~svn/tags/2.2.0-m15@11912) pour le contexte «/WebApplication1»
      INFO: Loading application [WebApplication1] at [/WebApplication1]
      INFO: WebApplication1 was successfully deployed in 1 250 milliseconds.
      INFO: Initiating Jersey application, version Jersey: 2.0-rc2 2013-04-23 12:04:25...

      I'll provide sample in zip file if requested.

      here the source files :

      package com.demo;

      import javax.annotation.PostConstruct;
      import javax.inject.Inject;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.Produces;

      /**
      *

      • @author sdionne1
        */
        @Path("hello")
        public class HelloResource {

      @Inject
      CDIManagedBean bean;

      @Inject
      EJBManagedBean ejb;

      @PostConstruct
      public void init()

      { System.out.println(HelloResource.class + " post construct"); }

      @GET
      @Produces("text/plain")
      public String getHello()

      { return "hello : " + bean.getOutput() + " : " + ejb.getOutput(); }

      }

      package org.netbeans.rest.application.config;

      import java.util.Set;
      import javax.ws.rs.ApplicationPath;
      import javax.ws.rs.core.Application;

      /**
      *

      • @author sdionne1
        */
        @ApplicationPath("resources")
        public class ApplicationConfig extends Application {

      @Override
      public Set<Class<?>> getClasses() {
      Set<Class<?>> resources = new java.util.HashSet<Class<?>>();
      // following code can be used to customize Jersey 1.x JSON provider:
      try

      { Class jacksonProvider = Class.forName("org.codehaus.jackson.jaxrs.JacksonJsonProvider"); resources.add(jacksonProvider); }

      catch (ClassNotFoundException ex)

      { java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE, null, ex); }

      addRestResourceClasses(resources);
      return resources;
      }

      /**

      • Do not modify addRestResourceClasses() method.
      • It is automatically re-generated by NetBeans REST support to populate
      • given list with all resources defined in the project.
        */
        private void addRestResourceClasses(Set<Class<?>> resources) { resources.add(com.demo.HelloResource.class); }

      }

      package com.demo;

      import javax.annotation.PostConstruct;

      /**
      *

      • @author sdionne1
        */
        public class CDIManagedBean {

      @PostConstruct
      public void init()

      { System.out.println(CDIManagedBean.class + " post construct"); }

      public String getOutput()

      { return "Output from " + CDIManagedBean.class + " at : " + System.nanoTime(); }

      }

      package com.demo;

      import javax.annotation.PostConstruct;
      import javax.ejb.Stateless;

      /**
      *

      • @author sdionne1
        */
        @Stateless
        public class EJBManagedBean {

      @PostConstruct
      public void init()

      { System.out.println(EJBManagedBean.class + " post construct"); }

      public String getOutput()

      { return "Output from " + EJBManagedBean.class + " at : " + System.nanoTime(); }

      }

        Activity

        Hide
        jjsnyder83 added a comment -

        JMS team is aware of it and are using https://java.net/jira/browse/GLASSFISH-20309 to track it.

        Show
        jjsnyder83 added a comment - JMS team is aware of it and are using https://java.net/jira/browse/GLASSFISH-20309 to track it.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            survivant
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: