I have an ear file that consists of a war and jar file. When I hot deploy the ear file, it seems the UnifiedClassLoader loses the reference to the new deployment and thus throws a class cast exception. For example:
With a clean startup, everything is fine, with the classloaders being the same:
Class Assessment from iterator.next()
21:42:50,844 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34011mtremote.ear ,addedOrder=34}
Class Assessment from Assessment.class
21:42:54,539 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34011mtremote.ear ,addedOrder=34}
Class Assessment from iterator.next()
21:43:51,171 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@103074e{ url=null ,addedOrder=34}
Class Assessment from Assessment.class
21:43:52,282 INFO [STDOUT] org.jboss.mx.loading.UnifiedClassLoader3@79f5eb{ url=file:/D:/jboss-3.2.4RC1/server/default/tmp/deploy/tmp34012mtremote.ear ,addedOrder=35}
Is everything being unbound from JNDI on undeployment?