openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ronkol <>
Subject Re: "this" is null in constructor of @Stateless bean when called second time by LocalBeanProxy
Date Thu, 02 Aug 2012 22:02:43 GMT
Thanks!!! The issue appears to be resolved with the 8/2 build inside that I downloaded. 

You are right in using @PostConstruct for most initialization. There might
be cases though where a bean is written using this.field = "default" or
similar that already uses this in the constructor that gets converted to an
EBJ (ie @Stateless) where code already uses "this". We would really not want
that to fail the service or cause developers trouble wondering what was
wrong (since there is really no reason why "this" should not work in a
simple bean). So it is great that this is now working for us and there is no
longer an issue. Thank you very much once again!

In general, though, you are right, yes indeed. We will use @PostConstruct
for most (if not all) new Java beans and services we construct going forward
as it is preferred when using injection (CDI). 

View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message