Every way possible to dice CPU utiliztion on *nix.
Thursday, December 30, 2010
Monday, December 20, 2010
How do I do that Java 101 task again?...
I find that every new Java project I'm on, I run into a situation where I want to translate an InputStream to a String or vice versa. This is frequently in a unit test where I've read an input file or expected output file in using getClass().getResourceAsStream() and need to convert to Strings for use in my test.
It's a simple boiler plate task, yet darned if I can remember the most an effecient way to do it every time. I always re-google and always tend to refer to this one to jog my memory..
Thought I'd link out to it this time.
Wednesday, December 8, 2010
POM Search Site
I know this is obvious, but adding it I can reference in the future...
Get dependency tags for dependencies.
http://mvnrepository.com/
Get dependency tags for dependencies.
http://mvnrepository.com/
Friday, December 3, 2010
Hibernate shows SQL to log4j too
Log hibernate queries and more without using the show_sql = true setting in your hibernate config. This way you can see them in your log4j configured log files, not just in your STDOUT log.
# Hibernate logging
# Log everything (a lot of information, but very useful for troubleshooting)
log4j.logger.org.hibernate=FATAL
# Log all SQL DML statements as they are executed
log4j.logger.org.hibernate.SQL=DEBUG
# Log all JDBC parameters
log4j.logger.org.hibernate.type=INHERITED
# Log all SQL DDL statements as they are executed
log4j.logger.org.hibernate.tool.hbm2ddl=INHERITED
# Log the state of all entities (max 20 entities) associated with the session at flush time
log4j.logger.org.hibernate.pretty=INHERITED
# Log all second-level cache activity
log4j.logger.org.hibernate.cache=INHERITED
# Log all OSCache activity - used by Hibernate
log4j.logger.com.opensymphony.oscache=INHERITED
# Log transaction related activity
log4j.logger.org.hibernate.transaction=INHERITED
# Log all JDBC resource acquisition
log4j.logger.org.hibernate.jdbc=INHERITED
# Log all JAAS authorization requests
log4j.logger.org.hibernate.secure=INHERITED
# Hibernate logging
# Log everything (a lot of information, but very useful for troubleshooting)
log4j.logger.org.hibernate=FATAL
# Log all SQL DML statements as they are executed
log4j.logger.org.hibernate.SQL=DEBUG
# Log all JDBC parameters
log4j.logger.org.hibernate.type=INHERITED
# Log all SQL DDL statements as they are executed
log4j.logger.org.hibernate.tool.hbm2ddl=INHERITED
# Log the state of all entities (max 20 entities) associated with the session at flush time
log4j.logger.org.hibernate.pretty=INHERITED
# Log all second-level cache activity
log4j.logger.org.hibernate.cache=INHERITED
# Log all OSCache activity - used by Hibernate
log4j.logger.com.opensymphony.oscache=INHERITED
# Log transaction related activity
log4j.logger.org.hibernate.transaction=INHERITED
# Log all JDBC resource acquisition
log4j.logger.org.hibernate.jdbc=INHERITED
# Log all JAAS authorization requests
log4j.logger.org.hibernate.secure=INHERITED
Subscribe to:
Posts (Atom)