JNDI
Hibernate does optionally interact with JNDI on the application’s behalf. Generally, it does this when the application:
-
has asked the SessionFactory be bound to JNDI
-
has specified a DataSource to use by JNDI name
-
is using JTA transactions and the
JtaPlatformneeds to do JNDI lookups forTransactionManager,UserTransaction, etc
All of these JNDI calls route through a single service whose role is org.hibernate.engine.jndi.spi.JndiService.
The standard JndiService accepts a number of configuration settings
hibernate.jndi.class-
names the javax.naming.InitialContext implementation class to use. See
javax.naming.Context#INITIAL_CONTEXT_FACTORY hibernate.jndi.url-
names the JNDI InitialContext connection url. See
javax.naming.Context.PROVIDER_URL
Any other settings prefixed with hibernate.jndi. will be collected and passed along to the JNDI provider.
|
The standard |