Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 21971 invoked from network); 14 Jun 2008 07:58:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2008 07:58:37 -0000 Received: (qmail 27995 invoked by uid 500); 14 Jun 2008 07:58:38 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 27964 invoked by uid 500); 14 Jun 2008 07:58:38 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 27953 invoked by uid 99); 14 Jun 2008 07:58:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 00:58:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [62.75.158.78] (HELO mail.liquid-reality.de) (62.75.158.78) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Jun 2008 07:57:45 +0000 Received: from [10.0.0.10] (HSI-KBW-085-216-027-031.hsi.kabelbw.de [85.216.27.31]) by mail.liquid-reality.de (Postfix) with ESMTP id B326A68F5964; Sat, 14 Jun 2008 07:58:01 +0000 (UTC) Message-ID: <48537A15.7030607@die-schneider.net> Date: Sat, 14 Jun 2008 09:58:13 +0200 From: Christian Schneider User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: users@cxf.apache.org, Daniel Kulp Subject: Re: Putting several services on the same queue References: <484F6DD3.3000805@die-schneider.net> <20B05B3F-10E9-464C-860B-AA9C6240AC0F@apache.org> In-Reply-To: <20B05B3F-10E9-464C-860B-AA9C6240AC0F@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Daniel, I have got an idea how I could implement several services on one queue without too much problems. The idea is to publish the services with a local endpoint only. Then I configure one additional endpoint on jms and write a custom invoker. The invoker figures out what local endpoint the request should go to and invokes it. Then it forwards the reply back to jms. It could find the correct endpoint either by analysing the namespace of the xml or by using ws addressing. The only thing is I do not know exactly how to implement this. Is it better to do this in cxf directly or should I rather use camel for this? The jms and invoker part sounds to me like it could be done in camel quite nicely but I am not sure. Especially I do not know how to do synchronous things in camel. Best regards Christian Daniel Kulp schrieb: > > On Jun 11, 2008, at 2:16 AM, Christian Schneider wrote: > >> Hi, >> >> I am building webservice adapters for a legacy system. The system can >> be accessed with a java api but is not multi threaded. So my problem is >> that I want to offer several services in one process and still make >> sure only one service is called at a time. To make this scalable I >> will then run this processes several >> times on the same and different machines. >> >> So my question is: >> Can I offer several services with cxf on the same jms queue in one >> process > > I think so, yes. With configuration, you can use message selectors > to put multiple endpoints on the same queue and have the messages > dispatched correctly. > > >> and make sure the whole process works only on one request at a time >> and routes the reuqest to the right service? >> > > This one I'm not sure about. Good question. CXF is definitely > designed for high scalability and mutlti-threaded cases. > > Hmmmm.... One option, I guess, would be to write a custom invoker > that syncronizes things and use a single instance of that invoker for > all the endpoints. Might be harder for dynamic deployments though. > > Another option might be to write a pair of interceptors, one for the > IN chain and one for the out/out fault chains that just aquire/release > a lock of some sort. > > Dan > > > >> I also would like to make management of this system as easy as >> possible. Ideally I would like this process to be a kind of >> application server where I can install and deinstall services while >> it is running. >> Still they should listen on one queue and work single threaded. I >> imagined doing this with an osgi server. The problem is that probably >> then each bundle will have it�s own cxf and they are not single >> threaded anymore. >> >> Any ideas for this? >> >> Best regards >> >> Christian > > --- > Daniel Kulp > dkulp@apache.org > http://www.dankulp.com/blog > > > > >