@javax.ejb.Singleton
public class SingletonBean {
}
(using org.glassfish:javax.ejb:3.1.1 as the dependency to get the annotation)
and I still get the following exception in the test case:
Exception in thread "main" org.jboss.weld.exceptions.UnserializableDependencyException: WELD-001413 The bean Managed Bean [class SessionBean] with qualifiers [@Any @Default] declares passivating scope but has non-passivation-capable dependency Managed Bean [class SingletonBean] with qualifiers [@Any @Default]
at org.jboss.weld.bootstrap.Validator.validateInjectionPointPassivationCapable(Validator.java:474)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:419)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:326)
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:520)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:70)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Also, this is a Java SE project and I would not want to add a dependency on the full Java EE because of a single annotation.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
First of all, this does not work either.
I changed the class to
@javax.ejb.Singleton public class SingletonBean { }
(using org.glassfish:javax.ejb:3.1.1 as the dependency to get the annotation)
and I still get the following exception in the test case:
Also, this is a Java SE project and I would not want to add a dependency on the full Java EE because of a single annotation.