You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sambit Dikshit (JIRA)" <ji...@apache.org> on 2013/02/28 16:19:14 UTC

[jira] [Created] (CXF-4862) JAXRS ServerLifeCycleManager

Sambit Dikshit created CXF-4862:
-----------------------------------

             Summary: JAXRS ServerLifeCycleManager 
                 Key: CXF-4862
                 URL: https://issues.apache.org/jira/browse/CXF-4862
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.7.2
            Reporter: Sambit Dikshit


I'm trying to use the ServerLifcycleLister to inject some default providers to the JAXRS servers created during startup. This is to avoid configuration based jars:provider configuration so that it will be implicit to users. While trying out ServerLifecycleLister, its giving out of memory errors. Looks like its trying to run in an infinite loop.  

My code looks like this as below. 

public class SOAServerLifeCycleListener implements ServerLifeCycleListener {

	private static Logger log = LoggerFactory
			.getLogger(SOAServerLifeCycleListener.class);

	
	public SOAServerLifeCycleListener(Bus bus) {
		ServerLifeCycleManager slm = bus.getExtension(ServerLifeCycleManager.class);
	    slm.registerListener(this);
	}


	@Override
	public void startServer(Server server) {
		System.out.println("Server lifecycle started");	
	}


	@Override
	public void stopServer(Server server) {
		System.out.println("Server lifecycle started");	
	}



}

--
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