Info about EJB, SNMP and SUN JDMK package.

Philipp Meier

How do I use EJB with SUN JDMK package? Because JDMK uses sockets, is that mean I can't use in my bean? What is the exact reason? What are all the 3rd party packages/API I can use with EJB ? How the restrictions comes?

The reason that opening sockets is forbidden with EJB is that e.g. your EJB could run in a clustered environment and multiple call to the same EJB might be executed on different hosts which could lead to problems.

Therefore it's the application container's job to manage e.g. JDBC Connections which are guaranteed to work in a clustered environment.

Additional info: What restrictions are imposed on an EJB? That is, what can't an EJB do?.