This week's book giveaway is in the Spring forum.
We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line!
See this thread for details.
Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Serializable Objects contained within 1 JVM- Are they still serialized & deserialized

 
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If POJO objects implement Serializable and if they are contained within the same JVM, are they still serialized and de-serialized?

Is the behavior any different if 2 JVMs are set in a cluster?

Are the above behaviors consistent in WebSphere 5.1.x server?
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
More of a WebSphere question. Moving...
 
Marshal
Posts: 26610
81
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just declaring that an object implements Serializable doesn't mean that there's a magic process that serializes it. On the other hand you may be referring to some real process that serializes objects in Websphere. Can you provide some context for this question?
 
Sam Gehouse
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using EJB 2.0. All the EJB interfaces are Remote. Objects being passed as arguments in business methods of EJB (all the EJBs are stateless session) are POJO which implement Serializable.

The application with multiple EJBs (all are stateless session) are deployed in a single JVM in WebSphere 5.1.x.

My question is: If all these POJO stay in the same JVM, are they serialized and de-serialized when EJB business methods are invoked by an application that also resides on the same JVM?

Is the behavior any different, if 2 JVMs are set in a cluster?
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically it is up to the configuration of the server.

Most of the applcation servers today can optimize a call via EJB Remote interface to a co-exists EJB object to a local call. In that case the POJO is not serialized. If this optimization is turned off , it will be serialized for that remote call.

For the cluster case , it is still up to where the endpoint object resides and if the optimization takes effect. Usually applcation should have a setting to give ability to set preference to local object in cluster environment

But my memory is so bad that I could not remember them in websphere

I will check it and come back later.

Lin
 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the ORB Service Properties page , there is an attribute "Pass by Reference". It controls if the parameter is passed as a reference or a value when it is a local call.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic