stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Eppel (meppel)" <mep...@cisco.com>
Subject Question: Setting a property on a service instance (adding a property to a cartridge)
Date Mon, 17 Mar 2014 23:30:11 GMT
Hi,

I am experimenting with some stratos code to add a property to a cartridge (or service) which
I can later retrieve from a service instance.

Service.java (in org.apache.stratos.messaging.domain.topology) has getter/setter for properties
but I have a hard time to figure out the flow / code where properties are actually retrieved
from the cartridge definition (json) and set at the service instance (e.g. when subscribing
to a cartridge). 

The idea is to add a new property to a cartridge json definition  (see example below), assign
it to a service instance and retrieve it in the context of autoscaler rules. Is there a better
way to define properties at the service level ?

Also, another question is: I can see in the code that there is ServiceCreatedEvent which I
would assume would be generated and handled when subscribing a cartridge (= service ?) but
it seems that no such event is being processed ? (- however I do see the ClusterCreatedEvent
being created and processed). When is ServiceCreatedEvent generated ?

Any pointers are highly appreciated

Thanks

Martin


....
"property": [
            {
                "name": "dependencies",
                "value": "service_name"
            }
...
]
Mime
View raw message