Search in sources :

Example 1 with OpenJPAConfiguration

use of org.apache.openjpa.conf.OpenJPAConfiguration in project openmeetings by apache.

the class ConfigurationDao method updateClusterAddresses.

public void updateClusterAddresses(String addresses) throws UnknownHostException {
    OpenJPAConfiguration cfg = ((OpenJPAEntityManagerSPI) OpenJPAPersistence.cast(em)).getConfiguration();
    RemoteCommitProvider prov = cfg.getRemoteCommitEventManager().getRemoteCommitProvider();
    if (prov instanceof TCPRemoteCommitProvider) {
        ((TCPRemoteCommitProvider) prov).setAddresses(addresses);
    }
}
Also used : OpenJPAConfiguration(org.apache.openjpa.conf.OpenJPAConfiguration) TCPRemoteCommitProvider(org.apache.openjpa.event.TCPRemoteCommitProvider) OpenJPAEntityManagerSPI(org.apache.openjpa.persistence.OpenJPAEntityManagerSPI) TCPRemoteCommitProvider(org.apache.openjpa.event.TCPRemoteCommitProvider) RemoteCommitProvider(org.apache.openjpa.event.RemoteCommitProvider)

Aggregations

OpenJPAConfiguration (org.apache.openjpa.conf.OpenJPAConfiguration)1 RemoteCommitProvider (org.apache.openjpa.event.RemoteCommitProvider)1 TCPRemoteCommitProvider (org.apache.openjpa.event.TCPRemoteCommitProvider)1 OpenJPAEntityManagerSPI (org.apache.openjpa.persistence.OpenJPAEntityManagerSPI)1