Socket programming disallowed in EJB

Discussions

General J2EE: Socket programming disallowed in EJB

  1. Socket programming disallowed in EJB (3 messages)

    One of the many EJB programming restrictions in the J2EE spec is = must not attempt to listen on a socket, accept connections on a socket, or use a socket for multicast.

    Could anyone enlighten me as to why this restriction has been defined??
  2. Socket programming disallowed in EJB[ Go to top ]

    Because the app server is in control of the life-cycle of a bean, it doesn't make sence to start listening to a socket. The bean can be removed from the app server at any time.

    Barri
  3. Use JCA Instead as a solution[ Go to top ]

    The best way to extend the capabilities of your appservers in a managed way is to use the J2EE Connector Architecture. http://www.javaworld.com/javaworld/jw-11-2001/jw-1121-jca.html is a good starting point.

    Regards,
    Max
  4. There is an excellent article in WLDJ that covers the reasoning behind the EJB container restrictions as well as valid work arounds. I think the article was prodcued about 6 months ago - www.sys-con.com