aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question on Distributable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Question on Distributable" Watch "Question on Distributable" New topic
Author

Question on Distributable

Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
I'm somewhat unclear on the spec regarding session migration in a distributed environment. As I read the spec, objects stored as session attributes may be required to implement Serializable, but not necessarily. Is that correct? The spec says that the container must accept all Serializables but that it may use its own serializing facility.
If I read it correctly, that's not a very good way to do things. That should be nailed down one way or the other.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
Session attributes should always be Serializable in a distributed environment to meet the spec. However, containers are not required to use serialization at all. They could use some other mechanism but they might use serialization. Remember, web components are supposed to be portable accross containers. If you deploy your application to a container that doesn't use serialization and you have a session attribute that is not serializable, you may be fine. However, if you move that same application to a container that does use serialization, it will blow up when it tries to migrate your session attributes. The specs just establish a baseline but they don't get too specific so that container vendors can compete based upon their innovative implementations of the specs.


Anthony W.<br />MCP, SCJP 1.4, SCJD, SCWCD 1.3, SCWCD 1.4, SCBCD
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
The specs just establish a baseline but they don't get too specific so that container vendors can compete based upon their innovative implementations of the specs.
Your explanation is as I interpreted the spec. But giving the vendors to much rope is what damages portability. It seems IBM goes out of their way to stay on the edges of the spec to keep their WebSphere customers, I'm sure the other vendors do the same. For J2EE apps to be truly, write once, run anywhere, there should not be gaping loopholes like this.
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
It is the responsibility of the developer to know what features they use are in the spec and which ones are proprietary features. Portability is not negatively affected by an implementation of the spec. If you choose to use the proprietary features of a container, you yourself are limiting your own portability.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Distributable