@Test public void testShouldAllowPrimitiveArraysToBeSerialized() throws Exception { final EjbJar ejbJar = new EjbJar(); final StatelessBean statelessBean = new StatelessBean(TestBean.class); ejbJar.addEnterpriseBean(statelessBean); final AppModule app = new AppModule(this.getClass().getClassLoader(), "Test"); final EjbModule ejbModule = new EjbModule(ejbJar); ejbModule.setModuleId("EjbModule"); app.getEjbModules().add(ejbModule); assembler.createApplication(config.configureApplication(app)); final TestRemote testBean = (TestRemote) context.lookup("TestBeanRemote"); assertEquals('J', testBean.getChar()); assertEquals("Hello", new String(testBean.getCharArray())); assertEquals("test", new String(testBean.getCharArrayArray()[0])); assertEquals("run", new String(testBean.getCharArrayArray()[1])); assertEquals(1, testBean.getIntArray()[0]); assertEquals(2, testBean.getIntArray()[1]); assertEquals(true, testBean.getBooleanArray()[0]); assertEquals(false, testBean.getBooleanArray()[1]); assertEquals(0xD, testBean.getByteArray()[0]); assertEquals(0xE, testBean.getByteArray()[1]); assertEquals(0xA, testBean.getByteArray()[2]); assertEquals(0xD, testBean.getByteArray()[3]); assertEquals(0xB, testBean.getByteArray()[4]); assertEquals(0xE, testBean.getByteArray()[5]); assertEquals(0xE, testBean.getByteArray()[6]); assertEquals(0xF, testBean.getByteArray()[7]); assertEquals(1, testBean.getShortArray()[0]); assertEquals(2, testBean.getShortArray()[1]); assertEquals(1.1f, testBean.getFloatArray()[0], 0.001); assertEquals(2.2f, testBean.getFloatArray()[1], 0.001); assertEquals(5L, testBean.getLongArray()[0]); assertEquals(6L, testBean.getLongArray()[1]); assertEquals(1.1, testBean.getDoubleArray()[0], 0.001); assertEquals(2.2, testBean.getDoubleArray()[1], 0.001); }
ClassLoader getClassloader() { return Thread.currentThread().getContextClassLoader(); }
EjbObjectInputStream extends ObjectInputStream { ClassLoader getClassloader() { return Thread.currentThread().getContextClassLoader(); } }
EjbObjectInputStream extends ObjectInputStream { ClassLoader getClassloader() { return Thread.currentThread().getContextClassLoader(); } EjbObjectInputStream(final InputStream in); }
EjbObjectInputStream extends ObjectInputStream { ClassLoader getClassloader() { return Thread.currentThread().getContextClassLoader(); } EjbObjectInputStream(final InputStream in);  }
EjbObjectInputStream extends ObjectInputStream { ClassLoader getClassloader() { return Thread.currentThread().getContextClassLoader(); } EjbObjectInputStream(final InputStream in);   }