Hi Imesh, Thanks for the reply. This looks a cleaner approach.
So we can remove mb_ip and mb_port from loadbalancer.conf file as well. I'll work on implementing this. Thanks. On Tue, Jul 1, 2014 at 6:18 PM, Imesh Gunaratne <im...@apache.org> wrote: > Hi Lahiru, > > I think the best option would be to remove the jndi.properties template > and it's dynamic file generation logic and place the jndi.properties file > directly. Then it would be consistent with other modules. > > Thanks > > > On Tue, Jul 1, 2014 at 7:23 AM, Lahiru Sandaruwan <lahi...@wso2.com> > wrote: > >> Hi all, >> >> I have a requirement to support $subject. >> >> Currently Stratos supports *"tcp://$mb_ip:$mb_port"* in jndi.properties >> file and we need to add support to fail over URI support as follows >> *"failover:(tcp://primary_mb_ip:$mb_port:61616,tcp://secondary_mb_ip:$mb_port:61616)?* >> *randomize=false"*. >> >> There are two places that we create jndi.properties file dynamically in >> Stratos. Those are cartridge agent and Load balancer. >> >> The problem is that we currently use MB ip and MB port attributes for >> building the "java.naming.provider.url" of jndi properties file in in >> dynamic case. So we cannot support fail over uri this way. >> >> My suggestion is to introduce "mb_uri" parameter to the places we >> currently use "mb_ip" and "mb_port" in LB and Cartridge agent. >> >> Let me know your thoughts. >> >> Thanks. >> -- >> -- >> Lahiru Sandaruwan >> Committer and PMC member, Apache Stratos, >> Senior Software Engineer, >> WSO2 Inc., http://wso2.com >> lean.enterprise.middleware >> >> email: lahi...@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 >> >> > > > -- > Imesh Gunaratne > > Technical Lead, WSO2 > Committer & PPMC Member, Apache Stratos > -- -- Lahiru Sandaruwan Committer and PMC member, Apache Stratos, Senior Software Engineer, WSO2 Inc., http://wso2.com lean.enterprise.middleware email: lahi...@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