serialVersionUID variable in EJB's, IBM VisualAge, IBM Websphere
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sean_Sullivan
Posted On:   Tuesday, February 19, 2002 02:40 PM

I inherited 5 Session EJB's that were written by another software developer. The Session EJB's were created using IBM VisualAge for Java, version 3.5.4 Each of the EJB's contains a variable called serialVersionUID Example: fooblah.secure.SecurityBean final static long serialVersionUID = 3206093459760846163L; I know that this variable is typically used during Java object serialization. Why do the EJB's contain the serialVersionUID? Is it a requirement of the Websphere Application Server? Was this variable declared automatically by the VisualAge EJB wizard?    More>>


I inherited 5 Session EJB's that were written by another software developer. The Session EJB's were created using IBM VisualAge for Java, version 3.5.4



Each of the EJB's contains a variable called serialVersionUID

			
Example:


fooblah.secure.SecurityBean

final static long serialVersionUID = 3206093459760846163L;








I know that this variable is typically used during Java object serialization.




Why do the EJB's contain the serialVersionUID?





Is it a requirement of the Websphere Application Server?





Was this variable declared automatically by the VisualAge EJB wizard?





Is there any harm in deleting this variable?





If I add/remove methods or variables from the EJB class, shouldn't I
regenerate the serialVersionUID using Sun's SERIALVER tool?





Thanks.





-Sean





p.s. - If I had to make a guess, I would say that Websphere makes
use of serialVersionUID during EJB activation and EJB passivation.    <<Less
About | Sitemap | Contact