Deploy shared resources global, use different loader-repositories for duplicate resources (classes e.g. your bean classes with differen deployment descriptors and jndi names).
Configure your beans to use the ByValueInvoker when calling a bean located in another loader-repository.
Read the DTDs of the deployment descriptors to learn more about the configuration of your beans. There are also many thread in this forum covering this issue.