you'll have to configure the two differently somehow. If you require them to have the same persistence.xml file, you can have a separate hibernate.properties containing additional elements, or just define environment variables.
For the case of "same VM", why would you use Master/Slave ?
BTW I'm working on an alternative to Master/Slave: an "auto" setting but it's meant for the JGroups backend only, which happens to work nicely on clouds as well. This might show up in the next release as experimental.
As an easy alternative you could share indexes though the Infinispan module.
_________________ Sanne http://in.relation.to/
|