Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, November 17, 2011

java default sizes

to see the default stack, heap sizes in IBM JRE/JDK, run this command:
java -verbose:sizes -version

Thursday, July 17, 2008

JNI issues on linux

Problem #1: when compiling JNI component on a linux machine, it was missing tons of type definitions from jni.h. It appears libgcj-devel-version needs to be installed as the jni.h in it has the native datatype definitions.

Problem #2: if you see an error message such as the following when executing JNI components:
wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
Chances are that your jni shared library .so was compiled to be 64bit but your JDK/JVM is 32-bit! just use 64-bit java to run it instead

Thursday, February 14, 2008

response headers that prevents browser to cache JSP

// Set to expire far in the past.response.setHeader(”Expires”, “Tue, 23 May 1995 12:00:00 GMT”);
// Set standard HTTP/1.1 no-cache headers.response.setHeader(”Cache-Control”, “no-store, no-cache, must-revalidate”);
// Set IE extended HTTP/1.1 no-cache headersresponse.addHeader(”Cache-Control”, “post-check=0, pre-check=0″);
// Set standard HTTP/1.0 no-cache header.response.setHeader(”Pragma”, “no-cache”);

Friday, January 25, 2008

JNDI names of TransactionManager in J2EE application servers

java:comp/env/UserTransaction - Generic
java:comp/UserTransaction - Resin 2.x, Oracle OC4J (Orion), JOnAS (JOTM), BEA WebLogic
java:comp/TransactionManager - Resin 3.x, Geronimo
java:/TransactionManager - JBoss
jta/usertransaction - WebSphere (J2EE 1.2)

java:comp/UserTransaction - WebSphere (J2EE 1.3)