glassfish
  1. glassfish
  2. GLASSFISH-20441

JMSContext cannot be injected in a @SessionScoped bean

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b87_RC3
    • Fix Version/s: 4.0_b88_RC4, 4.1
    • Component/s: jms
    • Labels:
      None

      Description

      @Named
      @SessionScoped
      public class SendPointsBean implements Serializable {
      
         @Inject
          JMSContext context;
      
         ...
      }
      

      throws

      Error occurred during deployment: Exception while loading the app : CDI
      deployment failure:WELD-001413 The bean Managed Bean [class
      org.glassfish.movieplex7.points.ReceivePointsBean] with qualifiers
      [@Default @Any @Named] declares passivating scope but has non-
      serializable dependency
      org.glassfish.jms.injection.JMSCDIExtension$LocalBean@f6c4da4. Please
      see server.log for more details.
      

      I can inject ConnectionFactory and use it to create a local JMSContext but using the code fragment above shows the following deployment failure.

        Activity

        Hide
        David Zhao added a comment -

        Arun,

        Could you share a small application for reproduction?

        I tried injecting JMSContext into a SessionScoped managed bean and then inject the managed bean into jsf. Both deployment and run are OK with only warning printed in server.log.

        [2013-05-02T10:43:04.912+0800] [glassfish 4.0] [WARNING] [] [org.jboss.weld.Bootstrap] [tid: _ThreadID=37 _ThreadName=ad
        min-listener(3)] [timeMillis: 1367462584912] [levelValue: 900] [[
        WELD-001473 javax.enterprise.inject.spi.Bean implementation org.glassfish.jms.injection.JMSCDIExtension$LocalBean@984cb6 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.]]

        Show
        David Zhao added a comment - Arun, Could you share a small application for reproduction? I tried injecting JMSContext into a SessionScoped managed bean and then inject the managed bean into jsf. Both deployment and run are OK with only warning printed in server.log. [2013-05-02T10:43:04.912+0800] [glassfish 4.0] [WARNING] [] [org.jboss.weld.Bootstrap] [tid: _ThreadID=37 _ThreadName=ad min-listener(3)] [timeMillis: 1367462584912] [levelValue: 900] [[ WELD-001473 javax.enterprise.inject.spi.Bean implementation org.glassfish.jms.injection.JMSCDIExtension$LocalBean@984cb6 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.]]
        Hide
        arungupta added a comment -

        Tried with b87 and got the same error. Attaching the sample app as well.

        Complete stack trace below:

        In-place deployment at /Users/arungup/code/workspaces/javaee7-samples~source/samples/jms/jmscontext-cdi/target/jmscontext-cdi-1.0-SNAPSHOT
        Initializing...
        deploy?DEFAULT=/Users/arungup/code/workspaces/javaee7-samples~source/samples/jms/jmscontext-cdi/target/jmscontext-cdi-1.0-SNAPSHOT&name=jmscontext-cdi&contextroot=/jmscontext-cdi&force=true failed on GlassFish Server 4.0 (87)
        Error occurred during deployment: Exception while loading the app : CDI deployment failure:Exception List with 2 exceptions:
        Exception 0 :
        org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class org.glassfish.sample.jmscontext.cdi.MessageReceiver] with qualifiers [@Any @Default] declares passivating scope but has non-serializable dependency org.glassfish.jms.injection.JMSCDIExtension$LocalBean@6eac366b
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:473)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:418)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:325)
        at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:177)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:208)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:519)
        at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:505)
        at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:480)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:536)
        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:216)
        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:356)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
        at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
        at java.lang.Thread.run(Thread.java:722)
        Exception 0 :
        org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class org.glassfish.sample.jmscontext.cdi.MessageSender] with qualifiers [@Any @Default] declares passivating scope but has non-serializable dependency org.glassfish.jms.injection.JMSCDIExtension$LocalBean@6eac366b
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:473)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:418)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:325)
        at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:177)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:208)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:519)
        at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:505)
        at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:480)
        at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:536)
        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:216)
        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
        at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:356)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
        at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
        at java.lang.Thread.run(Thread.java:722)
        . Please see server.log for more details.
        The module has not been deployed.
        See the server log for details.
        at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
        at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
        at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
        at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
        at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

        Show
        arungupta added a comment - Tried with b87 and got the same error. Attaching the sample app as well. Complete stack trace below: In-place deployment at /Users/arungup/code/workspaces/javaee7-samples~source/samples/jms/jmscontext-cdi/target/jmscontext-cdi-1.0-SNAPSHOT Initializing... deploy?DEFAULT=/Users/arungup/code/workspaces/javaee7-samples~source/samples/jms/jmscontext-cdi/target/jmscontext-cdi-1.0-SNAPSHOT&name=jmscontext-cdi&contextroot=/jmscontext-cdi&force=true failed on GlassFish Server 4.0 (87) Error occurred during deployment: Exception while loading the app : CDI deployment failure:Exception List with 2 exceptions: Exception 0 : org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class org.glassfish.sample.jmscontext.cdi.MessageReceiver] with qualifiers [@Any @Default] declares passivating scope but has non-serializable dependency org.glassfish.jms.injection.JMSCDIExtension$LocalBean@6eac366b at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:473) at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:418) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:325) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:177) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:208) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:519) at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:505) at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:480) at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:536) at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:216) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:722) Exception 0 : org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class org.glassfish.sample.jmscontext.cdi.MessageSender] with qualifiers [@Any @Default] declares passivating scope but has non-serializable dependency org.glassfish.jms.injection.JMSCDIExtension$LocalBean@6eac366b at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:473) at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:418) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:325) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:177) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:208) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:519) at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:505) at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:480) at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:536) at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:216) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:722) . Please see server.log for more details. The module has not been deployed. See the server log for details. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210) at org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178) at org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130) at org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
        Hide
        arungupta added a comment -
        Show
        arungupta added a comment - Sample is now available at: https://blogs.oracle.com/arungupta/resource/jmscontext-cdi.zip
        Hide
        David Zhao added a comment -

        What is the impact on the customer of the bug?
        This is related to https://java.net/jira/browse/GLASSFISH-20441.
        It is for the sample showing JMSContext injection (new JMS 2.0 feature) in @SessionScoped managed bean.

        What is the cost/risk of fixing the bug?
        It's small change, low risk

        Is there an impact on documentation or message strings?
        No.

        Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
        JMSContext injection related test cases

        Which is the targeted build of 4.0 for this fix?
        4.0_b88

        If this an integration of a new version of a component from another project,
        what are the changes that are being brought in? This might be list of
        Jira issues from that project or a list of revision messages.
        N/A

        Show
        David Zhao added a comment - What is the impact on the customer of the bug? This is related to https://java.net/jira/browse/GLASSFISH-20441 . It is for the sample showing JMSContext injection (new JMS 2.0 feature) in @SessionScoped managed bean. What is the cost/risk of fixing the bug? It's small change, low risk Is there an impact on documentation or message strings? No. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? JMSContext injection related test cases Which is the targeted build of 4.0 for this fix? 4.0_b88 If this an integration of a new version of a component from another project, what are the changes that are being brought in? This might be list of Jira issues from that project or a list of revision messages. N/A
        Hide
        David Zhao added a comment - - edited

        Fixed in 4.0 by revision 61813.
        Ported to trunk by revision 61816.

        Show
        David Zhao added a comment - - edited Fixed in 4.0 by revision 61813. Ported to trunk by revision 61816.
        Hide
        Bruno Borges added a comment -

        Tried this on GlassFish 4.0 b88 promoted on 08-May-2013 18:59 and it is not fixed.

        Show
        Bruno Borges added a comment - Tried this on GlassFish 4.0 b88 promoted on 08-May-2013 18:59 and it is not fixed.
        Hide
        David Zhao added a comment -

        Bruno,

        What do you mean for it is not fixed? What have you observed? JMSContext injection failure or just the warning logged?

        Show
        David Zhao added a comment - Bruno, What do you mean for it is not fixed? What have you observed? JMSContext injection failure or just the warning logged?
        Hide
        arungupta added a comment -

        I tried my simple use case that sends a message as:

        @SessionScoped
        @JMSDestinationDefinitions({@JMSDestinationDefinition(name = "java:global/jms/myQueue",
                interfaceName = "javax.jms.Queue")
        })
        public class MessageSender implements Serializable {
        
            @Inject
            JMSContext context;
           
            @Resource(mappedName="java:global/jms/myQueue")
            Queue myQueue;
        
            public void sendMessage(String message) {
                context.createProducer().send(myQueue, message);
            }
        }
        

        and receives a message as:

        @SessionScoped
        public class MessageReceiver implements Serializable {
        
            @Inject
            private JMSContext context;
           
            @Resource(mappedName="java:global/jms/myQueue")
            Queue myQueue;
        
            public String receiveMessage() {
                String message = context.createConsumer(myQueue).receiveBody(String.class, 1000);
                return message;
            }
        }
        
        

        And that worked.

        I filed the bug because this scenario was not working and now works with 88.

        What exactly is not working ?

        Show
        arungupta added a comment - I tried my simple use case that sends a message as: @SessionScoped @JMSDestinationDefinitions({@JMSDestinationDefinition(name = "java:global/jms/myQueue", interfaceName = "javax.jms.Queue") }) public class MessageSender implements Serializable { @Inject JMSContext context; @Resource(mappedName="java:global/jms/myQueue") Queue myQueue; public void sendMessage(String message) { context.createProducer().send(myQueue, message); } } and receives a message as: @SessionScoped public class MessageReceiver implements Serializable { @Inject private JMSContext context; @Resource(mappedName="java:global/jms/myQueue") Queue myQueue; public String receiveMessage() { String message = context.createConsumer(myQueue).receiveBody(String.class, 1000); return message; } } And that worked. I filed the bug because this scenario was not working and now works with 88. What exactly is not working ?

          People

          • Assignee:
            David Zhao
            Reporter:
            arungupta
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: