Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0E8310E0E for ; Thu, 11 Dec 2014 04:02:26 +0000 (UTC) Received: (qmail 3426 invoked by uid 500); 11 Dec 2014 04:02:26 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 3364 invoked by uid 500); 11 Dec 2014 04:02:26 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 3353 invoked by uid 99); 11 Dec 2014 04:02:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 04:02:24 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of udara@wso2.com designates 209.85.220.50 as permitted sender) Received: from [209.85.220.50] (HELO mail-pa0-f50.google.com) (209.85.220.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2014 04:01:59 +0000 Received: by mail-pa0-f50.google.com with SMTP id bj1so4168025pad.23 for ; Wed, 10 Dec 2014 20:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wso2.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=etxQrsloqODyMRpqQlITmnx72l1+uk5BO3fwaxhQB2w=; b=Xrg1iqTW36g1DJnBcHuiziFayl5nkXdyCHlUbnLqrWW1lM54Bgmppa4ZV6Bu5CK58z 8+yOnf2CZvoPKqfzG2KzWvY9rjWxUAo4KVwSB9KeHTfZKF2AsOMGALCKgAFlkcK0J69X +NLQIQWCwJL49avZh97lRrAMUEfKcbPS9NMLc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=etxQrsloqODyMRpqQlITmnx72l1+uk5BO3fwaxhQB2w=; b=PKa9hytoQ45VITJNgEZFKbSCdpFaEAeYxFJXMfO4gd+yTRpwOOutYq1qdCpk24UH+z Ws/V92+za+MtxTch57pFsk7R56j+KwEuXk9jCEfKvrFG5KdRn65CY5ZQEz2v6t1Y6lGR I+w/fDRbV6YuI8uzWOuhtpNWdpXdq2qb+GUJX2RHBy9vHLEfkrgi7AfOn+EMsCp7HH9k gznDHj6zVuCm/b/ZGKDL9ApGq4EqVxbuhIkMJ/tIaICC0sMwfJkXqKVdWSClduQo4oxl 3BEggN52dHQFmwc/8UzyZon8ZOTywddWSO49khebrPmf+nmF3d26Lbxx3hoeYAYTzJTE i33A== X-Gm-Message-State: ALoCoQl6WcRLq+CqgxxJdB0ZhYuBca1Y19unmlbuIAlio9rjYywm09LEScGGRVr1QON96IGA5yL5 X-Received: by 10.66.122.100 with SMTP id lr4mr13238789pab.56.1418270472269; Wed, 10 Dec 2014 20:01:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.94.103 with HTTP; Wed, 10 Dec 2014 20:00:32 -0800 (PST) In-Reply-To: References: From: Udara Liyanage Date: Thu, 11 Dec 2014 09:30:32 +0530 Message-ID: Subject: Re: Do we have to publish CompleteTenantEvent periodically To: dev Cc: Nirmal Fernando , Reka Thirunavukkarasu , Sajith Kariyawasam , Imesh Gunaratne Content-Type: multipart/alternative; boundary=047d7b2e0de7b20c520509e8d3db X-Virus-Checked: Checked by ClamAV on apache.org --047d7b2e0de7b20c520509e8d3db Content-Type: text/plain; charset=UTF-8 Hi Chamila, AFAIU LB is needed this event in order to do tenant aware load balancing. However my concern is why Carbon addTenant() is triggered here. On Thu, Dec 11, 2014 at 8:04 AM, Chamila De Alwis wrote: > Hi Udara, > > The usual case for processing CompleteTenantEvent is to use it at first to > establish the Topology model and then ignore the consequent ones. The > components will update the model based on the other topology events. So as > far as I understood, you should have a flag to determine if > CompleteTenantEvent was already processed or not. > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > > On Wed, Dec 10, 2014 at 3:43 PM, Udara Liyanage wrote: > >> Hi, >> >> Yes it is the culprit. It periodically trigger the add Tenant. >> >> TenantMgtUtil.triggerAddTenant(tenantBean); >> >> On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage wrote: >> >>> Hi, >>> >>> Just noticed TenantCompletion event is an Stratos event. So this may not >>> be the culprit for the constraint issue. >>> >>> On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage wrote: >>> >>>> Hi, >>>> >>>> TenantSynzhronizerTask periodically publishes CompleteTenantEvent >>>> event. This results in issues when oAuth feature is added since there are >>>> tenant listeners. >>>> For instance TenantManagementListener fails with database constraint >>>> violation. >>>> >>>> -- >>>> >>>> Udara Liyanage >>>> Software Engineer >>>> WSO2, Inc.: http://wso2.com >>>> lean. enterprise. middleware >>>> >>>> web: http://udaraliyanage.wordpress.com >>>> phone: +94 71 443 6897 >>>> >>> >>> >>> >>> -- >>> >>> Udara Liyanage >>> Software Engineer >>> WSO2, Inc.: http://wso2.com >>> lean. enterprise. middleware >>> >>> web: http://udaraliyanage.wordpress.com >>> phone: +94 71 443 6897 >>> >> >> >> >> -- >> >> Udara Liyanage >> Software Engineer >> WSO2, Inc.: http://wso2.com >> lean. enterprise. middleware >> >> web: http://udaraliyanage.wordpress.com >> phone: +94 71 443 6897 >> > > -- Udara Liyanage Software Engineer WSO2, Inc.: http://wso2.com lean. enterprise. middleware web: http://udaraliyanage.wordpress.com phone: +94 71 443 6897 --047d7b2e0de7b20c520509e8d3db Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Chamila,

AFAIU LB is needed this eve= nt in order to do tenant aware load balancing. However my concern is why Ca= rbon addTenant() is triggered here.
<= br>
On Thu, Dec 11, 2014 at 8:04 AM, Chamila De A= lwis <chamilad@wso2.com> wrote:
=C2=A0Hi Udara,

The usual case for processing= CompleteTenantEvent is to use it at first to establish the Topology model = and then ignore the consequent ones. The components will update the model b= ased on the other topology events. So as far as I understood, you should ha= ve a flag to determine if CompleteTenantEvent was already processed or not.= =C2=A0


Regards,
Chamila de Alwis
Software En= gineer | WSO2 | +94772207163
Blog: c= ode.chamiladealwis.com


<= /div>

On Wed, Dec 10, 2014 at 3:43 PM, Udara Liyan= age <udara@wso2.com> wrote:
<= div dir=3D"ltr">Hi,

Yes it is the culprit. It periodical= ly trigger the add Tenant.

TenantMgtUt= il.triggerAddTenant(tenantBean);

<= div class=3D"gmail_quote">On Wed, Dec 10, 2014 at 3:38 PM, Udara Liyanage <= span dir=3D"ltr"><ud= ara@wso2.com> wrote:
Hi,

Just noticed TenantCompletion event is an= Stratos event. So this may not be the culprit for the constraint issue.

On Wed, Dec 10, 2014 at 3:30 PM, Udara Liyanage <udara@wso2.com> wrote:
Hi,

<= /div>
TenantSynzhronizerTask periodically publishes CompleteTenantEvent= event. This results in issues when oAuth feature is added since there are = tenant listeners.=C2=A0
For instance=C2=A0=C2=A0TenantManagementL= istener fails with database constraint violation.

--
Udara Liyanage
Software Engineer
WSO2, Inc.:=C2=A0http://wso2.com
lean. enterprise. middleware

<= /span>
phone:=C2= =A0+94 71 443 6897=



--

Udara Liyanage
Software Engineer
WSO2, Inc.:=C2=A0http://wso2.com
lean. enterprise. middleware

phone:=C2=A0+94 71 443 6897



--
=

Udara Liyanage
Software Engineer=
WSO2, Inc.:=C2=A0http://wso2.com
lean. enterprise. middleware

= phone:=C2=A0+94 71 443 6897




--

Udara Liy= anage
S= oftware Engineer
WSO2,= Inc.:=C2=A0http://wso2.comlean. enterprise. middleware

phone:=C2=A0+94 71 443 6897
--047d7b2e0de7b20c520509e8d3db--