Hi Ajanthan
Before we think of the solution mentioned by Anuruddha we thought about the
solution of omitting if its a tenant loading time too. We didn't went with
it since we cannot simply do that since tenant load time could be the first
time deployment to some artifacts. Say there are three artifacts A, B and
C. A and B were previously deployed and C is not. So now tenant is
unloaded. When the tenant is loading its deploying all 3 A, B and C. But we
want the deployment of C since its an actual deployment. That's why we went
with this md5sum solution which seemed covering all the cases.

Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729


On Sat, Jul 5, 2014 at 2:32 AM, Dimuthu Leelarathne <dimut...@wso2.com>
wrote:

> Hi Ajanthan and all,
>
> 1 - Artifact is getting deployed for the first time and tenant is already
> loaded sometime ago
> 2 - Artifact is getting deployed for the first time while tenant is
> getting loaded
> 3 - Artifact is getting redeployed and the tenant is already loaded
> sometime ago
> 4 - Artifact is getting redeployed while the tenant is getting loaded
>
> That code wouldn't work for 2nd and 4th, IMO. Is that the case?
>
> thanks,
> dimuthu
>
>
>
>
>
> On Fri, Jul 4, 2014 at 11:34 PM, Ashansa Perera <asha...@wso2.com> wrote:
>
>> If lastAccessedTime is -1 at the time tenant is loading, I feel that this
>> is a good approach.
>>  On Jul 4, 2014 12:07 PM, "Ajanthan Balachandran" <ajant...@wso2.com>
>> wrote:
>>
>>>
>>>
>>>
>>> On Tue, Jul 1, 2014 at 5:48 PM, Anuruddha Premalal <anurud...@wso2.com>
>>> wrote:
>>>
>>>> Hi All,
>>>>
>>>> Following is the problem-solution description regards to jira
>>>> APPFAC-2252 <https://wso2.org/jira/browse/APPFAC-2252>
>>>>
>>>> *Problem :*
>>>>
>>>> AppServer tenant get unloaded when there is no activity for 30mins.
>>>> When a user deploy an app to this unloaded tenant, it will load and deploy
>>>> all previously deployed apps; current implementation use catalina
>>>> LifecycleListner and it captures these redeployment events and triggers the
>>>> notifications.
>>>>
>>>> *Solution :*
>>>>
>>>> Send the artifact md5sum with the notification to the Appfactory.
>>>> Appfactory will validate the md5 and push the wall message accordingly.
>>>>
>>> How about only publishing the events from a tenant after only if the
>>> tenant is completely loaded(you can detect this status by checking
>>> tenantConfigCtx.getProperty(MultitenantConstants.LAST_ACCESSED)[0] ).We
>>> can filter out the deployment events that are happening due to tenant
>>> loading using this method.
>>>
>>>>
>>>>
>>>> Regards,
>>>> --
>>>> *Anuruddha Premalal*
>>>> Software Eng. | WSO2 Inc.
>>>> Mobile : +94710461070
>>>> Web site : www.regilandvalley.com
>>>>
>>>> "Advances of technology should not leave behind the developing world"
>>>>
>>>> _______________________________________________
>>>> Architecture mailing list
>>>> Architecture@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>>
>>>>
>>> [0]
>>>
>>>          long lastAccessedTime
>>> =TenantAxisUtils.getLastAccessed(tenantDomain,
>>>                 ServiceHolder.getInstance()
>>>
>>> .getConfigContextService().getServerConfigContext());
>>>
>>>
>>>         if(lastAccessedTime!=-1){
>>>             log.info("[sendNotification] Tenant : "+tenantDomain+"
>>> appid : "+appId+" msg : "+msg);
>>>         }else {
>>>             log.info("[sendNotification] ignoring..........tenant is
>>> not loaded " );
>>>         }
>>>
>>> --
>>> ajanthan
>>> --
>>> Ajanthan Balachandiran
>>> Senior Software Engineer;
>>> Solutions Technologies Team ;WSO2, Inc.;  http://wso2.com/
>>>
>>> email: ajanthan <http://goog_595075977>@wso2.com; cell: +94775581497
>>> blog: http://bkayts.blogspot.com/
>>>
>>> Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Architecture mailing list
>>> Architecture@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>>
>>>
>> _______________________________________________
>> Architecture mailing list
>> Architecture@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Dimuthu Leelarathne
> Architect & Product Lead of App Factory
>
> WSO2, Inc. (http://wso2.com)
> email:
> dimut...@wso2.com
> Mobile : 0773661935
>
> Lean . Enterprise . Middleware
>
> _______________________________________________
> Architecture mailing list
> Architecture@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to