I am able to fix this by setting session to null in @PrePassivate method and then again looking up in @PostActivate method
Here we have to look up for Session again. Is there any better approach to fix this?
Joined: Apr 07, 2009
i think it doesn't matter if we configure CallbackMethods if we want to use any Resources in EJBContainer..
or do you want to use only PropertyInjection?..
i think the PropertyInjection, SetterInjection and Through callback methods is all the same, and all of it offer ease way to getting resources that we want..
the important thing when we use one of that is we want use resources provided by EJBContainer..
Please correct me if i'm wrong...
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Joined: Mar 12, 2008
I dont want to lookup again for Session in callback method when I have injected it. Is there any way to configure this?
Here I am injecting and then looking up, so I am not getting full advantage of injection.