Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Sat May 28, 2011 3:35 pm
by deadlock_gr
Typo in B:
clientStateRepresentaion --> clientStateRepresentation

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Sun May 29, 2011 4:28 pm
by admin
This has been updated.

Thanks for your feedback!

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Sun Aug 25, 2013 7:56 am
by mopuffus
IMHO opinion the Initialize is a a little bit confusing here. Initialize means set something to a initial/primary value, and this can be everything . I think that Initialize can not apply for the answers:
1. Mark currentClientState as transient.
2. Initialize the clientStateRepresentation in @PrePassivate and recreate currentClientState in @PostActivate.
or
1. Set currentClientState to null in @PrePassivate method.
2. Initialize the clientStateRepresentation in @PrePassivate and recreate currentClientState using clientStateRepresentation in @PostActivate.


IMHO the proper words will be something : "Store the actual state in the clientStateRepresentation in @PrePassivate and recreate currentClientState in @PostActivate."

Thanks in advanve,
Mihai

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Sun Aug 25, 2013 9:55 am
by admin
This has now been updated. Thank you for your feedback!
-Paul.

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Sat Apr 25, 2015 7:53 pm
by negociadordns
A funny typo:

In the explanation of answer "Write the contents of currentClientState to a file in @PrePassivate and read them back in @PostActivate."
It is written a zero instead of an O letter in I/O:

"Beans are not allowed to use File I/0."

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Mon Apr 27, 2015 7:57 pm
by admin
negociadordns wrote:A funny typo:

In the explanation of answer "Write the contents of currentClientState to a file in @PrePassivate and read them back in @PostActivate."
It is written a zero instead of an O letter in I/O:

"Beans are not allowed to use File I/0."
Fixed.
thank you for your feedback!

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Tue Apr 28, 2015 9:39 am
by himaiMinh
Set currentClientState to null in @PrePassivate method.
2. Initialize the clientStateRepresentation in @PrePassivate and recreate currentClientState using clientStateRepresentation in @PostActivate.
First, the currentClientState is set to null. It is not refering to the original value. In the @PostActivate method, the currentClientState refers to a new value.

So, the original value of currentClientState is not preserved ?

Re: About Question enthuware.oce-ejbd.v6.2.482 :

Posted: Tue Apr 28, 2015 2:07 pm
by himaiMinh
Let me answer my own question. The statement has been changed into
store the state of currentClientState in clientStateRepresentation in PrePassivate...
In this way, the currentClientState is preserved in the string.