Hi Samitha,

As we discussed, it is better to move AppfactoryRepositoryClient interface
from Repository component to core component and it should be an interface
instead of abstract class. Then Repository component can register its
implementation to the AppfactoryRepositoryClient when the Repository
component activate.


*Harsha Thirimanna*
Senior Software Engineer; WSO2, Inc.; http://wso2.com
* <http://www.apache.org/>*
*email: **hars...@wso2.com* <az...@wso2.com>* cell: +94 71 5186770  , +94 *
*774617784twitter: **http://twitter.com/ <http://twitter.com/afkham_azeez>*
*harshathirimannlinked-in: **http:
<http://lk.linkedin.com/in/afkhamazeez>**//www.linkedin.com/pub/harsha-thirimanna/10/ab8/122
<http://www.linkedin.com/pub/harsha-thirimanna/10/ab8/122>*

*Lean . Enterprise . Middleware*


On Wed, Oct 29, 2014 at 10:48 PM, Samith Dassanayake <sam...@wso2.com>
wrote:

> Hi Mahesh,
> As you have suggested before, can't we remove undeploy functionalities
> from appfactory.core and move them to appfactory.deployers such that 
> deployment
> and undeployment related operations will handle from the same bundle. Then
> we can remove the AppfactoryRepositoryClient from the appfactory.core.
>
> Thanks,
> Samith
>
> On Wed, Oct 29, 2014 at 10:35 PM, Mahesh Chinthaka <mahe...@wso2.com>
> wrote:
>
>> Hi Dimuthu,
>>
>> I worked on above suggested method and got succeeded.
>> So *org.wso2.carbon.appfactory.repository.mgt.client.*
>> *AppfacotryRepositoryClient* is used inside appfactory.deployers as well.
>> We got rid of one AppfactoryRepositoryClient out of two. :)
>>
>> *AppfactoryRepositoryClient* in *appfactory.core* is left. Waiting for a
>> thought on this.
>>
>> thanks
>>
>> On Wed, Oct 22, 2014 at 11:35 AM, Mahesh Chinthaka <mahe...@wso2.com>
>> wrote:
>>
>>> Hi Dimuthu,
>>>
>>> I will try that way out and let you know.
>>> Thanks.
>>>
>>> On Wed, Oct 22, 2014 at 11:08 AM, Dimuthu Leelarathne <dimut...@wso2.com
>>> > wrote:
>>>
>>>> Hi Mahesh,
>>>>
>>>> As per our offline discussion we can use org.wso2.carbon.appfactory.
>>>> repository.mgt.client.AppfacotryRepositoryClient inside deployers as
>>>> well. So we'll have one AppFactoryRepositoryClient everywhere. If we copy
>>>> the RepositoryMgt into the AppServer it should function without an issue
>>>> because the Carbon env is visible to the Jenkins webapp.
>>>>
>>>> thanks,
>>>> dimuthu
>>>>
>>>>
>>>> On Tue, Oct 21, 2014 at 6:57 PM, Mahesh Chinthaka <mahe...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> ok then , i will proceed with refactoring. Thanks.
>>>>>
>>>>> On Tue, Oct 21, 2014 at 6:36 PM, Janaka Ranabahu <jan...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 6:19 PM, Mahesh Chinthaka <mahe...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi ,
>>>>>>> No i meant a webservice, i understand it's not a good idea.
>>>>>>> Anyway there are some more findings so far,
>>>>>>>
>>>>>>> *Regarding appfactory.core.deploy.AppfactoryRepositoryClient*
>>>>>>>
>>>>>>> *appfactory.core.deploy.AppfactoryRepositoryClient* is used only
>>>>>>> twice for whole code. That is in *deleteFromDepSyncGitRepo* method
>>>>>>> and *undeployAllArtifactsOfAppFromDepSyncGitRepo *method in
>>>>>>> *ApplicationDeployer* class within the same package. And above two
>>>>>>> methods are private.
>>>>>>>
>>>>>>> Though all other repository deployment functions happen in
>>>>>>> *appfactory.deployers *(which jar goes to jenkins) , undeployment
>>>>>>> happens in *appfactory.core* section (correct me if im wrong).
>>>>>>>
>>>>>>> Therefore if we move undeploy functionality to
>>>>>>> *appfactory.deployers *section , we can get rid of
>>>>>>> *appfactory.core.deploy.AppfactoryRepositoryClient. *
>>>>>>>
>>>>>>> +1. Please proceed with the re-factoring. We need to handle
>>>>>> deployment and undeployment related operations from the same place.
>>>>>>
>>>>>>> *Regarding appfactory.deployers.clients.AppfactoryRepositoryClient*
>>>>>>>
>>>>>>> Unfortunately we will have to do the same implementation as in 
>>>>>>> *appfactory.repository.mgt
>>>>>>> *here , since this goes to jenkins and we need to keep minimum
>>>>>>> dependancies. Because of the minimum dependencies scenario we cannot use
>>>>>>> *JGitAgent* available in *appfacotry.repository.mgt . *Therefore we
>>>>>>> have to re-implement it here in *appfactory.deployers.clients*
>>>>>>> though it's a replication.
>>>>>>>
>>>>>>> Let's check whether we could move them to a common component, maybe
>>>>>> something like appfactory.common component.
>>>>>>
>>>>>> Thanks,
>>>>>> Janaka
>>>>>>
>>>>>>>
>>>>>>> Advise please....
>>>>>>>
>>>>>>> On Tue, Oct 21, 2014 at 3:36 PM, Danushka Fernando <
>>>>>>> danush...@wso2.com> wrote:
>>>>>>>
>>>>>>>> What do you meant by a service ? An OSGI service? +1 Go ahead with
>>>>>>>> the solution #2.
>>>>>>>>
>>>>>>>> Thanks & Regards
>>>>>>>> Danushka Fernando
>>>>>>>> Software Engineer
>>>>>>>> WSO2 inc. http://wso2.com/
>>>>>>>> Mobile : +94716332729
>>>>>>>>
>>>>>>>> On Tue, Oct 21, 2014 at 3:29 PM, Mahesh Chinthaka <mahe...@wso2.com
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>> Im working on [1]
>>>>>>>>>
>>>>>>>>> In here we have to consider 3 classes
>>>>>>>>>
>>>>>>>>>    1. org.wso2.carbon.appfactory.repository.mgt.client
>>>>>>>>>    .AppfacotryRepositoryClient
>>>>>>>>>    2. org.wso2.carbon.appfactory.core.deploy
>>>>>>>>>    .AppfacotryRepositoryClient
>>>>>>>>>    3. org.wso2.carbon.appfactory.deployers.clients
>>>>>>>>>    .AppfacotryRepositoryClient
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *org.wso2.carbon.appfactory.repository.mgt.client.AppfacotryRepositoryClient*
>>>>>>>>> has already integrated with JGit plugin via *JGitAgent* class.
>>>>>>>>>
>>>>>>>>> Still
>>>>>>>>> *org.wso2.carbon.appfactory.core.deploy.AppfacotryRepositoryClient*
>>>>>>>>> and
>>>>>>>>> *org.wso2.carbon.appfactory.deployers.clients.AppfacotryRepositoryClient*
>>>>>>>>> use *GitSCMClient*. Now we need to remove SCM plugin and
>>>>>>>>> integrate JGit plugin to these two classes as well.
>>>>>>>>> I see following approaches,
>>>>>>>>>
>>>>>>>>> 1. Implement same functionality which is in
>>>>>>>>> *org.wso2.carbon.appfactory.repository.mgt.client.AppfacotryRepositoryClient*
>>>>>>>>> for above both places. But this will cause code redundancy, I guess.
>>>>>>>>> 2. Make
>>>>>>>>> *org.wso2.carbon.appfactory.repository.mgt.client.AppfacotryRepositoryClient*
>>>>>>>>> as a  service  and make it available to use in other two places.
>>>>>>>>>
>>>>>>>>> Please advise me in way forward. Suggest me a better approach
>>>>>>>>> please.
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> [1] - https://wso2.org/jira/browse/APPFAC-2328
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>>>>>>>>> WSO2, Inc | lean. enterprise. middleware.
>>>>>>>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>>>>>>>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>>>>>>>>> Email: mahe...@wso2.com | Web: www.wso2.com
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>>>>>>> WSO2, Inc | lean. enterprise. middleware.
>>>>>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>>>>>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>>>>>>> Email: mahe...@wso2.com | Web: www.wso2.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Janaka Ranabahu*
>>>>>> Senior Software Engineer; WSO2 Inc.; http://wso2.com
>>>>>>
>>>>>>
>>>>>> *E-mail: jan...@wso2.com <http://wso2.com>**M: **+94 718370861
>>>>>> <%2B94%20718370861>*
>>>>>>
>>>>>> Lean . Enterprise . Middleware
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>>>>> WSO2, Inc | lean. enterprise. middleware.
>>>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>>>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>>>>> Email: mahe...@wso2.com | Web: www.wso2.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dimuthu Leelarathne
>>>> Architect & Product Lead of App Factory
>>>>
>>>> WSO2, Inc. (http://wso2.com)
>>>> email: dimut...@wso2.com
>>>> Mobile : 0773661935
>>>>
>>>> Lean . Enterprise . Middleware
>>>>
>>>
>>>
>>>
>>> --
>>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>>> WSO2, Inc | lean. enterprise. middleware.
>>> #20, Palm Grove, Colombo 03, Sri Lanka
>>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>>> Email: mahe...@wso2.com | Web: www.wso2.com
>>>
>>
>>
>>
>> --
>> *Mahesh Chinthaka Vidanagama* | Software Engineer
>> WSO2, Inc | lean. enterprise. middleware.
>> #20, Palm Grove, Colombo 03, Sri Lanka
>> Mobile: +94 71 63 63 083 | Work: +94 112 145 345
>> Email: mahe...@wso2.com | Web: www.wso2.com
>>
>
>
>
> --
> Best Regards
>
> Samith Dassanayake
> Software Engineer, WSO2 Inc.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to