eXo Platform 3.0

- Prev
- Next

## Chapter 67. Update ConversationState when user's Membership changed

When a user logged in portal in ConversationRegistry added ConversationSate for this user. ConversationState keeps user's Identity that is actual for logged in time. In this case even user's Membership updated in OrganizationService ConversationState still keeps old (not actual Identity). User must logged out and loggin in again to update Identity. To fix this issue, need add special listener in configuration of OrganizationServicer. This listener is extended MembershipEventListener.

Example of configuration.

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <configuration
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
       xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
      <external-component-plugins>
        <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
    .....
    .....
        <component-plugin>
          <name>MembershipUpdateListener</name>
          <set-method>addListenerPlugin</set-method>
          <type>org.exoplatform.services.organization.impl.MembershipUpdateListener</type>
        </component-plugin>

       <external-component-plugins>
    </configuration>

- Prev
- Up
- Home
- Next