2 Replies Latest reply on Aug 17, 2006 6:34 AM by aidan_b5

    Multiple instances of EJBs

    aidan_b5

      Hi,

      A requirement i have for an application is that it uses 3 identical databases.
      It makes sense to have one set of entity bean classes, dao classes and facade on top to manage if possible each of the three.

      How do I configure the facade, entity manager and/or persistence.xml so that the application can look up the correct facade intance or tell the facade to use the correct DAO instances?

      Currently the facade and DAOs are implemented as stateless session beans.

      Thanks

        • 1. Re: Multiple instances of EJBs
          smokingapipe

          What exactly do you mean, three identical databases? If you really need to mirror databases, that may be something to do at the database server software level, not within EJB.

          • 2. Re: Multiple instances of EJBs
            aidan_b5

            Sorry, bad wording. Three databases structured in exactly the same way but holding different information.

            What I would like to do is use one set of components (Facade/EJB/Entity) to access each of the three depending on dynamic configuration. So I'm thinking that I either need to deploy 3 instances of these components under different jndi names? or is there some other way of doing this that i don't know about?