aspose file tools
The moose likes Java in General and the fly likes  Application needs to support serialization     Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark " Application needs to support serialization     " Watch " Application needs to support serialization     " New topic
Author

Application needs to support serialization

Andrei Fomenko
Greenhorn

Joined: Sep 03, 2007
Posts: 2
Hi,

We have web application that needs to support clustering i.e. persisted appserver sessions. Currently, a lot of the objects we store in the HTTP session are not Serializable and therefore any attempts to cluster the appserver fail. To solve this we obviously need to determine what objects need to be Serializable and perform any refactoring required to make them Serializable.

So, do you now any pattern or best practice to perform this task?

Thanks
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Hi, welcome to the ranch!

I ran across the same issues with a vendor framework ... some of the objects they placed on the session would not serialize. We just modified the framework to not put them there. Making your session smaller is A Good Thing at this point.

If you can't get rid of such things, waiting for them to fail is about your only choice unless you can tightly control what goes on the session. Do you have a point - maybe a front controller - where you could wrap the Session with an implementation that only allows clients to put serializable objects?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Andrei Fomenko
Greenhorn

Joined: Sep 03, 2007
Posts: 2
Thanks a lot for your solution!

There are some additional problems. Almost all business objects and backing beans in our JFS application are not implement Serializable. So, there is really a big amount of handwork.

After we implement serialization we need to test its capabilities. One of the possible test scenarios is to serialize and deserialized
objects during their adding to HTTP session. Disadvantage of this approach is that we need to surfing web application and there is no guarantee that we test all objects in such way.

So, any ideas about testing?

Thanks
[ September 04, 2007: Message edited by: Andrei from Belarus ]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Application needs to support serialization
 
Similar Threads
Enabling session replication does not work jboss 4.3 EAP
Managed ben doubt
Web sphere server not starting
Distributed Web application question
Sun Java System Application Server 8 as a Windows service?