|
From: Colin S. <col...@ex...> - 2003-11-14 17:41:51
|
AbstractMessageDrivenBean currently has the following ejbCreate method:
/**
* Lifecycle method required by the EJB specification but not
* the MessageDrivenBean interface.
* <p>This implementation loads the BeanFactory. Don't override it
* (although it can't be made final): code your initialization in
* onEjbCreate(), which is called when the BeanFactory is available.
* <p>Unfortunately we can't load the BeanFactory in
setSessionContext(),
* as ResourceManager access isn't permitted and the BeanFactory may
require it.
*/
public void ejbCreate() throws CreateException {
loadBeanFactory();
onEjbCreate();
}
This is actually not spec compliant. If you look at the spec, section
15.7.3, it states that MessageDrivenBeans must not throw application
exceptions. CreateException is an application exception, and in fact
JBoss, for example, will not allow an MDB with this create method to load.
So I am going to change this to remove the exception, after I get back
from lunch. If anybody disagrees with me, before or after that, please
let me know.
(lucky me, still putzin' around with legacy EJB code...)
Regards,
Colin
|