Share

p6spy

File Release Notes and Changelog

Release Name: 1.3

Notes: Release Notes for Version 1.3 of P6Spy 11/30/2003 #------------------------------------# General notes #------------------------------------# The "String Index Out Of Bounds" error (bug 238, 239, 246, etc.) should be fixed. This has been in the repository for awhile now. The major new functionality of this release is our solution to DataSources. The biggest problem with DataSources is that, unlike plain Drivers, they are not managed by the DriverManager but rather something else. "Something Else" usually means "your app server." The app server usually lets you modify datasource specific information (that is, methods and properties that are not in the DataSource interface) making it difficult to wrap. We've offered two solutions. The first is a simple DriverManagerDataSource. The idea here is that you can quickly wrap up a normal java.sql.Driver inside of the datasource and quickly get connection wrapping, etc. The second solution is a little less elegant. In light of the fact that DataSources tend to have non-standard methods, we've created a utility to let you create subclasses out of your existing concrete data source classes. So now you can create a com.p6spy.engine.subclass.P6OracleXAConnectionCacheImpl class from your OracleXAConnectionCacheImpl. Compile this, replace the original Oracle class in your app server's configuration file, and have at it. There are a few ways to go about this. #------------------------------------# Subclassing Method One #------------------------------------# The most simple way is to call the Subclasser directly: $ java -cp p6spy.jar com.p6spy.engine.common.Subclasser some_other_class This will create a corresponding file in the "scratch" subdirectory of your current directory containing a new .java file. Of course, "some_other_class" needs to be on your class path #------------------------------------# Subclassing Method Two #------------------------------------# For a bit more heavy lifting, we've created a subclass.xml ant build file. This will try to massage your classpath into shape, find the files you're looking for, create the .java files, compile them, and create a "p6ds.jar" of your new files. $ ant -f subclass.xml clean compile -Dsearch.dir=your_directory One nice thing about this way is that it will look for both .class as well as .jar files under "your_directory." Some caveats are: 1) The ant script expected to be in the root of a p6spy distribution (it looks for your lib directory, etc). Getting the classpath right in the script was rather tricky, so YMMV. 2) I can create subclasses from the Oracle classes without problems. The mysql driver is complaining about an ambiguous definition of Connection. This might be possibly overcome with a little hand-hacking at the file. Again, YMMV. 3) I would recommend that you put your jdbc jar file in some other directory than the "lib" directory. Since we try to load all of the classes in all of the jars that we find, you'll try to load JMX and JMS classes (from log4j, etc) that might not be on your classpath #------------------------------------# Subclassing Method Three #------------------------------------# If the ant invocation is too long above, I've written a one line .cmd file to do the invocation for you $ subclass your_directory Please feel free to respond with any questions or problems you're having, esp. with the new DataSource functionality.


Changes: