Skip to content

Commit

Permalink
BroadleafCommerce/BroadleafCommerce#195 - Add the proper class transf…
Browse files Browse the repository at this point in the history
…ormer configuration for the max offer code uses fix. Also hook up Spring Instrument by default
  • Loading branch information
phillipuniverse committed Nov 22, 2013
1 parent 953f9b0 commit 3f25924
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 7 deletions.
2 changes: 2 additions & 0 deletions admin/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<jvmarg value="-Xmx1024M" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8001" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<arg value="compile"/>
<arg value="war:exploded"/>
Expand All @@ -46,6 +47,7 @@
<jvmarg value="-Dlogs.dir=${logs.dir}" />
<jvmarg value="-noverify" />
<jvmarg value="-javaagent:${jrebel.path}" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<arg value="compile"/>
<arg value="war:exploded"/>
Expand Down
5 changes: 3 additions & 2 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ ant.blCMSStorage.userName=sa
ant.blCMSStorage.password=null
ant.blCMSStorage.driverClassName=org.hsqldb.jdbcDriver

#optional - only required if you wish for the build-create-sql and build-update-sql tasks to include weaved items from modules
spring.instrument.path=/path/to/your/spring/instrument/jar
#Required for correct operation of some 3rd party modules
#Relative paths are from the ant build.xml files, so site/build.xml and admin/build.xml.
spring.instrument.path=../lib/spring-instrument-3.2.2.RELEASE.jar

#End build-*-sql Ant Task Properties
32 changes: 30 additions & 2 deletions core/src/main/resources/applicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,34 @@
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">

<!-- Shared properties between admin and site go here -->

<!-- Shared properties between admin and site go here -->

<!-- This bean is REQUIRED for proper operation of the max uses property for OfferCodes and is only required for the Broadleaf
3.0 line starting with 3.0.6-GA. For Broadleaf 3.1 and above this can be safely removed -->

<bean id="blOfferAuditFixClassTransformer" class="org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyClassTransformer">
<constructor-arg name="moduleName" value="Offer Audit Fix" />
<property name="xformTemplates">
<map>
<entry>
<key><value>org.broadleafcommerce.core.offer.domain.OfferAuditImpl</value></key>
<value>org.broadleafcommerce.core.offer.domain.OfferAuditWeaveImpl</value>
</entry>
</map>
</property>
</bean>

<bean id="customClassTransformers" class="org.springframework.beans.factory.config.ListFactoryBean">
<property name="sourceList">
<list>
<ref bean="blOfferAuditFixClassTransformer" />
</list>
</property>
</bean>

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

</beans>
Binary file added lib/spring-instrument-3.2.2.RELEASE.jar
Binary file not shown.
9 changes: 6 additions & 3 deletions site/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<arg value="compile"/>
<arg value="war:exploded"/>
<arg value="jetty:run"/>
Expand All @@ -42,6 +43,7 @@
<jvmarg value="-Xmx512M" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<arg value="compile"/>
<arg value="war:exploded"/>
Expand All @@ -60,6 +62,7 @@
<jvmarg value="-Dlogs.dir=${logs.dir}" />
<jvmarg value="-noverify" />
<jvmarg value="-javaagent:${jrebel.path}" />
<jvmarg value="-javaagent:${spring.instrument.path}" />
<jvmarg value="-Druntime.environment=${runtime.environment}" />
<arg value="compile"/>
<arg value="war:exploded"/>
Expand Down Expand Up @@ -137,7 +140,7 @@
<pathelement location="${ant.home}/lib/ant-launcher.jar"/>
</classpath>
<!--uncomment the following spring insturment jar argument if you require spring instrument-->
<!--<jvmarg value="-javaagent:${spring.instrument.path}"/>-->
<jvmarg value="-javaagent:${spring.instrument.path}"/>
<jvmarg value="-XX:MaxPermSize=512M" />
<jvmarg value="-Xmx1024M" />
<arg value="-buildfile"/>
Expand Down Expand Up @@ -224,7 +227,7 @@
<pathelement location="${ant.home}/lib/ant-launcher.jar"/>
</classpath>
<!--uncomment the following spring insturment jar argument if you require spring instrument-->
<!--<jvmarg value="-javaagent:${spring.instrument.path}"/>-->
<jvmarg value="-javaagent:${spring.instrument.path}"/>
<jvmarg value="-XX:MaxPermSize=512M" />
<jvmarg value="-Xmx1024M" />
<arg value="-buildfile"/>
Expand Down

0 comments on commit 3f25924

Please sign in to comment.