I have a stateless ejb acting as an API for a complex database. The ejb-jar defines there is one datasource needed: "jdbc/database".
Now, what if i have 10 databases, all of the same kind (structure) but containing different data. Is it ok to deploy 10 different ears, containing the same code, except for the jboss.xml files, which will map a different datasource each time, and give that ejb a jndi name?
What happens in one jboss server if it receives 10 times the same jar's containing the same classes? Does jboss "know" that, or will it use different classes for each ear, ignoring the fact that it is the same class?