Documentation Home

BroadleafCommercePrivate - 5.1.4-GA

Released on July 6, 2017

This is the 4th patch release for Broadleaf Framework 5.1.x.

Noteworthy Changes

StringClobType is causing the Oracle JDBC driver to generate large buffer arrays

Research has shown that Hibernate is generating a lot of garbage data for GC with using Clob data types that doesn't need to be there. Hibernate has deprecated StringClobType in favor of MaterializedClobType. While transitioning to this new type is the right answer for Oracle, it may not be the right answer for other RDBMS platform. For example, if a field type of Text is used in Postgres for the field, using MaterializedClobType will lead to errors at runtime, since the TextType should be used instead.

The main reason to switch to MaterializedClobType is because it avoids the use of rs.getCharacterStream on the clob column. Opening the character stream causes the Oracle jdbc driver to allocate a very large buffer array, which contributes to wasteful short-term memory allocation.

To enable the use of the new MaterializedClobType, the following configuration can be added to the core project applicationContext.xml:

<bean id="myMaterializedClobTypeClassTransfomer" class="org.broadleafcommerce.common.extensibility.jpa.convert.MaterializedClobTypeClassTransformer"/>
<bean id="myClassTransformers" class="org.springframework.beans.factory.config.ListFactoryBean">
   <property name="sourceList">
      <list>
         <ref bean="myMaterializedClobTypeClassTransfomer"/>
      </list>
   </property>
</bean>
<bean class="org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor">
   <property name="collectionRef" value="myClassTransformers" />
   <property name="targetRef" value="blMergedClassTransformers" />
</bean>

Large ResultSet and Large Query Volume Performance Improvements (Enterprise Module)

Several admin ListGrid changes have been made to improve performance when dealing with large data sets. This represents a UX change in the admin when dealing with ListGrids for entities that have this feature enabled. The ListGrid behavior is changed to use a Page Next, Page Previous, Page Size navigation approach in order to limit potentially expensive count(*) queries which in "Legacy" mode is needed for pagination status tracking. To enable this feature, the following steps can be taken:

Enable the feature in the properties file

In the appropriate properties file (e.g. production.properties), enable the following properties:

admin.fetch.enable.large.result.paging=true
use.to.one.lookup.sku.product.option.value=true

OPTIONAL: Exclude other entities from the Large ResultSet list by changing applicationContext-admin.xml

By default, all entities except StaticMedia, StructuredContent, and SkuImpl will use the new UX behavior (if enabled). Additional entities can be added to the exclusion list if desired. The following entry is an example of how to add the exclusion(s) to your admin context - applicationContext-admin.xml:

<bean id="myFetchLargeResultQualifiedEntityPatterns" class="org.springframework.beans.factory.config.ListFactoryBean">
    <property name="sourceList">
        <list>
            <bean class="com.broadleafcommerce.enterprise.workflow.admin.persistence.module.FetchLargeResultSetQualifiedEntityPattern">
                <property name="regex" value="com\.mycompany\.domain\.EntityToExcludeImpl"/>
            </bean>
        </list>
    </property>
</bean>

<bean class="org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor">
    <property name="collectionRef" value="myFetchLargeResultQualifiedEntityPatterns" />
    <property name="targetRef" value="blFetchLargeResultQualifiedEntityPatterns" />
</bean>

An at-a-glance view of the issues that were closed in this release:

Major Bugs(7)

  • Fixed an issue where it was not possible to remove an Offer Restriction
  • Made a fix to make MVEL Rules Null Safe
  • Fixed an issue where adding an item and repricing the cart at the same time was not possible
  • Addressed an issue where outdated product options would display on the form when adding additional skus to a product
  • Removed unnecessary transactional annotation to the CMSStorage persistence unit on every static asset retrieval
  • Fixed inability to add categories to a product when not running Enterprise
  • Fixed an issue that was preventing new categories without a parent category from being added

Minor Bugs(6)

  • Replace print stack trace with logging to keep with best practices
  • Retrieved the SKU entity instead of just the ID because we need to manually filter out archived SKUs before returning their IDs.
  • NPE in AdminEntityServiceImpl#fetch if maxIndexis not null and startIndex is null
  • URI-encode field names when building lookup URLs since they can have non-URI characters in them
  • StringClobType is causing the Oracle JDBC driver to generate large buffer arrays
  • Exclude OMS listgrids from resizing on tab change

Enhancements(6)

  • Large result set and large query volume performance improvements
  • Add better error handling and logging for out of the box workflows
  • Added new cache to store dates by URI for when queries are made when looking up a Page by URI.
  • Changed password regex to be more generic and support a property-based override
  • Made ListGrid enhancements to improve performance
  • Simplified redundant booleans in conditional for OrderImpl

Total Resolved Issues: 19