3 Replies Latest reply on Jan 10, 2007 6:56 AM by ktorn

    JCA as a UDP interface (design query)

    ktorn

      Hi all.

      I'm about to implement a Resource Adaptor to act as a UDP interface between an EIS and a J2EE application.

      The EIS currently broadcasts UDP packets requesting a service and expects UDP packets with the responses. It is an asynchronous system.

      Outside a JBoss environment I would implement Java inbound and outbound daemon threads. The former would listen to the UDP socket and delegate any requests to the business tier, and the latter would dispatch responses via UDP back to the EIS.

      However within JBoss, and according to J2EE 1.4, the best approach to implement this 'daemon' seems to be JCA 1.5.

      In this case my UDPResourceAdaptor would act as both inbound and outbound interface, delegating requests to MDBs and sending the responses via UDP.

      I just want a final sanity check before I start cutting the code. Is this the right design? If there is a better (simpler) alternative then I'd really like to hear about it.

      Regards

      Dan

        • 1. Re: JCA as a UDP interface (design query)
          weston.price

          Sounds reasonable. I am sure there are a variety of UDP based communication frameworks that can probably be used a starting point and then put in a JCA wrapper, or you could just build from the ground up.


          If there is a better (simpler) alternative then I'd really like to hear about it.


          Note, don't immediately think of JCA as complex or hard in and of itself. Some of the communication patterns you see on projects like this (ie UDP, SNMP etc) will be addressed in the JCA 2.0 spec. For now, I'd say you have a pretty solid plan.



          • 2. Re: JCA as a UDP interface (design query)
            ktorn

            Thanks!

            • 3. Re: JCA as a UDP interface (design query)
              ktorn

              Having written the UDP RA, is it possible to get any loadbalancing out of running it in a JBoss cluster?

              After reading http://www.jboss.com/index.html?module=bb&op=viewtopic&t=86104 it looks like not, but I'd like to double check.

              In my case the RAs don't need to share any data, they are 100% independent. All I need is for the load balancer to distribute the incoming UDP packets (unicast, not broadcast as I stated before) in a round-robin fashion, amongst the all the nodes. No 'sticky-session'-like behaviour required at all.