Socket Server Implementation in J2EE using JDK 1.3.1


EJB design: Socket Server Implementation in J2EE using JDK 1.3.1

  1. Hi,

    J2EE App is talking to some hardware devices. These hardware devices can only interact with app using sockets. when hardware device sends some messages J2EE app has to listen to them and parse the message and based on message content it has to talk to ejb's and do some transaction stuff. I would appreciate if anybody suggest me good design approach. The main catch here is we can not use JDK1.4 worker manager threads ,RA and JCA 1.5


    Threaded Messages (3)

  2. JMX can be used[ Go to top ]

    Using JMX that instruments the device and act as the service.
    You can use Message Driven Bean and JMX Agent that instruments the Device and passes to Bean.
  3. JMX can be used[ Go to top ]

    could you elaborate little more on that. i am looking for socket listner sitting in J2EE app and will be listining at one port. when ever it gets a message then based on the content it has to do invoke some session bean to do the transaction work
  4. JMX can be used [more][ Go to top ]

    A device is wrapped as the jmx MBean. This is responsible for creation of the connection and fetching of the message from it.

    Create a MessageService thread whose resopnsiblity is to use the MBean and perform the cyclic lookup. If the message has arrived that message is fetched form the mobile using MBean and inserted in the message queue to which Message Driven Bean is listeneing to.

    The Message Driven Bean performs the business operation on the message. you can as well delegate the message to other Session Bean.


    You can deploy your Message service easily on JBoss as MBean. Other might have their own way of executing set of code fro the customer as the server starts.