Spring Framework JndiDataSourceLookup - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework JndiDataSourceLookup class.

This code example shows how to use the following methods:getDataSource
@ComponentScan 
public class Config { 
 
	@Bean 
	public DataSource dataSource() {
		JndiDataSourceLookup dataSourceLookup = new JndiDataSourceLookup();
		return dataSourceLookup.getDataSource("java:jboss/datasources/springdemo");
	} 
 
	@Bean 
	public JtaTransactionManager transactionManager() { 
		return new JtaTransactionManager(); 
	} 
 
	@Bean 
	public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
		LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
		em.setJtaDataSource(dataSource());
		em.setPackagesToScan(new String[] { "com.test.wildflytransactions" });
		HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
5
CodeRank
This code example shows how to use the following methods:getDataSource
        } 
    } 
 
    private DataSource lookupUsingJndi()
    { 
        final JndiDataSourceLookup lookup = new JndiDataSourceLookup();
        return lookup.getDataSource( this.jndiName );
    } 
 
    private DataSource createEmbeddedDatabase()
    { 
        this.embeddedDatabase.initialize();
        return this.embeddedDatabase.getDataSource();
    } 
 
    public DataSource getObject()
    { 
        return this.dataSource;
    } 
 
4
CodeRank
This code example shows how to use the following methods:
See Code Examples for Spring Framework JndiDataSourceLookup Methods: