I have multiple ear deployed in my Jboss7.1 CR1 server. Each of the two ears have their own datasources and use hibernate for persistence.
When the server starts my ear1 binds an object into JNDI. This binded object loads all the hibernate configurations before binding.
After this my second ear tried to do a look up for that ear1's binded object and calls a methods which internally tries to store data into ear1's datasource. But it is not able to commit that data. i.e. the data persisted from ear2's context using the ear1's binding object is not comitted.
We found some links for the same related to JBoss5.1