2 Replies Latest reply on Feb 17, 2002 11:38 PM by davehawley

    Custom containers?

    davehawley

      ** Alert: J2EE Newbie post **

      I'm working on a framework for reactive software agents which I'd like to embed in J2EE. An important issue is scalability, so the goal is to provide mechanisms to control the lifecycle of the agents, provide caching of incoming messages from subscriptions, etc.

      I'm considering some kind of container for a group of these agents working on a "problem" reified as a bean.
      Question is should the container for this bean be one in the EJB sense, and if so, how can I integrate this new container type into J2EE. To rephrase: is this a stupid idea?

      I've looked at the 2.4.4 source; the ContainerFactory hardcodes the selection of the Container type and part of the initialization code for each of the 4 types. Are there plans to make this extensible? If not, would anyone else be interested in such functionality?


      TIA.

        • 1. Re: Custom containers?
          davidjencks

          What features of the j2ee environment do you want to use?

          Why would j2ee be more appropriate than say jini + javaspaces?

          If you used j2ee, why do you think you need another kind of container?

          Have you considered mbeans?

          • 2. Re: Custom containers?
            davehawley


            The J2EE-compliant deployment environment is a given. JNDI, JMX are leverageable I think. Possibly also JMS; see below.

            For the backend, a tuplespace might work - I've evaluated Javaspaces and IBM's TSpaces and come up with possible embeddings, but neither have enough flexibility to meet the requirements perfectly. An alternative is unbundling of the data model (ie. tuples), persistence, access and publish-subscribe mechanisms which could improve both functionality and scalability. So I'll also be taking a look at JMS.

            I like the idea of containers providing lifecycle management with the associated message interception, etc. to the objects they contain. As far as I can tell, J2EE containers manage instances of a single J2EE Bean class. I'd like to manage a single "problem space" which I guess would be the J2EE bean, but also allow for configuration of multiple agents associated with the space. So that's why I wonder whether J2EE containers are appropriate, and even if that's the case, whether I need to provide a custom container.

            My problem is that despite a fair bit of J2EE background reading and some hands on, I don't have a good mental model of the J2EE technologies onto which I can map my logical architecture. Any and all help is appreciated.