Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JCA resource Adapter and Web Services

 
Benson Fung
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am studying the JCA resource adapter. I am questioning myself.
If I would like to let the EJB access a legacy system, why do we need to use JCA resource adapter to integrate with the legacy sytem?
In fact, I can setup a web services interface in the legacy sytem and expose the some public methods to the EJB, then EJB can connect to the legacy to the system by using the generated stub code.

My question what is the pros and cons of using resouce adapter to integrate with the legacy sytem?

And why don't we use web services to integrate with each other?


Please help

Thanks
benson
 
Steve Wink
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Benson Fung:
Hi all,

I am studying the JCA resource adapter. I am questioning myself.
If I would like to let the EJB access a legacy system, why do we need to use JCA resource adapter to integrate with the legacy sytem?
In fact, I can setup a web services interface in the legacy sytem and expose the some public methods to the EJB, then EJB can connect to the legacy to the system by using the generated stub code.

My question what is the pros and cons of using resouce adapter to integrate with the legacy sytem?

And why don't we use web services to integrate with each other?


Please help

Thanks
benson


One reason why you may want to use JCA instead of web services is transactions.

Your JCA resource could participate in an XA transaction if it was written to the XA spec, and if its a JCA 1.5 resource it could even propogate the transaction. Web Services cannot participate in a two phase commit transaction ( although all the processing inside the web service could be part of one transaction. )

If its not transactional and it has a web services interface you may as well use that.
 
Chintan Rajyaguru
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can setup a web services interface in the legacy sytem

How would you do that? Interface is fine but behind the scene you must have implementation that will process SOAP and call legacy API. Unless your legacy system's vendor provides such tools, it could be a significant development effort.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic