{"action":"created","issue":{"url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/127","repository_url":"https://api.github.com/repos/stagemonitor/stagemonitor","labels_url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/127/comments","events_url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/127/events","html_url":"https://github.com/stagemonitor/stagemonitor/issues/127","id":137241663,"number":127,"title":"EhCache plugin is unable to discover new caches added at runtime through JCache API","user":{"login":"yacota","id":2678582,"avatar_url":"https://avatars.githubusercontent.com/u/2678582?v=3","gravatar_id":"","url":"https://api.github.com/users/yacota","html_url":"https://github.com/yacota","followers_url":"https://api.github.com/users/yacota/followers","following_url":"https://api.github.com/users/yacota/following{/other_user}","gists_url":"https://api.github.com/users/yacota/gists{/gist_id}","starred_url":"https://api.github.com/users/yacota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yacota/subscriptions","organizations_url":"https://api.github.com/users/yacota/orgs","repos_url":"https://api.github.com/users/yacota/repos","events_url":"https://api.github.com/users/yacota/events{/privacy}","received_events_url":"https://api.github.com/users/yacota/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/stagemonitor/stagemonitor/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/stagemonitor/stagemonitor/labels/pull%20requests%20welcome","name":"pull requests welcome","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-02-29T12:32:42Z","updated_at":"2016-03-02T17:24:03Z","closed_at":"2016-03-02T09:44:57Z","body":"It would be useful that EhCache plugin could discover new caches added at runtime.\r\n\r\nBy now EhCache plugin discovers a single CacheManager based on \"stagemonitor.properties#stagemonitor.ehcache.name \", and through it discovers all the configured Cache instances.\r\n\r\nTwo chances here as far as I can see:\r\n- let EhCachePlugin reload its configuration in order to be able to detect these new Cache instances.\r\n- launch StageMonitor in lazy mode, avoiding the automatic initialization that WebPlugin triggers, which happens because it implements ServletContainerInitializer. So launching StageMonitor in lazy mode would imply that the  application itself should invoke StageMonitor.init() in order to initialize it.\r\n\r\nTo sum up, I am unable to configure a EhCacheCacheManager before StageMonitor is initialized, and only caches in ehcache.xml are detected.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/comments/191335708","html_url":"https://github.com/stagemonitor/stagemonitor/issues/127#issuecomment-191335708","issue_url":"https://api.github.com/repos/stagemonitor/stagemonitor/issues/127","id":191335708,"user":{"login":"yacota","id":2678582,"avatar_url":"https://avatars.githubusercontent.com/u/2678582?v=3","gravatar_id":"","url":"https://api.github.com/users/yacota","html_url":"https://github.com/yacota","followers_url":"https://api.github.com/users/yacota/followers","following_url":"https://api.github.com/users/yacota/following{/other_user}","gists_url":"https://api.github.com/users/yacota/gists{/gist_id}","starred_url":"https://api.github.com/users/yacota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yacota/subscriptions","organizations_url":"https://api.github.com/users/yacota/orgs","repos_url":"https://api.github.com/users/yacota/repos","events_url":"https://api.github.com/users/yacota/events{/privacy}","received_events_url":"https://api.github.com/users/yacota/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T17:24:03Z","updated_at":"2016-03-02T17:24:03Z","body":"Check https://github.com/stagemonitor/stagemonitor/pull/131"}}