Created
October 25, 2013 05:32
-
-
Save maravilloso/7149825 to your computer and use it in GitHub Desktop.
Conexión manual a BD Informix como recurso JNDI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.mock.jndi.SimpleNamingContextBuilder; | |
import com.informix.jdbcx.IfxDataSource; | |
final IfxDataSource ds = new IfxDataSource(); | |
ds.setIfxIFXHOST("1.2.3.4"); | |
ds.setPortNumber(5000); | |
ds.setUser("user"); | |
ds.setPassword("clave"); | |
ds.setServerName("ids_server"); | |
ds.setDatabaseName("dbname"); | |
final SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder(); | |
builder.bind("java:/RESNAME", ds); | |
builder.activate(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment