Kwa Kil On Swa

Tuesday, November 07, 2006

appfuse 1.9.4 p6spy integration

1. Download p6spy (google it!)

2. Put the unaltered spy.properties in C:\apps\myappfuseapp\web\WEB-INF\classes
update the logfile entry to point to somewhere sensible: for example
logfile = C:/spy.log

3. put the p6spy.jar in C:\apps\apache-tomcat-5.5.20\common\lib
(may not be the best place but it works)

4. Find applicationContext-resources.xml and change (blog rules mean I have to put a space after every less than sign otherwise the xml will not display on the blog entry)
Change
bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
to read
bean id="dataSourceTarget" class="org.apache.commons.dbcp.BasicDataSource"


5. Add the following bean defintion
{bean id="dataSource" class="com.p6spy.engine.spy.P6DataSource"
{destroy-method="close">
{constructor-arg>
{ref local="dataSourceTarget">
{/constructor-arg>
{/bean>


Please note that I can't put the xml tags properly in this blog, otherwise it will not display properly. So I have used { in stead of a less than sign - Grrrrr!


Labels:

0 Comments:

Post a Comment

<< Home