JCA & XML Messaging

Dana <[email protected]> Sat, 11 Jan 2003 00:10:35 -0000
Newsgroups gmane.comp.java.sun.connector
Message-ID <002101c2b905$dd0802e0$f07227d9@localhost>
Hi, 

At the moment I'm thinking about implementing XML Messaging. 
Here is the scenario. 

Assume an existing application written in PowerBuilder using mySQL, name it P, 
and another existing one written in Oracle Form using Oracle9i, name it F. 
P provide a customer data, such as id, name, address, etc. 
F provide an exchange rate data, GBP<->USD, USD<->EUR, GBP<->EUR, etc 

I would like everytime P's user create or modify any customer data : 
1. the data need to be sent using XML to F 
2. F sends an acknowledgement back to P. 
3. F will do its business process. 
Same thing with F, everytime F's user create or modify any exchange rate data 
1. the data need to be sent using XML to P 
2. P sends an acknowledgement back to F. 
3. P will do its business process. 

For this case study, a loosely coupled architecture is the best approach. 
What I can see, for now, is to create an adapter. 
Using a properties file, that adapter will pull out any P/F data 
( a new or a modified one ),generate an appropriate XML file, 
the send into a JMS Server. So it will do #1, #2, and #3. 
For that, the data model within P and F need to be changed. 
A new column need to be added in both customer data and exchange rate data. 
Possible values for that column are, for example : 
1. 'N' new data 
2. 'M' modified data 
3. 'X' XML file generated 
4. 'D' done 
etc, etc. 
With this approach, the existing P or F remains unchanged, only the data model. 

Another possibility is to modify the existing application P or F push out any 
new or modified data, then generate the appropriate XML file. That's it. 
Neither PowerBuilder or Oracle Form don't know how to send it into JMS Server. 

How the JCA fit into this scenario ?
Any comments on this case study ? Design Patterns, articles, white-papers, etc ?

Thanks.