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

JCA JMS simple example

 
Chris Hurst
Ranch Hand
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm playing with JCA to integrate a legacy socket server with say glassfish (or any other J2EE 5 server), I wish to deploy a simple resource adapter that will take in (incoming) raw ip coma delimited string messages, by listening on a port and spit them out on to a JMS queue for processing , I can see how to do it but I feel like I must be reinventing the wheel before I expend any effort has anyone done this , or got some good links.

A lot of the examples on the net are half baked code snippets.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm playing with JCA to integrate a legacy socket server with say glassfish (or any other J2EE 5 server), I wish to deploy a simple resource adapter that will take in (incoming) raw ip coma delimited string messages, by listening on a port and spit them out on to a JMS queue for processing , I can see how to do it but I feel like I must be reinventing the wheel before I expend any effort has anyone done this , or got some good links.


If the legacy socket server is proprietary, you will need to write the resource adapter code (in accordance with the system-level contracts defined by the JCA specification). This translates into writing code to satifisy the required contracts of: Connection, Transaction and Security.

Once you have the resource adapter written, then you need to connect it to the JCA CCI API that you will expose to your application.

When your socket server receives some data, it sends it to a Java component which will put it on a JMS queue. You can then implement a Message-driven EJB to listen to the queue and execute further processing.
[ July 03, 2008: Message edited by: James Clark ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic