aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Distributed Web application question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Distributed Web application question" Watch "Distributed Web application question" New topic
Author

Distributed Web application question

tiim fei
Greenhorn

Joined: May 22, 2005
Posts: 12
One application was initially developed for a nondistributed env. The company recently purchased the Acme AppServer, which supports distributed HttpSession Objects. When deploying the app to the server, the deployer marks it as distributable in the dd to take advantage of this feature. Given this scenario, which two must be true ?
A. The J2EE web container must support migration of objects that implement Serializable.
B. The J2EE web container must use the native JVM Serialization mechanism for distributing HttpSession objects.
C. As per the spec, the j2ee web container ensures that distributed HttpSession objects will be stored in a database.
D. Storing references to EJB components in the HttpSession object might NOT be supported by J2EE web containers.

I remember that, those attribute of HttpSession object which implements Serializable interface would be guranteed to migrate correctly on different vm. But I don't know really all those choices provided here is correct or not.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

My answer is A.

The container which supports distributed HttpSession Objects must support migration of objects that implement Serializable.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
tiim fei
Greenhorn

Joined: May 22, 2005
Posts: 12
I go through the spec 2.4
"Within an application marked as distributable, all requests that are part of a sessionmust be handled by one Java Virtual Machine1 (�JVM�) at a time. The container must be able to handle all objects placed into instances of the HttpSession class using the setAttribute or putValue methods appropriately. The following restrictions are imposed to meet these conditions:
� The container must accept objects that implement the Serializable interface.
� The container may choose to support storage of other designated objects in the HttpSession, such as references to Enterprise JavaBeans components and transactions.
� Migration of sessions will be handled by container-specific facilities."

I think D is correct. But for A, I think spec saying that only those objects which is set as attributes in HttpSession object should be guranteed to migrate correctly. So I don't think A is right. Also, I do think B and C are wrong.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi
The option D can be correct. But A is more specific.
The container can support the objects that are not Serializable, but it must accept the objects that are serializable.

� The container must accept objects that implement the Serializable interface.
� The container may choose to support storage of other designated objects in the HttpSession, such as references to Enterprise JavaBeans components and transactions.
� Migration of sessions will be handled by container-specific facilities."


Thanks
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

Anyway we both are correct. The question ask for two options.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Distributed Web application question