Example usage for org.apache.ibatis.datasource.jndi JndiDataSourceFactory ENV_PREFIX

List of usage examples for org.apache.ibatis.datasource.jndi JndiDataSourceFactory ENV_PREFIX

Introduction

In this page you can find the example usage for org.apache.ibatis.datasource.jndi JndiDataSourceFactory ENV_PREFIX.

Prototype

String ENV_PREFIX

To view the source code for org.apache.ibatis.datasource.jndi JndiDataSourceFactory ENV_PREFIX.

Click Source Link

Usage

From source file:org.mybatis.guice.datasource.builtin.JndiDataSourceProvider.java

License:Apache License

/**
 * Sets the env initial context factory.
 *
 * @param initialContextFactory/*from   w  w w .j a v a2s. c  om*/
 *          the new env initial context factory
 */
@com.google.inject.Inject(optional = true)
public void setEnvInitialContextFactory(
        @Named(Context.INITIAL_CONTEXT_FACTORY) final String initialContextFactory) {
    properties.setProperty(JndiDataSourceFactory.ENV_PREFIX + Context.INITIAL_CONTEXT_FACTORY,
            initialContextFactory);
}

From source file:org.mybatis.guice.datasource.builtin.JndiDataSourceProvider.java

License:Apache License

/**
 * Sets the env provider URL./*  w ww  .jav a  2  s.  c  o m*/
 *
 * @param providerUrl
 *          the new env provider URL
 */
@com.google.inject.Inject(optional = true)
public void setEnvProviderURL(@Named(Context.PROVIDER_URL) final String providerUrl) {
    properties.setProperty(JndiDataSourceFactory.ENV_PREFIX + Context.PROVIDER_URL, providerUrl);
}