1 Reply Latest reply on Jan 30, 2002 3:47 AM by ppetit

    Entity Beans and JMS design question

    Mike Squance Newbie


      We want to publish a JMS message within a create or business method of an entity bean. There is the possibility of thousands of entity beans of this type in existence.

      The problem is that to do this, each entity bean must establish a connection to JMS. This results in a huge performance/memory hit and grinds the system to a halt.

      Can anyone think of a decent way to address this? The only approaches that I've thought of would involve passing in the JMS connection object(s) to the entity bean methods or to use a session bean instead of entity beans.

      I guess the general case is a solution for sharing a resource that has been configured among entity beans.

      Thanks for any help,

        • 1. Re: Entity Beans and JMS design question
          ppetit Newbie

          could you give more details about the mecanism you need.
          I already did such an implementation through the use of a singleton accessed by a MDB and this singleton fires a PropertyChange event to local listeners that could be other EJBs. But this only works if within the same JVM. This could be extended to remote JVM by implementation of serialized forms of my poperties to set up a "remote" Observable pattern.
          So, to resume I use only one MDB to handle client message queues and this MDB references a singleton to spray changes to listeners.

          Thats an idea...
          hope this helps, regards,