• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

MDB Question in clustered environment

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Our system (EJB2.1) is deployed in a clustered environment (WAS Network Deployment 6.1), as the attached image illustrated:

1. Same ear file is deployed to two nodes which is on different physical machine.
2. The web server distribute the incoming HTTP request to different node.
3. For every node, the war file and EJB are within one JVM and web layer access EJB via local interfaces.

The requirement is that the servlet needs to handle the file uploading request, write the file into some local temp directory, then send a message to MDB, MDB in turn process the file asynchronously. Obviously for this case the message procuded by the servlet in one Node should only be consumed by the MDB in same node, coz the MDB in the other node will not be able to find the file if it consumes the message.

To achieve this, I'm thing creating JMS queue with different name in different nodes. WAS ND 6.1 does allow create queue at server level rather than cluster level so this should be OK. And for the JMS producer it's not a problem either as we can make the queue JNDI name as a parameter and set to different values in different node. However I don't know how to configure the deployment descriptor for this case. Can I just specify a logic name of the destination in the deployment descriptor, and then on different WAS node maps the same logic name to different queue name?

I'm going to give this a try but it will take a while to setup a WAS network deployment environment. If anybody has experience on this, or have better idea to achieve this please let me know. Thank you.
MDB-Question.png
[Thumbnail for MDB-Question.png]
 
Eric Xin Zhang
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just an update to the post.

In WebSphere 6.1 the queue connection factory, queue and activation spec can all be configured at server level rather than cluster level, and the jdni names can all be same. I just created a simple servlet (as JMS producer) + a MDB (as the JMS consumer) and tested it in a WebSphere network deployment environment, and everything works as expeted, i.e. the JMS producer and consumer will only access the server-scope JMS queue. If I stop the messaging engine in one server, the messages in the queue of the server will be hold but not consumed by the MDB on the other server.
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic