Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Question on Distributable

 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hug your destiny! And hug this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic