[ https://jira.terracotta.org/jira//browse/CDV-136?page=comments#action_21352 ] Hung Huynh commented on CDV-136: --------------------------------
I see what you mean now. In addition to the hack you mentioned, the other telltales signs are jvm system properties: sun.boot.class.path = will contain our bootjar tc.install-root = always has to be set tc.config = might or might not be set > Added System property to indicate that TC DSO is active > ------------------------------------------------------- > > Key: CDV-136 > URL: https://jira.terracotta.org/jira//browse/CDV-136 > Project: Community Development > Issue Type: New Feature > Components: DSO:L1 > Reporter: Geert Bevin > Assigned To: Hung Huynh > Fix For: 2.4-stable0 > > > Sometimes it's necessary to conditionally execute code when Terracotta DSO is > active, or when the application is just running on a single node. A typical > example of this is the use of WeakHashMap instances which aren't supported by > TC, but are recommended to be used for rebuildable caches in single node > situations. Currently, the only way to somewhat detect that TC is active is > by simply trying to load a typical TC class. This is however quite 'hackish' > and doesn't even guarantee that TC is active, it just indicates that TC is > present in the classpath. > Adding a system property that is set when TC is actively sharing roots would > make it much easier to conditionally execute code. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://jira.terracotta.org/jira//secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
