1 Reply Latest reply on Jan 6, 2004 2:30 PM by juha

    Multiple datasources for entity EJB?

    richaosu

      I have 100 datasources with the same schema. For example, one of the tables in the schema is Customer. I have a CMP entity EJB for the Customer table. What is the best way to deploy the Customer EJB so it can be used for any or all of the 100 datasources? Do I create 100 EJB names and bind each to a datasource? (This would create a lot of redundant code in the ejb-jar.xml and jbosscmp-jdbc.xml files.) Is there a way to bind an entity EJB to a datasource when the entity instance is created at run-time?