Hi ,

There is an issue in going with this approach since we have to make
cassandra server component depend on this glue component. Since glue
component must get activated before the Cassandra server component.

So we used following approach as a solution.

   - Implement a switch in Cassandra server component where we can disable
   the Cassandra server  startup optionally by using a system property.
   - Expose Cassandra Server Controller as a OSGI Service using which
   consumers can start/shutdown Cassandra server

MB product will always starts with this system property set  and in the
andes component which starts the broker will use this OSGI service and
start the embedded Cassandra server(Only when clustering is disabled)
before the broker startup.

I think BAM guys also will be able use this OSGI service if they want to
have control over the Cassandra server startup.

The Cassandra server start api call is a asyc call so we can't be sure when
 we should start the broker (we must wait till Cassandra start-up is
finished). So we used an approach where we wait till the Cassandra listen
port is open before starting the broker.


thanks,
Charith



On Wed, Apr 4, 2012 at 2:43 PM, Charith Wickramarachchi <[email protected]>wrote:

>
>
> On Wed, Apr 4, 2012 at 2:01 PM, Afkham Azeez <[email protected]> wrote:
>
>> It looks like we will need a gluing component that will take control of
>> managing this dependency between Andes & Cassandra. Instead of the 2
>> components initializing themselves independently and loading configuration
>> independently, this 3 component should read the conf files (may be a
>> separate, merged conf file) and then initialize Andes & Cassandra.
>>
>>
> Thanks Azeez this is a good option. We will go ahead with this approach.
>
>
> regards,
> Charith
>
>
>> On Wed, Apr 4, 2012 at 1:58 PM, Charith Wickramarachchi <[email protected]
>> > wrote:
>>
>>>
>>>
>>> On Wed, Apr 4, 2012 at 12:18 PM, Charith Wickramarachchi <
>>> [email protected]> wrote:
>>>
>>>> There is one more problem even going with this
>>>> property/configuration based approach.
>>>>
>>>> In Our case Cassandra server must be started before starting andes
>>>> related features.
>>>> So if we go with this approach In a Cluster enabled mode User will have
>>>> to
>>>>
>>>> 1) Change the andes-config.xml in which he will enable clustering  (and
>>>> do other config changes to point to zookeeper , Cassandra server etc )
>>>> 2) Start the server with that system property used
>>>> by Cassandra component   (Or if its a conifg change that config file)
>>>>
>>>>
>>>
>>>
>>>> 2 places to do the same change. So its ugly.
>>>>
>>>>
>>> May be this is ok. Since one can say they are two independent Tasks
>>>
>>> --Charith
>>>
>>> I think for BAM same problem will be there.
>>>>
>>>> Any ideas to fix this in a proper way ?
>>>>
>>>> thanks,
>>>> Charith
>>>>
>>>>
>>>> On Wed, Apr 4, 2012 at 12:09 PM, Pradeep Fernando <[email protected]>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> basically its bundles that get activated. There is not feature concept
>>>>> in runtime. Configuration based approach is the only way to handle this
>>>>> kind of scenario. However configuration can be done using,
>>>>> property/xml file
>>>>> system property
>>>>> Some other bundle configuring the target through configuration admin
>>>>> service.
>>>>>
>>>>> thanks,
>>>>> --Pradeep
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Charith Dhanushka Wickramarachchi
>>>> Software Engineer
>>>> WSO2 Inc
>>>> http://wso2.com/
>>>>  http://wso2.org/
>>>>
>>>> blog
>>>> http://charithwiki.blogspot.com/
>>>>
>>>>  twitter
>>>> http://twitter.com/charithwiki
>>>>
>>>> Mobile : 0776706568
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Charith Dhanushka Wickramarachchi
>>> Software Engineer
>>> WSO2 Inc
>>> http://wso2.com/
>>>  http://wso2.org/
>>>
>>> blog
>>> http://charithwiki.blogspot.com/
>>>
>>>  twitter
>>> http://twitter.com/charithwiki
>>>
>>> Mobile : 0776706568
>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Afkham Azeez*
>> Director of Architecture; WSO2, Inc.; http://wso2.com
>> Member; Apache Software Foundation; http://www.apache.org/
>> * <http://www.apache.org/>**
>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>> *
>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>> *
>> *
>> *Lean . Enterprise . Middleware*
>>
>>
>
>
> --
> Charith Dhanushka Wickramarachchi
> Software Engineer
> WSO2 Inc
> http://wso2.com/
> http://wso2.org/
>
> blog
> http://charithwiki.blogspot.com/
>
> twitter
> http://twitter.com/charithwiki
>
> Mobile : 0776706568
>
>
>


-- 
Charith Dhanushka Wickramarachchi
Software Engineer
WSO2 Inc
http://wso2.com/
http://wso2.org/

blog
http://charithwiki.blogspot.com/

twitter
http://twitter.com/charithwiki

Mobile : 0776706568
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to