Revision 2b63f911
Added by Andreas Kohlbecker about 8 years ago
.gitattributes | ||
---|---|---|
1877 | 1877 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/configurable.xml -text |
1878 | 1878 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/datasources-local.xml -text |
1879 | 1879 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/empty-default-datasource.xml -text |
1880 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/p6spy.xml -text |
|
1881 | 1880 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/routing-datasource.xml -text |
1882 | 1881 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/json-views.xml -text |
1883 | 1882 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/oai-views.xml -text |
cdmlib-io/src/test/resources/spy.properties | ||
---|---|---|
1 |
################################################################# |
|
2 |
# P6Spy Options File # |
|
3 |
# See documentation for detailed instructions # |
|
4 |
################################################################# |
|
5 |
|
|
6 |
################################################################# |
|
7 |
# MODULES # |
|
8 |
# # |
|
9 |
# Modules provide the P6Spy functionality. If a module, such # |
|
10 |
# as module_log is commented out, that functionality will not # |
|
11 |
# be available. If it is not commented out (if it is active), # |
|
12 |
# the functionality will be active. # |
|
13 |
# # |
|
14 |
# Values set in Modules cannot be reloaded using the # |
|
15 |
# reloadproperties variable. Once they are loaded, they remain # |
|
16 |
# in memory until the application is restarted. # |
|
17 |
# # |
|
18 |
################################################################# |
|
19 |
|
|
20 |
module.log=com.p6spy.engine.logging.P6LogFactory |
|
21 |
#module.outage=com.p6spy.engine.outage.P6OutageFactory |
|
22 |
|
|
23 |
################################################################# |
|
24 |
# REALDRIVER(s) # |
|
25 |
# # |
|
26 |
# In your application server configuration file you replace the # |
|
27 |
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is # |
|
28 |
# where you put the name of your real driver P6Spy can find and # |
|
29 |
# register your real driver to do the database work. # |
|
30 |
# # |
|
31 |
# If your application uses several drivers specify them in # |
|
32 |
# realdriver2, realdriver3. See the documentation for more # |
|
33 |
# details. # |
|
34 |
# # |
|
35 |
# Values set in REALDRIVER(s) cannot be reloaded using the # |
|
36 |
# reloadproperties variable. Once they are loaded, they remain # |
|
37 |
# in memory until the application is restarted. # |
|
38 |
# # |
|
39 |
################################################################# |
|
40 |
|
|
41 |
# oracle driver |
|
42 |
# realdriver=oracle.jdbc.driver.OracleDriver |
|
43 |
|
|
44 |
# mysql Connector/J driver |
|
45 |
# realdriver=com.mysql.jdbc.Driver |
|
46 |
|
|
47 |
# informix driver |
|
48 |
# realdriver=com.informix.jdbc.IfxDriver |
|
49 |
|
|
50 |
# ibm db2 driver |
|
51 |
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver |
|
52 |
|
|
53 |
# the mysql open source driver |
|
54 |
#realdriver=org.gjt.mm.mysql.Driver |
|
55 |
#realdriver=com.mysql.jdbc.Driver |
|
56 |
realdriver=org.h2.Driver |
|
57 |
|
|
58 |
#specifies another driver to use |
|
59 |
realdriver2= |
|
60 |
#specifies a third driver to use |
|
61 |
realdriver3= |
|
62 |
|
|
63 |
|
|
64 |
#the DriverManager class sequentially tries every driver that is |
|
65 |
#registered to find the right driver. In some instances, it's possible to |
|
66 |
#load up the realdriver before the p6spy driver, in which case your connections |
|
67 |
#will not get wrapped as the realdriver will "steal" the connection before |
|
68 |
#p6spy sees it. Set the following property to "true" to cause p6spy to |
|
69 |
#explicitily deregister the realdrivers |
|
70 |
deregisterdrivers=true |
|
71 |
|
|
72 |
################################################################ |
|
73 |
# P6LOG SPECIFIC PROPERTIES # |
|
74 |
################################################################ |
|
75 |
# no properties currently available |
|
76 |
|
|
77 |
################################################################ |
|
78 |
# EXECUTION THRESHOLD PROPERTIES # |
|
79 |
################################################################ |
|
80 |
# This feature applies to the standard logging of P6Spy. # |
|
81 |
# While the standard logging logs out every statement # |
|
82 |
# regardless of its execution time, this feature puts a time # |
|
83 |
# condition on that logging. Only statements that have taken # |
|
84 |
# longer than the time specified (in milliseconds) will be # |
|
85 |
# logged. This way it is possible to see only statements that # |
|
86 |
# have exceeded some high water mark. # |
|
87 |
# This time is reloadable. # |
|
88 |
# |
|
89 |
# executionthreshold=integer time (milliseconds) |
|
90 |
# |
|
91 |
executionthreshold= |
|
92 |
|
|
93 |
################################################################ |
|
94 |
# P6OUTAGE SPECIFIC PROPERTIES # |
|
95 |
################################################################ |
|
96 |
# Outage Detection |
|
97 |
# |
|
98 |
# This feature detects long-running statements that may be indicative of |
|
99 |
# a database outage problem. If this feature is turned on, it will log any |
|
100 |
# statement that surpasses the configurable time boundary during its execution. |
|
101 |
# When this feature is enabled, no other statements are logged except the long |
|
102 |
# running statements. The interval property is the boundary time set in seconds. |
|
103 |
# For example, if this is set to 2, then any statement requiring at least 2 |
|
104 |
# seconds will be logged. Note that the same statement will continue to be logged |
|
105 |
# for as long as it executes. So if the interval is set to 2, and the query takes |
|
106 |
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). |
|
107 |
# |
|
108 |
# outagedetection=true|false |
|
109 |
# outagedetectioninterval=integer time (seconds) |
|
110 |
# |
|
111 |
outagedetection=false |
|
112 |
outagedetectioninterval= |
|
113 |
|
|
114 |
################################################################ |
|
115 |
# COMMON PROPERTIES # |
|
116 |
################################################################ |
|
117 |
|
|
118 |
# filter what is logged |
|
119 |
filter=false |
|
120 |
|
|
121 |
# comma separated list of tables to include when filtering |
|
122 |
include = |
|
123 |
# comma separated list of tables to exclude when filtering |
|
124 |
exclude = |
|
125 |
|
|
126 |
# sql expression to evaluate if using regex filtering |
|
127 |
sqlexpression = |
|
128 |
|
|
129 |
|
|
130 |
# turn on tracing |
|
131 |
autoflush = true |
|
132 |
|
|
133 |
# sets the date format using Java's SimpleDateFormat routine |
|
134 |
dateformat= |
|
135 |
|
|
136 |
#list of categories to explicitly include |
|
137 |
includecategories= |
|
138 |
|
|
139 |
#list of categories to exclude: error, info, batch, debug, statement, |
|
140 |
#commit, rollback and result are valid values |
|
141 |
excludecategories=info,debug,result,batch |
|
142 |
|
|
143 |
|
|
144 |
#allows you to use a regex engine or your own matching engine to determine |
|
145 |
#which statements to log |
|
146 |
# |
|
147 |
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher |
|
148 |
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher |
|
149 |
stringmatcher= |
|
150 |
|
|
151 |
# prints a stack trace for every statement logged |
|
152 |
stacktrace=false |
|
153 |
# if stacktrace=true, specifies the stack trace to print |
|
154 |
stacktraceclass= |
|
155 |
|
|
156 |
# determines if property file should be reloaded |
|
157 |
reloadproperties=false |
|
158 |
# determines how often should be reloaded in seconds |
|
159 |
reloadpropertiesinterval=60 |
|
160 |
|
|
161 |
#if=true then url must be prefixed with p6spy: |
|
162 |
useprefix=false |
|
163 |
|
|
164 |
#specifies the appender to use for logging |
|
165 |
#appender=com.p6spy.engine.spy.appender.Log4jLogger |
|
166 |
#appender=com.p6spy.engine.spy.appender.StdoutLogger |
|
167 |
appender=com.p6spy.engine.spy.appender.FileLogger |
|
168 |
|
|
169 |
# name of logfile to use, note Windows users should make sure to use forward slashes in their |
|
170 |
# pathname (e:/test/spy.log) (used for file logger only) defaults to spy.log |
|
171 |
#logfile = /home/andreas/tmp/p6spy.log |
|
172 |
|
|
173 |
# append to the p6spy log file. if this is set to false the |
|
174 |
# log file is truncated every time. (file logger only) |
|
175 |
append=false |
|
176 |
|
|
177 |
#The following are for log4j logging only |
|
178 |
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender |
|
179 |
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout |
|
180 |
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n |
|
181 |
|
|
182 |
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender |
|
183 |
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost |
|
184 |
#log4j.appender.CHAINSAW_CLIENT.Port=4445 |
|
185 |
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true |
|
186 |
|
|
187 |
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender |
|
188 |
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=192.168.1.220 |
|
189 |
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost |
|
190 |
log4j.appender.SQLPROFILER_CLIENT.Port=4445 |
|
191 |
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true |
|
192 |
|
|
193 |
|
|
194 |
log4j.logger.p6spy=INFO,STDOUT |
|
195 |
#log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT |
|
196 |
|
|
197 |
|
|
198 |
################################################################# |
|
199 |
# DataSource replacement # |
|
200 |
# # |
|
201 |
# Replace the real DataSource class in your application server # |
|
202 |
# configuration with the name com.p6spy.engine.spy.P6DataSource,# |
|
203 |
# then add the JNDI name and class name of the real # |
|
204 |
# DataSource here # |
|
205 |
# # |
|
206 |
# Values set in this item cannot be reloaded using the # |
|
207 |
# reloadproperties variable. Once it is loaded, it remains # |
|
208 |
# in memory until the application is restarted. # |
|
209 |
# # |
|
210 |
################################################################# |
|
211 |
#realdatasource=/RealMySqlDS |
|
212 |
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource |
|
213 |
|
|
214 |
################################################################# |
|
215 |
# DataSource properties # |
|
216 |
# # |
|
217 |
# If you are using the DataSource support to intercept calls # |
|
218 |
# to a DataSource that requires properties for proper setup, # |
|
219 |
# define those properties here. Use name value pairs, separate # |
|
220 |
# the name and value with a semicolon, and separate the # |
|
221 |
# pairs with commas. # |
|
222 |
# # |
|
223 |
# The example shown here is for mysql # |
|
224 |
# # |
|
225 |
################################################################# |
|
226 |
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb |
|
227 |
|
|
228 |
|
|
229 |
################################################################# |
|
230 |
# JNDI DataSource lookup # |
|
231 |
# # |
|
232 |
# If you are using the DataSource support outside of an app # |
|
233 |
# server, you will probably need to define the JNDI Context # |
|
234 |
# environment. # |
|
235 |
# # |
|
236 |
# If the P6Spy code will be executing inside an app server then # |
|
237 |
# do not use these properties, and the DataSource lookup will # |
|
238 |
# use the naming context defined by the app server. # |
|
239 |
# # |
|
240 |
# The two standard elements of the naming environment are # |
|
241 |
# jndicontextfactory and jndicontextproviderurl. If you need # |
|
242 |
# additional elements, use the jndicontextcustom property. # |
|
243 |
# You can define multiple properties in jndicontextcustom, # |
|
244 |
# in name value pairs. Separate the name and value with a # |
|
245 |
# semicolon, and separate the pairs with commas. # |
|
246 |
# # |
|
247 |
# The example shown here is for a standalone program running on # |
|
248 |
# a machine that is also running JBoss, so the JDNI context # |
|
249 |
# is configured for JBoss (3.0.4). # |
|
250 |
# # |
|
251 |
################################################################# |
|
252 |
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory |
|
253 |
#jndicontextproviderurl=localhost:1099 |
|
254 |
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces |
|
255 |
|
|
256 |
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory |
|
257 |
#jndicontextproviderurl=iiop://localhost:900 |
cdmlib-persistence/pom.xml | ||
---|---|---|
335 | 335 |
<artifactId>h2</artifactId> |
336 | 336 |
</dependency> |
337 | 337 |
|
338 |
<!-- SQL Debugging --> |
|
339 |
<dependency> |
|
340 |
<groupId>p6spy</groupId> |
|
341 |
<artifactId>p6spy</artifactId> |
|
342 |
</dependency> |
|
343 | 338 |
|
344 | 339 |
<!-- Profiling --> |
345 | 340 |
<!-- <dependency> --> |
cdmlib-persistence/src/main/resources/spy.properties | ||
---|---|---|
1 |
################################################################# |
|
2 |
# P6Spy Options File # |
|
3 |
# See documentation for detailed instructions # |
|
4 |
################################################################# |
|
5 |
|
|
6 |
################################################################# |
|
7 |
# MODULES # |
|
8 |
# # |
|
9 |
# Modules provide the P6Spy functionality. If a module, such # |
|
10 |
# as module_log is commented out, that functionality will not # |
|
11 |
# be available. If it is not commented out (if it is active), # |
|
12 |
# the functionality will be active. # |
|
13 |
# # |
|
14 |
# Values set in Modules cannot be reloaded using the # |
|
15 |
# reloadproperties variable. Once they are loaded, they remain # |
|
16 |
# in memory until the application is restarted. # |
|
17 |
# # |
|
18 |
################################################################# |
|
19 |
|
|
20 |
module.log=com.p6spy.engine.logging.P6LogFactory |
|
21 |
#module.outage=com.p6spy.engine.outage.P6OutageFactory |
|
22 |
|
|
23 |
################################################################# |
|
24 |
# REALDRIVER(s) # |
|
25 |
# # |
|
26 |
# In your application server configuration file you replace the # |
|
27 |
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is # |
|
28 |
# where you put the name of your real driver P6Spy can find and # |
|
29 |
# register your real driver to do the database work. # |
|
30 |
# # |
|
31 |
# If your application uses several drivers specify them in # |
|
32 |
# realdriver2, realdriver3. See the documentation for more # |
|
33 |
# details. # |
|
34 |
# # |
|
35 |
# Values set in REALDRIVER(s) cannot be reloaded using the # |
|
36 |
# reloadproperties variable. Once they are loaded, they remain # |
|
37 |
# in memory until the application is restarted. # |
|
38 |
# # |
|
39 |
################################################################# |
|
40 |
|
|
41 |
# oracle driver |
|
42 |
# realdriver=oracle.jdbc.driver.OracleDriver |
|
43 |
|
|
44 |
# mysql Connector/J driver |
|
45 |
realdriver=com.mysql.jdbc.Driver |
|
46 |
|
|
47 |
# informix driver |
|
48 |
# realdriver=com.informix.jdbc.IfxDriver |
|
49 |
|
|
50 |
# ibm db2 driver |
|
51 |
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver |
|
52 |
|
|
53 |
# the mysql open source driver |
|
54 |
#realdriver=org.gjt.mm.mysql.Driver |
|
55 |
#realdriver=com.mysql.jdbc.Driver |
|
56 |
#realdriver=org.h2.Driver |
|
57 |
|
|
58 |
#specifies another driver to use |
|
59 |
realdriver2= |
|
60 |
#specifies a third driver to use |
|
61 |
realdriver3= |
|
62 |
|
|
63 |
|
|
64 |
#the DriverManager class sequentially tries every driver that is |
|
65 |
#registered to find the right driver. In some instances, it's possible to |
|
66 |
#load up the realdriver before the p6spy driver, in which case your connections |
|
67 |
#will not get wrapped as the realdriver will "steal" the connection before |
|
68 |
#p6spy sees it. Set the following property to "true" to cause p6spy to |
|
69 |
#explicitily deregister the realdrivers |
|
70 |
deregisterdrivers=true |
|
71 |
|
|
72 |
################################################################ |
|
73 |
# P6LOG SPECIFIC PROPERTIES # |
|
74 |
################################################################ |
|
75 |
# no properties currently available |
|
76 |
|
|
77 |
################################################################ |
|
78 |
# EXECUTION THRESHOLD PROPERTIES # |
|
79 |
################################################################ |
|
80 |
# This feature applies to the standard logging of P6Spy. # |
|
81 |
# While the standard logging logs out every statement # |
|
82 |
# regardless of its execution time, this feature puts a time # |
|
83 |
# condition on that logging. Only statements that have taken # |
|
84 |
# longer than the time specified (in milliseconds) will be # |
|
85 |
# logged. This way it is possible to see only statements that # |
|
86 |
# have exceeded some high water mark. # |
|
87 |
# This time is reloadable. # |
|
88 |
# |
|
89 |
# executionthreshold=integer time (milliseconds) |
|
90 |
# |
|
91 |
executionthreshold= |
|
92 |
|
|
93 |
################################################################ |
|
94 |
# P6OUTAGE SPECIFIC PROPERTIES # |
|
95 |
################################################################ |
|
96 |
# Outage Detection |
|
97 |
# |
|
98 |
# This feature detects long-running statements that may be indicative of |
|
99 |
# a database outage problem. If this feature is turned on, it will log any |
|
100 |
# statement that surpasses the configurable time boundary during its execution. |
|
101 |
# When this feature is enabled, no other statements are logged except the long |
|
102 |
# running statements. The interval property is the boundary time set in seconds. |
|
103 |
# For example, if this is set to 2, then any statement requiring at least 2 |
|
104 |
# seconds will be logged. Note that the same statement will continue to be logged |
|
105 |
# for as long as it executes. So if the interval is set to 2, and the query takes |
|
106 |
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). |
|
107 |
# |
|
108 |
# outagedetection=true|false |
|
109 |
# outagedetectioninterval=integer time (seconds) |
|
110 |
# |
|
111 |
outagedetection=false |
|
112 |
outagedetectioninterval= |
|
113 |
|
|
114 |
################################################################ |
|
115 |
# COMMON PROPERTIES # |
|
116 |
################################################################ |
|
117 |
|
|
118 |
# filter what is logged |
|
119 |
filter=false |
|
120 |
|
|
121 |
# comma separated list of tables to include when filtering |
|
122 |
include = |
|
123 |
# comma separated list of tables to exclude when filtering |
|
124 |
exclude = |
|
125 |
|
|
126 |
# sql expression to evaluate if using regex filtering |
|
127 |
sqlexpression = |
|
128 |
|
|
129 |
|
|
130 |
# turn on tracing |
|
131 |
autoflush = true |
|
132 |
|
|
133 |
# sets the date format using Java's SimpleDateFormat routine |
|
134 |
dateformat= |
|
135 |
|
|
136 |
#list of categories to explicitly include |
|
137 |
includecategories= |
|
138 |
|
|
139 |
#list of categories to exclude: error, info, batch, debug, statement, |
|
140 |
#commit, rollback and result are valid values |
|
141 |
excludecategories=info,debug,result,batch |
|
142 |
|
|
143 |
|
|
144 |
#allows you to use a regex engine or your own matching engine to determine |
|
145 |
#which statements to log |
|
146 |
# |
|
147 |
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher |
|
148 |
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher |
|
149 |
stringmatcher= |
|
150 |
|
|
151 |
# prints a stack trace for every statement logged |
|
152 |
stacktrace=false |
|
153 |
# if stacktrace=true, specifies the stack trace to print |
|
154 |
stacktraceclass= |
|
155 |
|
|
156 |
# determines if property file should be reloaded |
|
157 |
reloadproperties=false |
|
158 |
# determines how often should be reloaded in seconds |
|
159 |
reloadpropertiesinterval=60 |
|
160 |
|
|
161 |
#if=true then url must be prefixed with p6spy: |
|
162 |
useprefix=false |
|
163 |
|
|
164 |
#specifies the appender to use for logging |
|
165 |
#appender=com.p6spy.engine.spy.appender.Log4jLogger |
|
166 |
#appender=com.p6spy.engine.spy.appender.StdoutLogger |
|
167 |
appender=com.p6spy.engine.spy.appender.FileLogger |
|
168 |
|
|
169 |
# name of logfile to use, note Windows users should make sure to use forward slashes in their |
|
170 |
# pathname (e:/test/spy.log) (used for file logger only) defaults to spy.log |
|
171 |
#logfile = /home/andreas/tmp/p6spy.log |
|
172 |
|
|
173 |
# append to the p6spy log file. if this is set to false the |
|
174 |
# log file is truncated every time. (file logger only) |
|
175 |
append=false |
|
176 |
|
|
177 |
#The following are for log4j logging only |
|
178 |
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender |
|
179 |
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout |
|
180 |
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n |
|
181 |
|
|
182 |
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender |
|
183 |
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost |
|
184 |
#log4j.appender.CHAINSAW_CLIENT.Port=4445 |
|
185 |
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true |
|
186 |
|
|
187 |
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender |
|
188 |
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=192.168.1.220 |
|
189 |
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost |
|
190 |
log4j.appender.SQLPROFILER_CLIENT.Port=4445 |
|
191 |
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true |
|
192 |
|
|
193 |
|
|
194 |
log4j.logger.p6spy=INFO,STDOUT |
|
195 |
#log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT |
|
196 |
|
|
197 |
|
|
198 |
################################################################# |
|
199 |
# DataSource replacement # |
|
200 |
# # |
|
201 |
# Replace the real DataSource class in your application server # |
|
202 |
# configuration with the name com.p6spy.engine.spy.P6DataSource,# |
|
203 |
# then add the JNDI name and class name of the real # |
|
204 |
# DataSource here # |
|
205 |
# # |
|
206 |
# Values set in this item cannot be reloaded using the # |
|
207 |
# reloadproperties variable. Once it is loaded, it remains # |
|
208 |
# in memory until the application is restarted. # |
|
209 |
# # |
|
210 |
################################################################# |
|
211 |
#realdatasource=/RealMySqlDS |
|
212 |
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource |
|
213 |
|
|
214 |
################################################################# |
|
215 |
# DataSource properties # |
|
216 |
# # |
|
217 |
# If you are using the DataSource support to intercept calls # |
|
218 |
# to a DataSource that requires properties for proper setup, # |
|
219 |
# define those properties here. Use name value pairs, separate # |
|
220 |
# the name and value with a semicolon, and separate the # |
|
221 |
# pairs with commas. # |
|
222 |
# # |
|
223 |
# The example shown here is for mysql # |
|
224 |
# # |
|
225 |
################################################################# |
|
226 |
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb |
|
227 |
|
|
228 |
|
|
229 |
################################################################# |
|
230 |
# JNDI DataSource lookup # |
|
231 |
# # |
|
232 |
# If you are using the DataSource support outside of an app # |
|
233 |
# server, you will probably need to define the JNDI Context # |
|
234 |
# environment. # |
|
235 |
# # |
|
236 |
# If the P6Spy code will be executing inside an app server then # |
|
237 |
# do not use these properties, and the DataSource lookup will # |
|
238 |
# use the naming context defined by the app server. # |
|
239 |
# # |
|
240 |
# The two standard elements of the naming environment are # |
|
241 |
# jndicontextfactory and jndicontextproviderurl. If you need # |
|
242 |
# additional elements, use the jndicontextcustom property. # |
|
243 |
# You can define multiple properties in jndicontextcustom, # |
|
244 |
# in name value pairs. Separate the name and value with a # |
|
245 |
# semicolon, and separate the pairs with commas. # |
|
246 |
# # |
|
247 |
# The example shown here is for a standalone program running on # |
|
248 |
# a machine that is also running JBoss, so the JDNI context # |
|
249 |
# is configured for JBoss (3.0.4). # |
|
250 |
# # |
|
251 |
################################################################# |
|
252 |
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory |
|
253 |
#jndicontextproviderurl=localhost:1099 |
|
254 |
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces |
|
255 |
|
|
256 |
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory |
|
257 |
#jndicontextproviderurl=iiop://localhost:900 |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/p6spy.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xmlns:tx="http://www.springframework.org/schema/tx" |
|
5 |
xmlns:context="http://www.springframework.org/schema/context" |
|
6 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd |
|
7 |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd |
|
8 |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd |
|
9 |
"> |
|
10 |
|
|
11 |
<!-- |
|
12 |
see also /cdmlib-remote/src/main/resources/spy.properties in which P6Spy is configured |
|
13 |
important properities are: |
|
14 |
realdriver=com.mysql.jdbc.Driver |
|
15 |
log4j.logger.p6spy=INFO,STDOUT |
|
16 |
log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT |
|
17 |
log4j.appender.SQLPROFILER_CLIENT.RemoteHost = |
|
18 |
|
|
19 |
you can use sqlprofiler as SQLPROFILER_CLIENT |
|
20 |
--> |
|
21 |
<bean id="dataSource" lazy-init="true" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> |
|
22 |
<property name="driverClassName" value="com.p6spy.engine.spy.P6SpyDriver"/> |
|
23 |
<property name="username" value="${local.usr}"/> |
|
24 |
<property name="password" value="${local.pwd}"/> |
|
25 |
<property name="url" value="jdbc:mysql://${local.host}/cdm_local_cichorieae"/> |
|
26 |
</bean> |
|
27 |
|
|
28 |
|
|
29 |
<!-- This configures default properties, which can overridden with the file specified by the location property --> |
|
30 |
<bean id="hibernateProperties" |
|
31 |
class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
|
32 |
<property name="properties"> |
|
33 |
<props> |
|
34 |
<prop key="hibernate.hbm2ddl.auto">validate</prop> |
|
35 |
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> |
|
36 |
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.internal.NoCachingRegionFactory</prop> |
|
37 |
<prop key="hibernate.show_sql">false</prop> |
|
38 |
<prop key="hibernate.format_sql">false</prop> |
|
39 |
</props> |
|
40 |
</property> |
|
41 |
</bean> |
|
42 |
|
|
43 |
|
|
44 |
</beans> |
cdmlib-remote-webapp/src/main/webapp/WEB-INF/datasources/routing-datasource.xml | ||
---|---|---|
16 | 16 |
eu.etaxonomy.cdm.database.DataSourceBeanLoader |
17 | 17 |
|
18 | 18 |
--> |
19 |
<!-- The property defaultDatasourceName defaults to "default" |
|
20 |
<property name="beanDefinitionFile" value="datasources-p6spy.xml" /> |
|
21 |
<property name="defaultDatasourceName" value="cichorieae" /> |
|
22 |
--> |
|
23 | 19 |
</bean> |
24 | 20 |
|
25 | 21 |
<!-- This configures default properties, which can overridden with the file specified by the location property --> |
cdmlib-remote/pom.xml | ||
---|---|---|
211 | 211 |
<groupId>org.hibernate</groupId> |
212 | 212 |
<artifactId>hibernate-c3p0</artifactId> |
213 | 213 |
</dependency> |
214 |
|
|
215 |
<!-- SQL Debugging --> |
|
216 |
<dependency> |
|
217 |
<groupId>p6spy</groupId> |
|
218 |
<artifactId>p6spy</artifactId> |
|
219 |
</dependency> |
|
220 | 214 |
</dependencies> |
221 |
|
|
222 | 215 |
<build> |
223 | 216 |
<plugins> |
224 | 217 |
<plugin> |
cdmlib-services/pom.xml | ||
---|---|---|
93 | 93 |
<!-- <scope>test</scope> --> |
94 | 94 |
<!-- </dependency> --> |
95 | 95 |
<!-- <dependency> --> |
96 |
<!-- <groupId>p6spy</groupId> --> |
|
97 |
<!-- <artifactId>p6spy</artifactId> --> |
|
98 |
<!-- <scope>test</scope> --> |
|
99 |
<!-- </dependency> --> |
|
100 |
<!-- <dependency> --> |
|
101 | 96 |
<!-- <groupId>xmlunit</groupId> --> |
102 | 97 |
<!-- <artifactId>xmlunit</artifactId> --> |
103 | 98 |
<!-- <scope>test</scope> --> |
cdmlib-services/src/main/resources/spy.properties | ||
---|---|---|
1 |
################################################################# |
|
2 |
# P6Spy Options File # |
|
3 |
# See documentation for detailed instructions # |
|
4 |
################################################################# |
|
5 |
|
|
6 |
################################################################# |
|
7 |
# MODULES # |
|
8 |
# # |
|
9 |
# Modules provide the P6Spy functionality. If a module, such # |
|
10 |
# as module_log is commented out, that functionality will not # |
|
11 |
# be available. If it is not commented out (if it is active), # |
|
12 |
# the functionality will be active. # |
|
13 |
# # |
|
14 |
# Values set in Modules cannot be reloaded using the # |
|
15 |
# reloadproperties variable. Once they are loaded, they remain # |
|
16 |
# in memory until the application is restarted. # |
|
17 |
# # |
|
18 |
################################################################# |
|
19 |
|
|
20 |
module.log=com.p6spy.engine.logging.P6LogFactory |
|
21 |
#module.outage=com.p6spy.engine.outage.P6OutageFactory |
|
22 |
|
|
23 |
################################################################# |
|
24 |
# REALDRIVER(s) # |
|
25 |
# # |
|
26 |
# In your application server configuration file you replace the # |
|
27 |
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is # |
|
28 |
# where you put the name of your real driver P6Spy can find and # |
|
29 |
# register your real driver to do the database work. # |
|
30 |
# # |
|
31 |
# If your application uses several drivers specify them in # |
|
32 |
# realdriver2, realdriver3. See the documentation for more # |
|
33 |
# details. # |
|
34 |
# # |
|
35 |
# Values set in REALDRIVER(s) cannot be reloaded using the # |
|
36 |
# reloadproperties variable. Once they are loaded, they remain # |
|
37 |
# in memory until the application is restarted. # |
|
38 |
# # |
|
39 |
################################################################# |
|
40 |
|
|
41 |
# oracle driver |
|
42 |
# realdriver=oracle.jdbc.driver.OracleDriver |
|
43 |
|
|
44 |
# mysql Connector/J driver |
|
45 |
# realdriver=com.mysql.jdbc.Driver |
|
46 |
|
|
47 |
# informix driver |
|
48 |
# realdriver=com.informix.jdbc.IfxDriver |
|
49 |
|
|
50 |
# ibm db2 driver |
|
51 |
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver |
|
52 |
|
|
53 |
# the mysql open source driver |
|
54 |
#realdriver=org.gjt.mm.mysql.Driver |
|
55 |
#realdriver=com.mysql.jdbc.Driver |
|
56 |
realdriver=org.h2.Driver |
|
57 |
|
|
58 |
#specifies another driver to use |
|
59 |
realdriver2= |
|
60 |
#specifies a third driver to use |
|
61 |
realdriver3= |
|
62 |
|
|
63 |
|
|
64 |
#the DriverManager class sequentially tries every driver that is |
|
65 |
#registered to find the right driver. In some instances, it's possible to |
|
66 |
#load up the realdriver before the p6spy driver, in which case your connections |
|
67 |
#will not get wrapped as the realdriver will "steal" the connection before |
|
68 |
#p6spy sees it. Set the following property to "true" to cause p6spy to |
|
69 |
#explicitily deregister the realdrivers |
|
70 |
deregisterdrivers=true |
|
71 |
|
|
72 |
################################################################ |
|
73 |
# P6LOG SPECIFIC PROPERTIES # |
|
74 |
################################################################ |
|
75 |
# no properties currently available |
|
76 |
|
|
77 |
################################################################ |
|
78 |
# EXECUTION THRESHOLD PROPERTIES # |
|
79 |
################################################################ |
|
80 |
# This feature applies to the standard logging of P6Spy. # |
|
81 |
# While the standard logging logs out every statement # |
|
82 |
# regardless of its execution time, this feature puts a time # |
|
83 |
# condition on that logging. Only statements that have taken # |
|
84 |
# longer than the time specified (in milliseconds) will be # |
|
85 |
# logged. This way it is possible to see only statements that # |
|
86 |
# have exceeded some high water mark. # |
|
87 |
# This time is reloadable. # |
|
88 |
# |
|
89 |
# executionthreshold=integer time (milliseconds) |
|
90 |
# |
|
91 |
executionthreshold= |
|
92 |
|
|
93 |
################################################################ |
|
94 |
# P6OUTAGE SPECIFIC PROPERTIES # |
|
95 |
################################################################ |
|
96 |
# Outage Detection |
|
97 |
# |
|
98 |
# This feature detects long-running statements that may be indicative of |
|
99 |
# a database outage problem. If this feature is turned on, it will log any |
|
100 |
# statement that surpasses the configurable time boundary during its execution. |
|
101 |
# When this feature is enabled, no other statements are logged except the long |
|
102 |
# running statements. The interval property is the boundary time set in seconds. |
|
103 |
# For example, if this is set to 2, then any statement requiring at least 2 |
|
104 |
# seconds will be logged. Note that the same statement will continue to be logged |
|
105 |
# for as long as it executes. So if the interval is set to 2, and the query takes |
|
106 |
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). |
|
107 |
# |
|
108 |
# outagedetection=true|false |
|
109 |
# outagedetectioninterval=integer time (seconds) |
|
110 |
# |
|
111 |
outagedetection=false |
|
112 |
outagedetectioninterval= |
|
113 |
|
|
114 |
################################################################ |
|
115 |
# COMMON PROPERTIES # |
|
116 |
################################################################ |
|
117 |
|
|
118 |
# filter what is logged |
|
119 |
filter=false |
|
120 |
|
|
121 |
# comma separated list of tables to include when filtering |
|
122 |
include = |
|
123 |
# comma separated list of tables to exclude when filtering |
|
124 |
exclude = |
|
125 |
|
|
126 |
# sql expression to evaluate if using regex filtering |
|
127 |
sqlexpression = |
|
128 |
|
|
129 |
|
|
130 |
# turn on tracing |
|
131 |
autoflush = true |
|
132 |
|
|
133 |
# sets the date format using Java's SimpleDateFormat routine |
|
134 |
dateformat= |
|
135 |
|
|
136 |
#list of categories to explicitly include |
|
137 |
includecategories= |
|
138 |
|
|
139 |
#list of categories to exclude: error, info, batch, debug, statement, |
|
140 |
#commit, rollback and result are valid values |
|
141 |
excludecategories=info,debug,result,batch |
|
142 |
|
|
143 |
|
|
144 |
#allows you to use a regex engine or your own matching engine to determine |
|
145 |
#which statements to log |
|
146 |
# |
|
147 |
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher |
|
148 |
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher |
|
149 |
stringmatcher= |
|
150 |
|
|
151 |
# prints a stack trace for every statement logged |
|
152 |
stacktrace=false |
|
153 |
# if stacktrace=true, specifies the stack trace to print |
|
154 |
stacktraceclass= |
|
155 |
|
|
156 |
# determines if property file should be reloaded |
|
157 |
reloadproperties=false |
|
158 |
# determines how often should be reloaded in seconds |
|
159 |
reloadpropertiesinterval=60 |
|
160 |
|
|
161 |
#if=true then url must be prefixed with p6spy: |
|
162 |
useprefix=false |
|
163 |
|
|
164 |
#specifies the appender to use for logging |
|
165 |
#appender=com.p6spy.engine.spy.appender.Log4jLogger |
|
166 |
#appender=com.p6spy.engine.spy.appender.StdoutLogger |
|
167 |
appender=com.p6spy.engine.spy.appender.FileLogger |
|
168 |
|
|
169 |
# name of logfile to use, note Windows users should make sure to use forward slashes in their |
|
170 |
# pathname (e:/test/spy.log) (used for file logger only) defaults to spy.log |
|
171 |
#logfile = /home/andreas/tmp/p6spy.log |
|
172 |
|
|
173 |
# append to the p6spy log file. if this is set to false the |
|
174 |
# log file is truncated every time. (file logger only) |
|
175 |
append=false |
|
176 |
|
|
177 |
#The following are for log4j logging only |
|
178 |
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender |
|
179 |
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout |
|
180 |
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n |
|
181 |
|
|
182 |
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender |
|
183 |
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost |
|
184 |
#log4j.appender.CHAINSAW_CLIENT.Port=4445 |
|
185 |
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true |
|
186 |
|
|
187 |
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender |
|
188 |
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=192.168.1.220 |
|
189 |
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost |
|
190 |
log4j.appender.SQLPROFILER_CLIENT.Port=4445 |
|
191 |
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true |
|
192 |
|
|
193 |
|
|
194 |
log4j.logger.p6spy=INFO,STDOUT |
|
195 |
#log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT |
|
196 |
|
|
197 |
|
|
198 |
################################################################# |
|
199 |
# DataSource replacement # |
|
200 |
# # |
|
201 |
# Replace the real DataSource class in your application server # |
|
202 |
# configuration with the name com.p6spy.engine.spy.P6DataSource,# |
|
203 |
# then add the JNDI name and class name of the real # |
|
204 |
# DataSource here # |
|
205 |
# # |
|
206 |
# Values set in this item cannot be reloaded using the # |
|
207 |
# reloadproperties variable. Once it is loaded, it remains # |
|
208 |
# in memory until the application is restarted. # |
|
209 |
# # |
|
210 |
################################################################# |
|
211 |
#realdatasource=/RealMySqlDS |
|
212 |
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource |
|
213 |
|
|
214 |
################################################################# |
|
215 |
# DataSource properties # |
|
216 |
# # |
|
217 |
# If you are using the DataSource support to intercept calls # |
|
218 |
# to a DataSource that requires properties for proper setup, # |
|
219 |
# define those properties here. Use name value pairs, separate # |
|
220 |
# the name and value with a semicolon, and separate the # |
|
221 |
# pairs with commas. # |
|
222 |
# # |
|
223 |
# The example shown here is for mysql # |
|
224 |
# # |
|
225 |
################################################################# |
|
226 |
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb |
|
227 |
|
|
228 |
|
|
229 |
################################################################# |
|
230 |
# JNDI DataSource lookup # |
|
231 |
# # |
|
232 |
# If you are using the DataSource support outside of an app # |
|
233 |
# server, you will probably need to define the JNDI Context # |
|
234 |
# environment. # |
|
235 |
# # |
|
236 |
# If the P6Spy code will be executing inside an app server then # |
|
237 |
# do not use these properties, and the DataSource lookup will # |
|
238 |
# use the naming context defined by the app server. # |
|
239 |
# # |
|
240 |
# The two standard elements of the naming environment are # |
|
241 |
# jndicontextfactory and jndicontextproviderurl. If you need # |
|
242 |
# additional elements, use the jndicontextcustom property. # |
|
243 |
# You can define multiple properties in jndicontextcustom, # |
|
244 |
# in name value pairs. Separate the name and value with a # |
|
245 |
# semicolon, and separate the pairs with commas. # |
|
246 |
# # |
|
247 |
# The example shown here is for a standalone program running on # |
|
248 |
# a machine that is also running JBoss, so the JDNI context # |
|
249 |
# is configured for JBoss (3.0.4). # |
|
250 |
# # |
|
251 |
################################################################# |
|
252 |
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory |
|
253 |
#jndicontextproviderurl=localhost:1099 |
|
254 |
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces |
|
255 |
|
|
256 |
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory |
|
257 |
#jndicontextproviderurl=iiop://localhost:900 |
cdmlib-services/src/test/resources/spy.properties | ||
---|---|---|
1 |
################################################################# |
|
2 |
# P6Spy Options File # |
|
3 |
# See documentation for detailed instructions # |
|
4 |
################################################################# |
|
5 |
|
|
6 |
################################################################# |
|
7 |
# MODULES # |
|
8 |
# # |
|
9 |
# Modules provide the P6Spy functionality. If a module, such # |
|
10 |
# as module_log is commented out, that functionality will not # |
|
11 |
# be available. If it is not commented out (if it is active), # |
|
12 |
# the functionality will be active. # |
|
13 |
# # |
|
14 |
# Values set in Modules cannot be reloaded using the # |
|
15 |
# reloadproperties variable. Once they are loaded, they remain # |
|
16 |
# in memory until the application is restarted. # |
|
17 |
# # |
|
18 |
################################################################# |
|
19 |
|
|
20 |
module.log=com.p6spy.engine.logging.P6LogFactory |
|
21 |
#module.outage=com.p6spy.engine.outage.P6OutageFactory |
|
22 |
|
|
23 |
################################################################# |
|
24 |
# REALDRIVER(s) # |
|
25 |
# # |
|
26 |
# In your application server configuration file you replace the # |
|
27 |
# "real driver" name with com.p6spy.engine.P6SpyDriver. This is # |
|
28 |
# where you put the name of your real driver P6Spy can find and # |
|
29 |
# register your real driver to do the database work. # |
|
30 |
# # |
|
31 |
# If your application uses several drivers specify them in # |
|
32 |
# realdriver2, realdriver3. See the documentation for more # |
|
33 |
# details. # |
|
34 |
# # |
|
35 |
# Values set in REALDRIVER(s) cannot be reloaded using the # |
|
36 |
# reloadproperties variable. Once they are loaded, they remain # |
|
37 |
# in memory until the application is restarted. # |
|
38 |
# # |
|
39 |
################################################################# |
|
40 |
|
|
41 |
# oracle driver |
|
42 |
# realdriver=oracle.jdbc.driver.OracleDriver |
|
43 |
|
|
44 |
# mysql Connector/J driver |
|
45 |
# realdriver=com.mysql.jdbc.Driver |
|
46 |
|
|
47 |
# informix driver |
|
48 |
# realdriver=com.informix.jdbc.IfxDriver |
|
49 |
|
|
50 |
# ibm db2 driver |
|
51 |
# realdriver=COM.ibm.db2.jdbc.net.DB2Driver |
|
52 |
|
|
53 |
# the mysql open source driver |
|
54 |
#realdriver=org.gjt.mm.mysql.Driver |
|
55 |
#realdriver=com.mysql.jdbc.Driver |
|
56 |
realdriver=org.h2.Driver |
|
57 |
|
|
58 |
#specifies another driver to use |
|
59 |
realdriver2= |
|
60 |
#specifies a third driver to use |
|
61 |
realdriver3= |
|
62 |
|
|
63 |
|
|
64 |
#the DriverManager class sequentially tries every driver that is |
|
65 |
#registered to find the right driver. In some instances, it's possible to |
|
66 |
#load up the realdriver before the p6spy driver, in which case your connections |
|
67 |
#will not get wrapped as the realdriver will "steal" the connection before |
|
68 |
#p6spy sees it. Set the following property to "true" to cause p6spy to |
|
69 |
#explicitily deregister the realdrivers |
|
70 |
deregisterdrivers=true |
|
71 |
|
|
72 |
################################################################ |
|
73 |
# P6LOG SPECIFIC PROPERTIES # |
|
74 |
################################################################ |
|
75 |
# no properties currently available |
|
76 |
|
|
77 |
################################################################ |
|
78 |
# EXECUTION THRESHOLD PROPERTIES # |
|
79 |
################################################################ |
|
80 |
# This feature applies to the standard logging of P6Spy. # |
|
81 |
# While the standard logging logs out every statement # |
|
82 |
# regardless of its execution time, this feature puts a time # |
|
83 |
# condition on that logging. Only statements that have taken # |
|
84 |
# longer than the time specified (in milliseconds) will be # |
|
85 |
# logged. This way it is possible to see only statements that # |
|
86 |
# have exceeded some high water mark. # |
|
87 |
# This time is reloadable. # |
|
88 |
# |
|
89 |
# executionthreshold=integer time (milliseconds) |
|
90 |
# |
|
91 |
executionthreshold= |
|
92 |
|
|
93 |
################################################################ |
|
94 |
# P6OUTAGE SPECIFIC PROPERTIES # |
|
95 |
################################################################ |
|
96 |
# Outage Detection |
|
97 |
# |
|
98 |
# This feature detects long-running statements that may be indicative of |
|
99 |
# a database outage problem. If this feature is turned on, it will log any |
|
100 |
# statement that surpasses the configurable time boundary during its execution. |
|
101 |
# When this feature is enabled, no other statements are logged except the long |
|
102 |
# running statements. The interval property is the boundary time set in seconds. |
|
103 |
# For example, if this is set to 2, then any statement requiring at least 2 |
|
104 |
# seconds will be logged. Note that the same statement will continue to be logged |
|
105 |
# for as long as it executes. So if the interval is set to 2, and the query takes |
|
106 |
# 11 seconds, it will be logged 5 times (at the 2, 4, 6, 8, 10 second intervals). |
|
107 |
# |
|
108 |
# outagedetection=true|false |
|
109 |
# outagedetectioninterval=integer time (seconds) |
|
110 |
# |
|
111 |
outagedetection=false |
|
112 |
outagedetectioninterval= |
|
113 |
|
|
114 |
################################################################ |
|
115 |
# COMMON PROPERTIES # |
|
116 |
################################################################ |
|
117 |
|
|
118 |
# filter what is logged |
|
119 |
filter=false |
|
120 |
|
|
121 |
# comma separated list of tables to include when filtering |
|
122 |
include = |
|
123 |
# comma separated list of tables to exclude when filtering |
|
124 |
exclude = |
|
125 |
|
|
126 |
# sql expression to evaluate if using regex filtering |
|
127 |
sqlexpression = |
|
128 |
|
|
129 |
|
|
130 |
# turn on tracing |
|
131 |
autoflush = true |
|
132 |
|
|
133 |
# sets the date format using Java's SimpleDateFormat routine |
|
134 |
dateformat= |
|
135 |
|
|
136 |
#list of categories to explicitly include |
|
137 |
includecategories= |
|
138 |
|
|
139 |
#list of categories to exclude: error, info, batch, debug, statement, |
|
140 |
#commit, rollback and result are valid values |
|
141 |
excludecategories=info,debug,result,batch |
|
142 |
|
|
143 |
|
|
144 |
#allows you to use a regex engine or your own matching engine to determine |
|
145 |
#which statements to log |
|
146 |
# |
|
147 |
#stringmatcher=com.p6spy.engine.common.GnuRegexMatcher |
|
148 |
#stringmatcher=com.p6spy.engine.common.JakartaRegexMatcher |
|
149 |
stringmatcher= |
|
150 |
|
|
151 |
# prints a stack trace for every statement logged |
|
152 |
stacktrace=false |
|
153 |
# if stacktrace=true, specifies the stack trace to print |
|
154 |
stacktraceclass= |
|
155 |
|
|
156 |
# determines if property file should be reloaded |
|
157 |
reloadproperties=false |
|
158 |
# determines how often should be reloaded in seconds |
|
159 |
reloadpropertiesinterval=60 |
|
160 |
|
|
161 |
#if=true then url must be prefixed with p6spy: |
|
162 |
useprefix=false |
|
163 |
|
|
164 |
#specifies the appender to use for logging |
|
165 |
#appender=com.p6spy.engine.spy.appender.Log4jLogger |
|
166 |
#appender=com.p6spy.engine.spy.appender.StdoutLogger |
|
167 |
appender=com.p6spy.engine.spy.appender.FileLogger |
|
168 |
|
|
169 |
# name of logfile to use, note Windows users should make sure to use forward slashes in their pathname (e:/test/spy.log) (used for file logger only) |
|
170 |
#logfile = /home/andreas/tmp/p6spy.log |
|
171 |
|
|
172 |
# append to the p6spy log file. if this is set to false the |
|
173 |
# log file is truncated every time. (file logger only) |
|
174 |
append=false |
|
175 |
|
|
176 |
#The following are for log4j logging only |
|
177 |
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender |
|
178 |
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout |
|
179 |
log4j.appender.STDOUT.layout.ConversionPattern=p6spy - %m%n |
|
180 |
|
|
181 |
#log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender |
|
182 |
#log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost |
|
183 |
#log4j.appender.CHAINSAW_CLIENT.Port=4445 |
|
184 |
#log4j.appender.CHAINSAW_CLIENT.LocationInfo=true |
|
185 |
|
|
186 |
log4j.appender.SQLPROFILER_CLIENT=org.apache.log4j.net.SocketAppender |
|
187 |
#log4j.appender.SQLPROFILER_CLIENT.RemoteHost=192.168.1.220 |
|
188 |
log4j.appender.SQLPROFILER_CLIENT.RemoteHost=localhost |
|
189 |
log4j.appender.SQLPROFILER_CLIENT.Port=4445 |
|
190 |
log4j.appender.SQLPROFILER_CLIENT.LocationInfo=true |
|
191 |
|
|
192 |
|
|
193 |
log4j.logger.p6spy=INFO,STDOUT |
|
194 |
#log4j.logger.p6spy=INFO, SQLPROFILER_CLIENT |
|
195 |
|
|
196 |
|
|
197 |
################################################################# |
|
198 |
# DataSource replacement # |
|
199 |
# # |
|
200 |
# Replace the real DataSource class in your application server # |
|
201 |
# configuration with the name com.p6spy.engine.spy.P6DataSource,# |
|
202 |
# then add the JNDI name and class name of the real # |
|
203 |
# DataSource here # |
|
204 |
# # |
|
205 |
# Values set in this item cannot be reloaded using the # |
|
206 |
# reloadproperties variable. Once it is loaded, it remains # |
|
207 |
# in memory until the application is restarted. # |
|
208 |
# # |
|
209 |
################################################################# |
|
210 |
#realdatasource=/RealMySqlDS |
|
211 |
#realdatasourceclass=com.mysql.jdbc.jdbc2.optional.MysqlDataSource |
|
212 |
|
|
213 |
################################################################# |
|
214 |
# DataSource properties # |
|
215 |
# # |
|
216 |
# If you are using the DataSource support to intercept calls # |
|
217 |
# to a DataSource that requires properties for proper setup, # |
|
218 |
# define those properties here. Use name value pairs, separate # |
|
219 |
# the name and value with a semicolon, and separate the # |
|
220 |
# pairs with commas. # |
|
221 |
# # |
|
222 |
# The example shown here is for mysql # |
|
223 |
# # |
|
224 |
################################################################# |
|
225 |
#realdatasourceproperties=port;3306,serverName;ibmhost,databaseName;mydb |
|
226 |
|
|
227 |
|
|
228 |
################################################################# |
|
229 |
# JNDI DataSource lookup # |
|
230 |
# # |
|
231 |
# If you are using the DataSource support outside of an app # |
|
232 |
# server, you will probably need to define the JNDI Context # |
|
233 |
# environment. # |
|
234 |
# # |
|
235 |
# If the P6Spy code will be executing inside an app server then # |
|
236 |
# do not use these properties, and the DataSource lookup will # |
|
237 |
# use the naming context defined by the app server. # |
|
238 |
# # |
|
239 |
# The two standard elements of the naming environment are # |
|
240 |
# jndicontextfactory and jndicontextproviderurl. If you need # |
|
241 |
# additional elements, use the jndicontextcustom property. # |
|
242 |
# You can define multiple properties in jndicontextcustom, # |
|
243 |
# in name value pairs. Separate the name and value with a # |
|
244 |
# semicolon, and separate the pairs with commas. # |
|
245 |
# # |
|
246 |
# The example shown here is for a standalone program running on # |
|
247 |
# a machine that is also running JBoss, so the JDNI context # |
|
248 |
# is configured for JBoss (3.0.4). # |
|
249 |
# # |
|
250 |
################################################################# |
|
251 |
#jndicontextfactory=org.jnp.interfaces.NamingContextFactory |
|
252 |
#jndicontextproviderurl=localhost:1099 |
|
253 |
#jndicontextcustom=java.naming.factory.url.pkgs;org.jboss.nameing:org.jnp.interfaces |
|
254 |
|
|
255 |
#jndicontextfactory=com.ibm.websphere.naming.WsnInitialContextFactory |
|
256 |
#jndicontextproviderurl=iiop://localhost:900 |
cdmlib-test/pom.xml | ||
---|---|---|
201 | 201 |
<groupId>com.h2database</groupId> |
202 | 202 |
<artifactId>h2</artifactId> |
203 | 203 |
</dependency> |
204 |
|
|
205 |
<!-- SQL Debugging --> |
|
206 |
<dependency> |
|
207 |
<groupId>p6spy</groupId> |
|
208 |
<artifactId>p6spy</artifactId> |
|
209 |
<scope>compile</scope> |
|
210 |
</dependency> |
|
211 |
|
|
212 | 204 |
|
213 | 205 |
<!-- Profiling --> |
214 | 206 |
<dependency> |
cdmlib-test/src/main/resources/unitils.properties | ||
---|---|---|
66 | 66 |
# H2 # |
67 | 67 |
# |
68 | 68 |
database.driverClassName=org.h2.Driver |
69 |
#database.driverClassName=com.p6spy.engine.spy.P6SpyDriver |
|
70 | 69 |
database.url=jdbc:h2:mem:cdm |
71 | 70 |
#database.url=jdbc:h2:file:~/.h2/cdm |
72 | 71 |
database.dialect=h2 |
pom.xml | ||
---|---|---|
1466 | 1466 |
<version>${hibernate-validator.version}</version> |
1467 | 1467 |
</dependency> |
1468 | 1468 |
|
1469 |
<dependency> |
|
1470 |
<groupId>p6spy</groupId> |
|
1471 |
<artifactId>p6spy</artifactId> |
|
1472 |
<version>2.1.4</version> |
|
1473 |
</dependency> |
|
1474 | 1469 |
<!-- for ikey-plus --> |
1475 | 1470 |
<dependency> |
1476 | 1471 |
<groupId>identificationKeyAPI</groupId> |
Also available in: Unified diff
removing all (almost all) spy6 references and dependencies