JBoss Community

Re: Struggling with injecting singleton in 6.0

created by Robin Hughes in Beginner's Corner - View the full discussion

I have a new clue, but not a solution yet.  It seems that 2 instances of HelloWorld are being created.

 

11:49:32,356 INFO  [STDOUT] constructing HelloWorld

11:49:32,372 INFO  [org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:HelloWorld

 

        myapp-0.0.1/HelloWorld/no-interface -> EJB3.1 no-interface view

 

11:49:32,372 INFO  [STDOUT] constructing HelloWorld

11:49:32,372 INFO  [org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:HelloWorld

 

        myapp-0.0.1/HelloWorld/no-interface -> EJB3.1 no-interface view

 

11:49:32,403 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

11:49:32,403 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009

11:49:32,403 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 34s:63ms

 

Of course I only get this far if I remove the injection of HelloWorld from the servlet.  (I removed "@Startup" but it did not make a difference.)

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community