--- On Thu, 10/1/09, Damian Krzeminski <[email protected]> wrote:

> From: Damian Krzeminski <[email protected]>
> Subject: Re: [sipX-dev] XX-6628 resources list replication
> To: [email protected]
> Date: Thursday, October 1, 2009, 11:35 PM
> George Niculae wrote:
> > Hi all,
> > 
> > some thoughts on http://track.sipfoundry.org/browse/XX-6628 - since the
> > resources list should be activated when a user with ID
> account is saved
> > / deleted I am thinking to add a new method
> activateResourceList to
> > trigger resource activation in CoreContext and to call
> it from saveUser
> > / deleteUser.
> > 
> > However, since saveUser is used by CsvRowInserter and
> LdapRowInserter
> > for multiple user import I am going to add a new
> method that won't
> > trigger activation - saveUserWithoutRlsActivation. Row
> inserters will
> > use that one and will call
> coreContext.activateResourceList after all
> > insertions are done (afterInserting method).
> Additional verification
> > will be added to corecontext saveUser / deleteUser to
> trigger activation
> > only for IM users.
> > 
> > Please let me know if you have any comment /
> suggestion on this
> > 
> > Thanks, George
> > 
> > 
> > 
> 
> It would be better if you implemented a lazy/collating
> proxy for activating
> resource list (any files in general). In this way it can be
> safely called
> multiple times and would only result in a single
> replication.

Damian, thanks for the suggestion. I've attached a patch that defines a new 
class to be used for lazy config files activation in general (that do not 
require service restart). If someone needs to add such an activator -  defining 
a new bean as below (and providing service bean id) would be sufficient

<bean id="myConfigFilesActivator" 
class="org.sipfoundry.sipxconfig.service.LazyConfigFileActivationManager" 
parent="abstractConfigFilesActivator" init-method="init">
    <property name="serviceBeanId" value="myBeanServiceId" />
</bean>

There is an open issue related to the patch - XX-6628 expectation is that 
resource-list.xml must be regenerated whenever the admin adds a SIP user that 
has a non-blank IM ID, however the current replication mechanism adds an entry 
in the file only if the IM Account is enabled (even the IM ID is not blank). 
Should the ResourceLists mechanism be changed so the resource to be added even 
for IM Account disabled but IM ID not blank? (I think I saw an issue on this 
matter, though not sure...)

Knowing this will allow rls activation mechanism enhancement - in the attached 
patch activation is triggered from core context any time saveUser / deleteUser 
is called, but I was thinking to do this only on:
- deleteUser - trigger activation for user with IM Account enabled
- saveUser - trigger activation for new user with IM Account enabled (or IM ID 
not blank)
- saveUser - activate for existing user when IM account changed to 
enabled/disabled (or IM ID filled in) or if the IM ID set to blank.

George



      
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to