This content has been marked as final.
Show 2 replies
-
1. Re: Injection of application scope class at startup
germanescobar Jan 6, 2010 12:31 PM (in response to maxradin)There is no way two instances of Class2 are created if you are using application scope (unless you use the new operator elsewhere).
What do you mean by:
Class2 has been shown to be null intermittently on startup.How do you realize about this? Maybe you are trying to inject it in another component and this component sometimes startup first.
-
2. Re: Injection of application scope class at startup
maxradin Jan 6, 2010 3:58 PM (in response to maxradin)We get null pointer exceptions intermittently out of Class2 when referencing Class1 on startup. Class1 has not been initialized yet, it seems, even though Class2 has a startup dependency on it. It looks like Class2 is jumping the gun on startup. That's why a 'create new' was put in for it in Class2 - to force it to initialize. I didn't think this was right. This hasn't been needed up until now and we have had many successful deployments.
thanks for your comment
Max