Hide Forgot
For the 1.3 release we disabled the threaded minhash calculation due to the following error: 06:05:07,486 ERROR [org.jboss.pressgang.ccms.server.envers.LoggingRevisionListener] (Thread-87) Error occurred while looking up the Bean Manager: javax.naming.NameNotFoundException: java:comp/BeanManager at org.jboss.as.naming.InitialContext.findContext(InitialContext.java:198) This looks like the cause is because the threads aren't associated with a context, so we possibly might be able to re-enable that by using the method described in http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html
Fixed in 1.4-SNAPSHOT build 201312041349 There were two main issues here. The first is that due to an oversight in the CDI 1.0 spec you can't access a BeanManager instance outside of EE components. This apparently will be fixed in version 1.1 of the CDI spec (see https://community.jboss.org/message/763348), so for now I've used the deltaspike implementation mentioned by Jason Porter. The second was that because the thread had no active context, the EnversLoggingBean couldn't be used and would throw a ContextNotActiveException. As such the thread now gets associated with a RequestContext so that the EnversLoggingBean can be referenced. Another alternative that could be used for the second part is to check if there is an active context for the EnversLoggingBean (see the beanManager.getContext() method) and if it's not active then simply skip it, as it should mean its been called from a thread and won't be supplying an log details.
I have used this same logic with the content hashes, and it has worked well. Also tested this by deleting a number of rows from the MinHash table and regenerating them with a post to http://localhost:8080/pressgang-ccms/rest/1/minhash/recalculatemissing.