I want to partition my application based on my users' organizations. I want all users from orgA to use a datasource using credentials orgA/orgA, form org. B to use orgB/orgB, etc.
The way I am trying to acheive this is to create separate EAR files, 1 per org, change the datasource setting and the JNDI names and deploying them by copying to "deploy" folder. So I have orgA.ear, orgB.ear with everything else the same except for the datasource credentials and JNDI bindings. Is this the correct approah ? Are there better ways of doing this?