You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Imesh Gunaratne <im...@apache.org> on 2013/12/03 06:53:44 UTC

Hard Coded Deployment Policy Name in Cluster

Hi All,

Is there any reason for hard coding deployment policy name in Cluster class:

package org.apache.stratos.messaging.domain.topology:
...
public class Cluster implements Serializable {
...
    private String deploymentPolicyName = "economy-deployment";
    ...
}

Thanks
Imesh

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Imesh Gunaratne <im...@apache.org>.
Great! Thanks for the clarification!!


On Tue, Dec 3, 2013 at 1:08 PM, Nirmal Fernando <ni...@gmail.com>wrote:

> Ya.. we should remove it from the event. It should only be in the Cluster.
>
>
> On Tue, Dec 3, 2013 at 11:54 AM, Isuru Perera <is...@wso2.com> wrote:
>
>> Is there a way to avoid duplicating the same name in two places? It's
>> okay to have a default value, but it's not good to have it in two different
>> places.
>>
>>
>> On Mon, Dec 2, 2013 at 10:10 PM, Lahiru Sandaruwan <la...@wso2.com>wrote:
>>
>>> Yes, This is eventually will be set when the user subscribe. He will
>>> select a policy and it will be used in cluster created event.
>>>
>>> I think Autoscaler policy name is also hard coded in Autoscaler side due
>>> to same reason.
>>>
>>> Thanks.
>>>
>>>
>>> On Tue, Dec 3, 2013 at 11:31 AM, Nirmal Fernando <nirmal070125@gmail.com
>>> > wrote:
>>>
>>>> This is the *default* deployment policy name and also, currently the
>>>> policy subscription is not there. So, there's no way to get this bit of
>>>> information to the bus.
>>>>
>>>> And if someone use setter method and set the deployment policy name,
>>>> upon a new subscription, that value would get propagated.
>>>>
>>>>
>>>> On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org>wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> Is there any reason for hard coding deployment policy name in Cluster
>>>>> class:
>>>>>
>>>>> package org.apache.stratos.messaging.domain.topology:
>>>>> ...
>>>>> public class Cluster implements Serializable {
>>>>> ...
>>>>>     private String deploymentPolicyName = "economy-deployment";
>>>>>     ...
>>>>> }
>>>>>
>>>>> Thanks
>>>>> Imesh
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Software Engineer,
>>> Platform Technologies,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com cell: (+94) 773 325 954
>>> blog: http://lahiruwrites.blogspot.com/
>>> twitter: http://twitter.com/lahirus
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Nirmal Fernando <ni...@gmail.com>.
Ya.. we should remove it from the event. It should only be in the Cluster.


On Tue, Dec 3, 2013 at 11:54 AM, Isuru Perera <is...@wso2.com> wrote:

> Is there a way to avoid duplicating the same name in two places? It's okay
> to have a default value, but it's not good to have it in two different
> places.
>
>
> On Mon, Dec 2, 2013 at 10:10 PM, Lahiru Sandaruwan <la...@wso2.com>wrote:
>
>> Yes, This is eventually will be set when the user subscribe. He will
>> select a policy and it will be used in cluster created event.
>>
>> I think Autoscaler policy name is also hard coded in Autoscaler side due
>> to same reason.
>>
>> Thanks.
>>
>>
>> On Tue, Dec 3, 2013 at 11:31 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>> This is the *default* deployment policy name and also, currently the
>>> policy subscription is not there. So, there's no way to get this bit of
>>> information to the bus.
>>>
>>> And if someone use setter method and set the deployment policy name,
>>> upon a new subscription, that value would get propagated.
>>>
>>>
>>> On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org>wrote:
>>>
>>>> Hi All,
>>>>
>>>> Is there any reason for hard coding deployment policy name in Cluster
>>>> class:
>>>>
>>>> package org.apache.stratos.messaging.domain.topology:
>>>> ...
>>>> public class Cluster implements Serializable {
>>>> ...
>>>>     private String deploymentPolicyName = "economy-deployment";
>>>>     ...
>>>> }
>>>>
>>>> Thanks
>>>> Imesh
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Software Engineer,
>> Platform Technologies,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com cell: (+94) 773 325 954
>> blog: http://lahiruwrites.blogspot.com/
>> twitter: http://twitter.com/lahirus
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Isuru Perera <is...@wso2.com>.
Is there a way to avoid duplicating the same name in two places? It's okay
to have a default value, but it's not good to have it in two different
places.


On Mon, Dec 2, 2013 at 10:10 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Yes, This is eventually will be set when the user subscribe. He will
> select a policy and it will be used in cluster created event.
>
> I think Autoscaler policy name is also hard coded in Autoscaler side due
> to same reason.
>
> Thanks.
>
>
> On Tue, Dec 3, 2013 at 11:31 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>> This is the *default* deployment policy name and also, currently the
>> policy subscription is not there. So, there's no way to get this bit of
>> information to the bus.
>>
>> And if someone use setter method and set the deployment policy name, upon
>> a new subscription, that value would get propagated.
>>
>>
>> On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org>wrote:
>>
>>> Hi All,
>>>
>>> Is there any reason for hard coding deployment policy name in Cluster
>>> class:
>>>
>>> package org.apache.stratos.messaging.domain.topology:
>>> ...
>>> public class Cluster implements Serializable {
>>> ...
>>>     private String deploymentPolicyName = "economy-deployment";
>>>     ...
>>> }
>>>
>>> Thanks
>>> Imesh
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Software Engineer,
> Platform Technologies,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com cell: (+94) 773 325 954
> blog: http://lahiruwrites.blogspot.com/
> twitter: http://twitter.com/lahirus
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Yes, This is eventually will be set when the user subscribe. He will select
a policy and it will be used in cluster created event.

I think Autoscaler policy name is also hard coded in Autoscaler side due to
same reason.

Thanks.


On Tue, Dec 3, 2013 at 11:31 AM, Nirmal Fernando <ni...@gmail.com>wrote:

> This is the *default* deployment policy name and also, currently the
> policy subscription is not there. So, there's no way to get this bit of
> information to the bus.
>
> And if someone use setter method and set the deployment policy name, upon
> a new subscription, that value would get propagated.
>
>
> On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> Hi All,
>>
>> Is there any reason for hard coding deployment policy name in Cluster
>> class:
>>
>> package org.apache.stratos.messaging.domain.topology:
>> ...
>> public class Cluster implements Serializable {
>> ...
>>     private String deploymentPolicyName = "economy-deployment";
>>     ...
>> }
>>
>> Thanks
>> Imesh
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Nirmal Fernando <ni...@gmail.com>.
This is the *default* deployment policy name and also, currently the policy
subscription is not there. So, there's no way to get this bit of
information to the bus.

And if someone use setter method and set the deployment policy name, upon a
new subscription, that value would get propagated.


On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi All,
>
> Is there any reason for hard coding deployment policy name in Cluster
> class:
>
> package org.apache.stratos.messaging.domain.topology:
> ...
> public class Cluster implements Serializable {
> ...
>     private String deploymentPolicyName = "economy-deployment";
>     ...
> }
>
> Thanks
> Imesh
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Hard Coded Deployment Policy Name in Cluster

Posted by Imesh Gunaratne <im...@apache.org>.
I could also find it
in org.apache.stratos.messaging.event.topology.ClusterCreatedEvent:

public class ClusterCreatedEvent extends TopologyEvent implements
Serializable {
    ...
    private String deploymentPolicyName = "economy-deployment";
    ...
}


On Tue, Dec 3, 2013 at 11:23 AM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi All,
>
> Is there any reason for hard coding deployment policy name in Cluster
> class:
>
> package org.apache.stratos.messaging.domain.topology:
> ...
> public class Cluster implements Serializable {
> ...
>     private String deploymentPolicyName = "economy-deployment";
>     ...
> }
>
> Thanks
> Imesh
>