mirror of
https://github.com/apache/activemq.git
synced 2025-02-08 11:05:59 +00:00
AMQ-2960: Fixed potential NPE in pooled connection factory in activemq-spring when using spring-dm in OSGi. As spring-dm may call getObject before postCostruct has been called.
This commit is contained in:
parent
c1fc98a05a
commit
0b21daf5a3
@ -185,9 +185,12 @@ public class PooledConnectionFactoryBean implements FactoryBean {
|
||||
}
|
||||
}
|
||||
|
||||
// FactoryBean methods
|
||||
@Override
|
||||
public Object getObject() throws Exception {
|
||||
// in case spring-dm calls getObject before this bean has been initialized
|
||||
if (pooledConnectionFactory == null) {
|
||||
afterPropertiesSet();
|
||||
}
|
||||
return pooledConnectionFactory;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user