• Task
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • alexsnaps
  • Reporter: alexsnaps
  • December 08, 2011
  • 0
  • Watchers: 0
  • July 27, 2012
  • December 08, 2011

Description

Based on this forum post : http://forums.terracotta.org/forums/posts/list/6366.page#32299

We can expect other things than Hibernate to blindly cast System prop value to String. Given we only use this “hack” to work around potential SecurityManager policies (while trying to access the SystemClassLoader), we should not put the Instrumentation the agent provide into System props by default. We should rather try to access the SystemClassLoader by default. If that fails, and the Instrumentation isn’t in the System props, we’d print out a banner to tell users about either fixing the security policies or turn on a flag to allow the agent to use the System props as a fallback.

Once the agent is loaded and we try to retrieve the Instrumentation instance, we should probably remove it from the system props. That remains racy, but minimizes the window where someone could hit it accidentally. Just have to verify that trying to reload the agent, it gets another chance to restock it in. Worst comes, we’ll fallback to an alternate Sizing mechanism.

Comments

Alexander Snaps 2011-12-08

This will impact the sizeof-agent. We need to tag and release this accordingly.

Alexander Snaps 2011-12-08

This could require some doc changes ? Though I don’t think we ever advertised this system property…

Alexander Snaps 2011-12-08

This is currently only on trunk. I think we need a branch for the sizeof-agent for me to merge…

Fiona OShea 2011-12-08

Please merge to 2.5.x

Does it affect 2.4.7 as well?