Index: src/main/java/org/jboss/injection/EnvEntryEncInjector.java =================================================================== --- src/main/java/org/jboss/injection/EnvEntryEncInjector.java (revision 83164) +++ src/main/java/org/jboss/injection/EnvEntryEncInjector.java (working copy) @@ -21,6 +21,7 @@ */ package org.jboss.injection; +import org.jboss.ejb3.common.classloader.PrimitiveAwareClassLoader; import org.jboss.logging.Logger; import org.jboss.util.naming.Util; @@ -63,32 +64,34 @@ protected Object getEnvEntryValue() throws ClassNotFoundException { - Class type = Thread.currentThread().getContextClassLoader().loadClass(entryType); + ClassLoader tcl = Thread.currentThread().getContextClassLoader(); + ClassLoader primitiveAwareCl = new PrimitiveAwareClassLoader(tcl); + Class type = primitiveAwareCl.loadClass(entryType); if (type == String.class) { return value; } - else if (type == Integer.class) + else if (type == Integer.class||type==int.class) { return new Integer(value); } - else if (type == Long.class) + else if (type == Long.class||type==long.class) { return new Long(value); } - else if (type == Double.class) + else if (type == Double.class||type==double.class) { return new Double(value); } - else if (type == Float.class) + else if (type == Float.class||type==float.class) { return new Float(value); } - else if (type == Byte.class) + else if (type == Byte.class||type==byte.class) { return new Byte(value); } - else if (type == Character.class) + else if (type == Character.class||type==char.class) { String input = value; if (input == null || input.length() == 0) @@ -104,11 +107,11 @@ return new Character(input.charAt(0)); } } - else if (type == Short.class) + else if (type == Short.class||type==short.class) { return new Short(value); } - else if (type == Boolean.class) + else if (type == Boolean.class||type==boolean.class) { return new Boolean(value); }