I gave a wrong ejb class name in the <ejb-class> element, was hoping to get
a ValidationFailedException. However, Validation was never even invoked and
the AppModulePreProcessor (which is higher up in the chain) threw an
OpenEJBException.
*Here is what I was trying to do:*
EjbJar ejbJar = *new* EjbJar();
StatelessBean *bean* = ejbJar.addEnterpriseBean(*new* StatelessBean(
"wrongClass", "WrongClass"));
config.configureApplication(ejbJar);
*Here is the code(*AppModulePreProcessor.deploy() *) which throws the
Exception. *
*try* {
clazz = classLoader.loadClass(bean.getEjbClass());
} *catch* (ClassNotFoundException e) {
*throw* *new* OpenEJBException("Unable to load bean class: " +
bean.getEjbClass(), e);
}
The above scenario kind of does not give the user an opportunity to use the
validation feature.
Any thoughts/suggestions?
--
Karan Singh Malhi