3 Replies Latest reply on Sep 22, 2011 7:08 AM by Bernd Eckenfels

    Why aren't my @Singletons instantiated?

    tluettgert Newbie

      Hi all,


      I'm currently migrating a JAX-RS application from glassfish 3.1 to JBoss 7.0.1. After a few minor pains, the .war deploys to both application servers, but alas, it only works in glassfish, because I have a few classes annotated with @Singleton which I expect to find in @Stateless instances, like this:


      public class ENDALog {




      public class SessionService {

           @EJB private ENDALog log;




           public Response getSession(@Context HttpHeaders headers) {





      ... and when getSession() is called, log == null.


      I have no idea how to fix this. Any help is greatly appreciated.