Forums Register Login

distributable DD - what does it do ?

+Pie Number of slices to send: Send
Snippet from the spec:


The distributable element, by its presence in a web application deployment descriptor, indicates that this web application is programmed appropriately to be deployed into a distributed servlet container<!ELEMENT distributable EMPTY>


I believe the container should be responsible for supporting a distributable environment, and the app be programmed appropriately in order to be distributable.
1. How does the presence of this element in the web.xml force/guarantee the distributable nature of an app?
2. Assume that the app is programmed properly.
If this element is NOT specified in web.xml for the app, does it mean it cannot be deployed in a distributable environment ?
Really - what does the <distributable> tag do?
Rama
[ November 22, 2002: Message edited by: Rama Raghavan ]
+Pie Number of slices to send: Send
 

Originally posted by Rama Raghavan:
1. How does the presence of this element in the web.xml force/guarantee the distributable nature of an app?

In its most basic form, it is no more than a flag to tell the container that this application should work with any distribution features that it has.
There are some intelligent things a container can do, though. In a distributable application, every session-bound object must be Serializable, so a container can enable some validation to check this even when it is not running in distributed mode.

2. Assume that the app is programmed properly.
If this element is NOT specified in web.xml for the app, does it mean it cannot be deployed in a distributable environment ?

Not as a distributed application in any case. You see, there is no automated way to find out whether an application is really fit to run in a distributed container. The Serializable check I described above is easy to do, but it is by no means enough. There are numerous other things that can bite you in a distributed application -- assumptions about Singletons, data consistency issues, transient fields, etc.
Only you, the developer, can decide whether the application can be distributed. And the distributable flag is how you make that decision known to the servlet container.
Does this help?
- Peter
+Pie Number of slices to send: Send
Thanks for your quick response.
Agreed that application developer must ensure/program for distributability of the app. So reason enough that the container should not "care" if the app is in-fact "flagged" distributable or not.
I have developed/deployed apps in a distributed environment using Weblogic 6.X. The container does not STOP deployment to a cluster/multiple servers even though the web.xml does NOT have <distributable> tag, and the app works fine..session migrates on fail-over, to be specific.
If the app is distributed, and has non-serializable objects bound to session, Weblogic throws messages in the logs.
So - (absence of) tag in web.xml has had not impact to the behavior of the container or the app.
Rama
+Pie Number of slices to send: Send
 

Originally posted by Rama Raghavan:
I have developed/deployed apps in a distributed environment using Weblogic 6.X. The container does not STOP deployment to a cluster/multiple servers even though the web.xml does NOT have <distributable> tag

Yikes!

and the app works fine..session migrates on fail-over, to be specific.

Only because your session objects happened to be Serializable by sheer coincidence. In a non-distributable application, they do not have to be! I find this behaviour very dangerous. I'm willing to bet that over 90% of applications which were not specifically written to be distributable break in a distributed environment in subtle and not so subtle ways.
Heck, sometimes it seems that 90% of applications which were specifically written to be distributable break especially as load gets really high.
- Peter
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1079 times.
Similar Threads
Tag Library Decriptor Problem
<distributable />
distributable element
Complete Structure of Web.xml
ServletContext is not distributable...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:03:33.