當前位置: 首頁>>代碼示例>>Java>>正文


Java JpaTransactionManager.setEntityManagerFactory方法代碼示例

本文整理匯總了Java中org.springframework.orm.jpa.JpaTransactionManager.setEntityManagerFactory方法的典型用法代碼示例。如果您正苦於以下問題:Java JpaTransactionManager.setEntityManagerFactory方法的具體用法?Java JpaTransactionManager.setEntityManagerFactory怎麽用?Java JpaTransactionManager.setEntityManagerFactory使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.orm.jpa.JpaTransactionManager的用法示例。


在下文中一共展示了JpaTransactionManager.setEntityManagerFactory方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: responseHighlighterInterceptor

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
/**
	 * This interceptor adds some pretty syntax highlighting in responses when a browser is detected
	 */
/*	@Bean(autowire = Autowire.BY_TYPE)
	public IServerInterceptor responseHighlighterInterceptor() {
		ResponseHighlighterInterceptor retVal = new ResponseHighlighterInterceptor();
		return retVal;
	}*/

	/*	@Bean(autowire = Autowire.BY_TYPE)
	public IServerInterceptor subscriptionSecurityInterceptor() {
		SubscriptionsRequireManualActivationInterceptorDstu3 retVal = new SubscriptionsRequireManualActivationInterceptorDstu3();
		return retVal;
	}*/

	@Bean
	public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
		JpaTransactionManager retVal = new JpaTransactionManager();
		retVal.setEntityManagerFactory(entityManagerFactory);
		return retVal;
	}
 
開發者ID:Discovery-Research-Network-SCCM,項目名稱:FHIR-CQL-ODM-service,代碼行數:22,代碼來源:FhirServerTestConfigDstu3.java

示例2: transactionManagerEvents

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Autowired
@Bean
public PlatformTransactionManager transactionManagerEvents(@Qualifier("eventsEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:8,代碼來源:JpaEventsConfiguration.java

示例3: transactionManagerGoogleAuthenticator

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Autowired
@Bean
public PlatformTransactionManager transactionManagerGoogleAuthenticator(
        @Qualifier("googleAuthenticatorEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:9,代碼來源:GoogleAuthenticatorJpaConfiguration.java

示例4: transactionManagerMfaAuthnTrust

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Autowired
@Bean
public PlatformTransactionManager transactionManagerMfaAuthnTrust(
        @Qualifier("mfaTrustedAuthnEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:9,代碼來源:JdbcMultifactorAuthnTrustConfiguration.java

示例5: transactionManagerServiceReg

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Autowired
@Bean
public PlatformTransactionManager transactionManagerServiceReg(@Qualifier("serviceEntityManagerFactory")
                                                               final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:9,代碼來源:JpaServiceRegistryConfiguration.java

示例6: transactionManagerConsent

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Autowired
@Bean
public PlatformTransactionManager transactionManagerConsent(
        @Qualifier("consentEntityManagerFactory") final EntityManagerFactory emf) {
    final JpaTransactionManager mgmr = new JpaTransactionManager();
    mgmr.setEntityManagerFactory(emf);
    return mgmr;
}
 
開發者ID:mrluo735,項目名稱:cas-5.1.0,代碼行數:9,代碼來源:CasConsentJdbcConfiguration.java

示例7: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean(name="transactionManager")
public JpaTransactionManager transactionManager(
        EntityManagerFactory entityManagerFactory) {
    JpaTransactionManager jtm = new JpaTransactionManager();
    jtm.setEntityManagerFactory(entityManagerFactory);
    return jtm;
}
 
開發者ID:biblelamp,項目名稱:JavaEE,代碼行數:8,代碼來源:AppConfig.java

示例8: getPlatformTransactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
public PlatformTransactionManager getPlatformTransactionManager(final EntityManagerFactory emf) {
    final JpaTransactionManager transactionManager = new JpaTransactionManager();
    transactionManager.setDefaultTimeout(ApplicationProperties.getAsInteger(JWALA_JTA_TRANSACTION_TIMEOUT, 30));
    transactionManager.setEntityManagerFactory(emf);
    return transactionManager;
}
 
開發者ID:cerner,項目名稱:jwala,代碼行數:8,代碼來源:AemJpaConfiguration.java

示例9: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
@Autowired
public PlatformTransactionManager transactionManager(EntityManagerFactory emf) throws NamingException {
	JpaTransactionManager jpaTransaction = new JpaTransactionManager();
	jpaTransaction.setEntityManagerFactory(emf);
	return jpaTransaction;
}
 
開發者ID:Azanx,項目名稱:Smart-Shopping,代碼行數:8,代碼來源:JPAConfig.java

示例10: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
public PlatformTransactionManager transactionManager() {
    JpaTransactionManager txManager = new JpaTransactionManager();
    txManager.setDataSource(dataSourceH2());
    txManager.setEntityManagerFactory(entityManagerFactory().getObject());
    return txManager;
}
 
開發者ID:rumatoest,項目名稱:jdblender,代碼行數:8,代碼來源:Config.java

示例11: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
@Autowired
public JpaTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
    JpaTransactionManager txManager = new JpaTransactionManager();
    JpaDialect jpaDialect = new HibernateJpaDialect();
    txManager.setEntityManagerFactory(entityManagerFactory);
    txManager.setJpaDialect(jpaDialect);
    return txManager;
}
 
開發者ID:VHAINNOVATIONS,項目名稱:BCDS,代碼行數:10,代碼來源:DatabaseConfiguration.java

示例12: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
public PlatformTransactionManager transactionManager() {

	JpaTransactionManager txManager = new JpaTransactionManager();
	txManager.setEntityManagerFactory(entityManagerFactory().getObject());
	return txManager;
}
 
開發者ID:paulcwarren,項目名稱:spring-content,代碼行數:8,代碼來源:EnableJpaStoresTest.java

示例13: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
/**
 * Transaction manager.
 *
 * @return the platform transaction manager
 */
@Bean
public PlatformTransactionManager transactionManager() {
    JpaTransactionManager tm = new JpaTransactionManager();
    tm.setEntityManagerFactory(this.entityManagerFactory().getObject());
    return tm;
}
 
開發者ID:nipunthathsara,項目名稱:Audit4j-Hibernate,代碼行數:12,代碼來源:PersistanceConfig.java

示例14: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
@Bean
@Autowired
public PlatformTransactionManager transactionManager(EntityManagerFactory emf) {
    JpaTransactionManager txManager = new JpaTransactionManager();
    txManager.setEntityManagerFactory(emf);
    return txManager;
}
 
開發者ID:sgskinner,項目名稱:StashThisBot,代碼行數:8,代碼來源:StashThisConfiguration.java

示例15: transactionManager

import org.springframework.orm.jpa.JpaTransactionManager; //導入方法依賴的package包/類
/**
 * 配置 Spring 事務管理器
 */
@Bean
public PlatformTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) {
    JpaTransactionManager jpaTransactionManager = new JpaTransactionManager();
    jpaTransactionManager.setEntityManagerFactory(entityManagerFactory);
    return jpaTransactionManager;
}
 
開發者ID:izhangzhihao,項目名稱:SpringMVCWithJavaConfig,代碼行數:10,代碼來源:JPAConfig.java


注:本文中的org.springframework.orm.jpa.JpaTransactionManager.setEntityManagerFactory方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。