Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0DF2E1870A for ; Tue, 4 Aug 2015 19:35:19 +0000 (UTC) Received: (qmail 16804 invoked by uid 500); 4 Aug 2015 19:35:18 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 16757 invoked by uid 500); 4 Aug 2015 19:35:18 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 5529 invoked by uid 99); 4 Aug 2015 19:33:38 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 19:33:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 7D982C071B for ; Tue, 4 Aug 2015 19:33:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.193 X-Spam-Level: **** X-Spam-Status: No, score=4.193 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 1tLuFW3cO45g for ; Tue, 4 Aug 2015 19:33:27 +0000 (UTC) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 7EB64428DC for ; Tue, 4 Aug 2015 19:33:27 +0000 (UTC) Received: by labow3 with SMTP id ow3so14393204lab.1 for ; Tue, 04 Aug 2015 12:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8sR29UX21ZQnezLQz7Cm+CAGm5ZmzNLlnB8h0tbnrDo=; b=x8zDgQ8I/2QMPM/vSvxEhV1radZKAVTHrV6Ax730DxBJx10mvlE8+GaCbwu81lwjRW ih+ZBkRktJGCGsDgRb7p7QYP1EJvg1drEAXtqFDoZ4q+drN1RH43iht0TJ3H8m3bh5Lc oC0uex1MeI27sm1Ylcv/KCpZXGKLw4YBVm7R2gXhXogrj/2IDRClEJY7nJG7UTJLt8UU 0iZFmRrqQ6PRY9fN0FMWJ4PGQic/MPK9RewM5iJ1tOT5orsYdx+ZCkTMhG7vsOPwBT9/ lKkbrUj364d7zyAl3yqJsSlmjCW/+4Nr8aiYklnPJ/HqRskJ8xQteemkGE2l07dMRx/t x3GA== MIME-Version: 1.0 X-Received: by 10.152.88.78 with SMTP id be14mr4025493lab.29.1438716806462; Tue, 04 Aug 2015 12:33:26 -0700 (PDT) Received: by 10.112.204.98 with HTTP; Tue, 4 Aug 2015 12:33:26 -0700 (PDT) In-Reply-To: <1438688426609-5770275.post@n5.nabble.com> References: <1438688426609-5770275.post@n5.nabble.com> Date: Tue, 4 Aug 2015 21:33:26 +0200 Message-ID: Subject: Re: Some Stupid Questions From: =?UTF-8?Q?Christian_M=C3=BCller?= To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a11c34da02e844a051c815cbd --001a11c34da02e844a051c815cbd Content-Type: text/plain; charset=UTF-8 It will create a new instance for each call to the registry. But if you inject this bean to another bean (which has the singleton scope), than there is only one instance of this bean. A workaround could be to call the registry by yourself to get a fresh copy of this bean. The solution is to make your bean thread safe. What kind of state do you have to maintain? Best, Christian ----------------- Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller/11/551/642 On Tue, Aug 4, 2015 at 1:40 PM, fxthomas wrote: > Thanks for your answers I will try them out whatever possible. > > I tried the Below things too. > > 1) I checked the bean construction the saw that it being created only once > so i change the bean defination to below > > scope="prototype"> > > > But still I see only one Instance being created on the Logs, isn',t scope > prototype supposed to return from registry a new instance so in turn it > should create multiple instance of the bean. Hope my understanding is okay > ? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Some-Stupid-Questions-tp5770217p5770275.html > Sent from the Camel - Users mailing list archive at Nabble.com. > --001a11c34da02e844a051c815cbd--