|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.runtime.api.DataSourceHelper
public class DataSourceHelper
Helper class to look up DataSource
s without having to deal with
vendor-specific JNDI prefixes.
Field Summary | |
---|---|
static String |
DEFAULT_PREFIX
|
static String |
PREFIX_PROPERTY
|
Method Summary | |
---|---|
static void |
autodetectPrefix()
|
static DataSource |
getDataSource(String partialName)
Look up a datasource given a partial name. |
static String |
getDataSourceJNDIName(String partialName)
Look up a datasource JNDI name given a partial name. |
static String |
getDataSourceJNDIPrefix()
Get the JNDI prefix used for DataSource lookups. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PREFIX_PROPERTY
public static final String DEFAULT_PREFIX
Method Detail |
---|
public static void autodetectPrefix()
public static String getDataSourceJNDIPrefix()
public static String getDataSourceJNDIName(String partialName)
For a datasource "jdbc/foo"
, then it's sufficient to pass "foo"
to this method.
partialName
- the partial name
public static DataSource getDataSource(String partialName) throws NamingException
For a datasource "jdbc/foo"
, then it's sufficient to pass "foo"
to this method.
partialName
- the partial name
NamingException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |