Hi,
I have a singleton ejb which is getting initialised twice. I have no idea why and it is completly defenting the point in having a singleton bean as far as I can tell. Any help will be appreciated. As you can see I tried to put a static boolean in to prevent the multiple initialisation (not that it should be required) but it made no difference.
Bean:
@Singleton
@Startup
public class DataModelBean implements DataModelBeanLocal {
private static Logger log = Logger.getLogger(DataModelBean.class.getName());
@PostConstruct
public void init(){
log.info(this);
}
}
Log output snippet:
2010-02-17 16:06:13,670 INFO [AutoDeployer :DataModelBean ] com.xxx.xxx.datamodel.DataModelBean@117843d
2010-02-17 16:06:14,233 INFO [AutoDeployer :DataModelBean ] com.xxx.xxx.datamodel.DataModelBean@62b9d3
Is it creating 2 beans!! or is it deploying the app twice?
As an aside I am using glassfish v3, is this mature enough? Should I use v2 or something else? Thoughts?
Cheers,
James