• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JMS and Unique ServerID

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple application that uses a JMS message to update other clustered members of the application. This is a pub/sub scenario. In an effort to prevent duplication of work, I use VMID SERVER_ID = new VMID() to obtain the unique ID for the server who originated the message. I post this information on the queue with no problem. When the message comes off the queue, the MDB takes the current serverID by using VMID SERVER_ID = new VMID(). Next, I compare the two ids.

This application is running on my box, a single JVM/Server, but for some reason I get two separate ServerIDs.

Current ServerID[3c39e4d1cb654eef:39963df5:10563d911b1:-7ffd]
Originating ServerID[3c39e4d1cb654eef:39963df5:10563d911b1:-7ffc]

Am I misusing VMID?

Thanks for your help.

Russ
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the good of the group:

VMID is an enterprise way of gaining a unique id. Therefore, each time you can the constructor, a unique id is generated.

 
reply
    Bookmark Topic Watch Topic
  • New Topic