Encryption madness. Part III

On last week my colleagues were complaining about slow JMS performance on specific case: as a part of workflow they process tiff and pdf documents on JMS to place graphic stamp into content, and on 6.7SP1 everything was working smoothly, but on 7.2 this operation started taking a lot of time. The problem was following: during image processing they (i.e. my colleagues) create temporary files using File.createTempFile() method, ImageIO API in java also utilises File.createTempFile() method, so, I had counted about dozen of File.createTempFile() calls during one stamping operation, File.createTempFile() method is based on java.security.SecureRandom which is extremely slow in D7.2 environment, for example, following code

public class Test {

	public static final AtomicLong COUNTER = new AtomicLong(0);

	public static void main(String[] args) throws Exception {

		for (int i = 0; i < 100; i++) {
			new Thread(new Runnable() {
				@Override
				public void run() {
					try {
						while (true) {
							File.createTempFile("xxx", "xxx").delete();
							COUNTER.incrementAndGet();
						}
					} catch (IOException ex) {
						throw new RuntimeException(ex);
					}
				}
			}).start();
		}

		while (true) {
			long l = COUNTER.get();
			Thread.sleep(10000);
			System.out.println(COUNTER.get() - l);
		}

	}

}

demonstrates 100 times slower performance on JVM shipped with Content Server:

[dmadmin@docu72dev01 ~]$ type java
java is hashed (/u01/documentum/cs/shared/java64/1.7.0_72/bin/java)
[dmadmin@docu72dev01 ~]$ java Test
4302
5173
[dmadmin@docu72dev01 ~]$ export JAVA_HOME=/opt/java/jdk/sun/x86_64/jdk1.7.0_75
[dmadmin@docu72dev01 ~]$ $JAVA_HOME/bin/java Test
503042
518592

What the hell is going on? The answer is simple: EMC embedded extremely slowFIPS 140-2 enabled random number generator into JVM

Resurrection of Repoint

My colleagues used to like perform some routine Documentum operations through Repoint (not a best choice though), unfortunately now Repoint is not under “active development” and it does not work with modern JDK versions, hence it does not work properly with TBO compiled by modern JDK versions. Previously Alvaro de Andres shared an instructions how to plug Repoint into Composer (another one not best choice:)), but yesterday I discovered another project maintained by Karol Bryd: Documentum Repoint “resurrected” (check also: Repoint 0.2.0 released, Documentum Repoint Resurrected!), indeed Repoint has Resurrected: