Zemian Deng [https://community.jboss.org/people/saltnlight5] created the 
discussion

"Destroy-method not getting called when JBossAS is shutdown"

To view the discussion, visit: https://community.jboss.org/message/750867#750867

--------------------------------------------------------------
Hi there,

I have successfully deployed the snowdrop into JBossAS 7.1.1.FINAL, and I can 
deploy a simple spring application with jboss-spring.xml as this:

    <bean id="helloService" class="deng.HelloService" init-method="start" 
destroy-method="stop">
    </bean>


My HelloService is a simple one like this:

package deng;
import org.slf4j.*;
import java.util.concurrent.atomic.*;
public class HelloService {
          private static Logger logger = 
LoggerFactory.getLogger(HelloService.class);
          private AtomicBoolean started = new AtomicBoolean(false);
          public boolean isStarted() { return started.get(); }
          public void start() { started.set(true); logger.info("started."); }
          public void stop() { started.set(false); logger.info("stopped."); }
}


When I package this into my.jar, the server deployed it fine. However when I 
shutdwon the server with CTRL+C (or with CLI), the stop() is never called. Is 
this a bug?

Thanks,
Zemian Deng
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/750867#750867]

Start a new discussion in Snowdrop at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to