File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and Other Java EE Technologies and the fly likes Dispatch messages system design consult Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and Other Java EE Technologies
Reply Bookmark "Dispatch messages system design consult" Watch "Dispatch messages system design consult" New topic
Author

Dispatch messages system design consult

ray frid
Ranch Hand

Joined: Dec 23, 2010
Posts: 59
I have a design question and would like to have suggestions.

I am using Weblogic 11g, EJB3.0

I have a system which it's target to retrieve and dispatch messages to couple of resources(databases).

Each message contain information and target database key.

So here is an flow example:

I get from web service a message and key target. I parse the message and dispatch it to the right database via the key target.

There is a possibility that a message will contain more then one target database.(for example the key 'all' means that I should dispatch to all databases.

If Insert is failing in one of the resources a rollback will occurred and I a re-try will re-execute the whole operation.

So now this is my issue:

Should I make the number of the queues as the number of my resources? (and dedicated each Queue to a specific resource)

(In this case I parse each message and just send it to the right queue while an MDB will listen and do the insertion to the right database)

If I do it that way I wont be able to make it dynamic, Meaning each time a new resource will need to be added/removed in the future I will need to open the code and make the right changes.

What you desgigners think? How could I implement it better dynamiclly?

thanks for your help,

ray
Andrew Moko
Ranch Hand

Joined: Dec 16, 2011
Posts: 55
I would have a property file that stores the queue name alongside the target database.

The program will have to create/ maintain all queues on the property file. An incoming message looks up the queue name given the key (target dbase). You won't have to worry about changing code,, you just have to deal with the property file configurations..

Hope this helps.

God luck!
 
 
subject: Dispatch messages system design consult
 
Threads others viewed
Share parts of my choice.txt with javaranchers
Using Tomcat Standard Resource Factories
Test 296 - Websphere MQ Solution Design
Test 252: Mock exam
please answer this 128 questions for WLS. Urgently!
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com