I have an existing application developed using Spring 2.5, which I had to migrate to 3.2.6.
After the migration, everything is working fine.. except I'm getting a NullPointerException
while using onEjbCreate()
method of Deprecated AbstractStatelessSessionBean
in Spring 3.2.6 .
I think the problem is that onEjbCreate() is not compatible with EJB 3.0.
I tried using @PostConstruct
,but then I was not able to get what to substitute for the existing getBeanFactory()
.
Would appreciate if anyone can help me with this. Thanks.
This is the existing code that was working on Spring 2.5
@Override
protected void onEjbCreate() throws CreateException {
mqConnectorFactory = (ConnectorFactory) getBeanFactory().getBean(BEAN_NAME_MQ_CONN_FACTORY);
}