You'll have to use a separate classloader for each ear.
Look at the wiki's for classloading / scoped classloading config.
Here i think one more option for this. that is i am going to deploy only one war file of my hosted service and for earch domain i need to deply new JAR or EAR file which contains the EJB part.
Now in each Jar file of an EJB the business logic and all jar files are same but only the deployment description is differnt (ejb-jar.xml and jboss.xml). In this deployment descriptor i can give the different prefix for that JNDI NAME call.
so when my cllient (From the common war file) call (lookup) an ejb at that it call like ::
but i need to confirm that when i am going to deploy different jar or ear file for earch domain and only one war file which calls the ejb method for earch domain then the class loader for each jar or ear file are different or same??
And if it is same then is it possible to make this class loader different ??
So please help me for this one.