>
> Hi All !
> I have few questions regarding the use of serialVersionUID in
> EJB. I know it is used to expedite the serialization though
> still I am confused about the use of it in following scenario:
> 1) I have a Baseclass of Stateless Session Bean, is it okay
> to put the field "serialVersionUID" in Base class or I should
> put it separately in each Session Bean?

Optimally, you should put it separatedly. Putting it in the Base class
has no effect. This is for all java classes. There's no inherent
performance gain in declaring this field explicitly. Not declaring it
means either the compiler or the JVM(at class loading time) will
calculate it for you.

> 2) Since right now we are planning to use Local Interfaces
> but in future we may use Remote Interfaces, does putting
> "serialVersionUID" in SSB will improve performance even while
> we are using local interfaces.

serialVersionUID won't have a preformance improvement in any of the app
servers I use regulary. Your class is most likely to be extended by a
wrapper class, which means the UID will be lost.

> 3) Is there a way to validate the value of
> "serialVersionUID", since I am using the auto generated
> "serialVersionUID" by Jtest. Your help will be appreciated. Thanks

As long as you don't use the same UID in 2 different classes you're
alright.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to