Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8785579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:24:13+00:00 2026-06-13T21:24:13+00:00

Not sure if the title is appropriate, but here is my question I wrote

  • 0

Not sure if the title is appropriate, but here is my question

I wrote a class, for example,

version 1

class SomeClass
{
    public method1()
    {
        ...
        ...
    }

    public method2()
    {
        ...
        ...
    }
}

The objects of SomeClass are pushed to a message queue by different modules say

module1
module2
module3

which then is being processed module4

Now, module3 requires some additional functionality method3() so I added additional functionality to SomeClass

version 2

class SomeClass
{
    public method1()
    {
        ...
        ...
    }

    public method2()
    {
        ...
        ...
    }

    public method3()
    {
        ...
        ...
    }
}

and updated module3 and module 4 with this new class, however module1 and module2 are not

module3 will post objects of SomeClass (version 2) to the message queue, however module1 and module2 still post objects of SomeClass (version 1)

Will there be any problems for module 4 that has version 2 definition to read the objects of version 1 definition?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:24:14+00:00Added an answer on June 13, 2026 at 9:24 pm

    Theoretically it could work because when you push object to message queue (using ObjectMessage) it is serialized using standard java serialization mechanism. Serialization does not care about methods. It uses fields only. It means that you can serialize object v1 and then deserialze it using class version 2. But I believe you will have to add special field private static long serialVersionUID to your class and manage its value manually.

    So, your v1 and v2 that have identical number and order of field and differ by methods only will have the same serialVersionUID.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not entirely sure my question title describes what I want to do, but couldn't
I am not sure how clear my question is by the title, but I
I am sure the title of my question doesn't make much sense. But here
Not sure if my title is correct. Forgot what it is code. But here
Not sure of the appropriate title, but it stems from this discussion: Do the
Not sure the title fully describes the problem/question I'm trying to ask, sorry. One
I'm not sure that title is worded very well, but not sure how else
Not sure if I've just missed something but this doesn't work: $(this).children('td.threadtitle a').html('thread title');
Not sure if my title is worded well, but whatever :) I have two
Not sure whether the title is misleading, but requirement is below. I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.