本文整理汇总了Java中org.apache.openjpa.conf.OpenJPAConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java OpenJPAConfiguration类的具体用法?Java OpenJPAConfiguration怎么用?Java OpenJPAConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OpenJPAConfiguration类属于org.apache.openjpa.conf包,在下文中一共展示了OpenJPAConfiguration类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getUnsupportedOptions
import org.apache.openjpa.conf.OpenJPAConfiguration; //导入依赖的package包/类
@Override
protected Collection<String> getUnsupportedOptions() {
Collection<String> unsupportedOptions = super.getUnsupportedOptions();
unsupportedOptions.remove(OpenJPAConfiguration.OPTION_ID_DATASTORE);
unsupportedOptions.remove(OpenJPAConfiguration.OPTION_OPTIMISTIC);
unsupportedOptions.remove(OpenJPAConfiguration.OPTION_INC_FLUSH);
return unsupportedOptions;
}
示例2: updateClusterAddresses
import org.apache.openjpa.conf.OpenJPAConfiguration; //导入依赖的package包/类
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);
}
}
示例3: setUp
import org.apache.openjpa.conf.OpenJPAConfiguration; //导入依赖的package包/类
@Before
public final void setUp() throws SQLException, LiquibaseException {
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("panifex");
entityManager = entityManagerFactory.createEntityManager();
OpenJPAEntityManagerFactorySPI kemf = (OpenJPAEntityManagerFactorySPI) OpenJPAPersistence.cast(entityManagerFactory);
OpenJPAConfiguration conf = kemf.getConfiguration();
DataSource dataSource = (DataSource) conf.getConnectionFactory();
Connection conn = dataSource.getConnection();
createTables(conn);
insertTestData(conn);
}
示例4: BrokerFactory
import org.apache.openjpa.conf.OpenJPAConfiguration; //导入依赖的package包/类
protected BrokerFactory(OpenJPAConfiguration config) {
super(config);
}
示例5: newConfiguration
import org.apache.openjpa.conf.OpenJPAConfiguration; //导入依赖的package包/类
@Override
protected OpenJPAConfiguration newConfiguration() {
return new SpaceConfiguration();
}