I used the @Timeout annotation on a method of an MDB, in this method a read messages from JMS.
When trying to get content of an ObjectMessage I get a ClassNotFoundException, the class is in the same EAR as the MDB, it should be found.
To fix this, I set the context class loader to my MDB's class loader using this: Thread.currentThread().setContextClassLoader(getClass().getClassLoader())
Is it normal that the context classloader is not set to the class loader of the class on which the timer callback is called?