Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

uPortal 3.0 switched from a bundled Person Directory service API to the stand-alone Person Directory project. The primary change is a renaming of the packages but the configuration properties of some classes changed as well. Below are itemized instructions for converting a personDirectory.xml file from uPortal 2 to work in uPortal 3.

Move the File

In uPortal 2 the file was named personDirectory.xml and located in /uPortal/properties In uPortal 3 the file is named personDirectoryContext.xml and located in /uPortal/portal-impl/src/main/resources/properties/contexts

Rename the Package

Replace all instances of org.jasig.portal.services.persondir in the file with org.jasig.services.persondir

CachingPersonAttributeDaoImpl

The CachingPersonAttributeDaoImpl in uPortal 2 automatically discovered the cache to use. With the stand-alone project the cache needs to be provided.

If you have a CachingPersonAttributeDaoImpl add the property:

<property name="userInfoCache">
    <bean class="org.jasig.portal.utils.cache.MapCacheFactoryBean">
        <property name="cacheFactory" ref="cacheFactory" />
        <property name="cacheName" value="org.jasig.services.persondir.USER_INFO" />
    </bean>
</property>

JdbcPersonAttributeDaoImpl

JdbcPersonAttributeDaoImpl was renamed to SingleRowJdbcPersonAttributeDao and moved into the org.jasig.services.persondir.support.jdbc package. Update the bean class attribute to org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao

DataSource Access

In the uPortal 2 file access to the Portal DataSource was done via Spring's MethodInvokingFactoryBean. Although the API is still available this will not work in uPortal 3 and will cause the portal to fail to start. The portal's DataSource is now available as a Spring bean named PortalDB which should be injected instead.

For example the following xml snippet:

<constructor-arg index="0">
    <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
        <property name="staticMethod">
            <value>org.jasig.portal.RDBMServices.getDataSource</value>
        </property>
    </bean>
</constructor-arg> 

Should be replaced with the following:

<constructor-arg index="0" ref="PortalDb" />
  • No labels