Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A100CED4C for ; Thu, 28 Feb 2013 18:15:15 +0000 (UTC) Received: (qmail 29303 invoked by uid 500); 28 Feb 2013 18:15:15 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 29281 invoked by uid 500); 28 Feb 2013 18:15:15 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 29259 invoked by uid 99); 28 Feb 2013 18:15:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Feb 2013 18:15:15 +0000 Date: Thu, 28 Feb 2013 18:15:15 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-4862) JAXRS ServerLifeCycleManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-4862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13589744#comment-13589744 ] Sergey Beryozkin commented on CXF-4862: --------------------------------------- Perhaps you can simply register a list of providers on a bus, as "org.apache.cxf.jaxrs.bus.providers" bus property ? For ExceptionMapper, MBR & MBW you can also do: "bus.setProperty(ExceptionMapper.class.getName(), new BusMapperExceptionMapper());" etc > 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 > Assignee: Daniel Kulp > Labels: lifecyclemanagement > > 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