Documentation Home

BroadleafCommerce - 5.0.11-GA

Released on July 6, 2017

This is the 11th patch release for Broadleaf Commerce 5.0 framework.

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)

  • Cannot remove an Offer Restriction
  • Make MVEL Rules Null Safe
  • Cannot add an item and reprice the cart at the same time
  • 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
  • Addressed an issue where outdated product options would display on the form when adding additional skus to a product
  • Fixed an issue that was preventing new categories without a parent category from being added

Minor Bugs(4)

  • URI-encode field names when building lookup URLs since they can have non-URI characters in them
  • Exclude OMS listgrids from resizing on tab change
  • NPE in AdminEntityServiceImpl#fetch if maxIndex is not null and startIndex is null
  • StringClobType is causing the Oracle JDBC driver to generate large buffer arrays

Enhancements(4)

  • Changed password regex to be more generic and support a property-based override
  • Large ResultSet and Large Query Volume Performance Improvements
  • Support listgrid record status message and css style
  • Simplified redundant booleans in conditional for OrderImpl

Total Resolved Issues: 15