-
Jan 17th, 2012, 06:09 AM
#1
EJB @PostConstruct method being invoked twice
Hi,
I'm using Spring 3.0 for DI in a SLSB EJB 3.0 bean.
The bean has a @PostConstruct annotated method that appears to get invoked twice: once by the EJB container and once by Spring. Is this correct?
Spring is bootstrapped using an interceptor like this:
@Interceptors(SpringBeanAutowiringInterceptor.clas s)
@PostConstruct
public void init() {
//...
}
I haven't explicitly registered any BeanPostProcessor classes.
Is there a way to prevent the method being invoked multiple times?
marko
-
Jan 17th, 2012, 06:51 AM
#2
If it is invoked twice it is constructed twice... Did you register the bean as a spring bean?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules