T
- the resulting object type@FunctionalInterface public interface JndiCallback<T>
Note that there is hardly any need to implement this callback interface, as JndiTemplate provides all usual JNDI operations via convenience methods.
JndiTemplate
,
JdbcTemplate
Modifier and Type | Method and Description |
---|---|
T |
doInContext(Context ctx)
Do something with the given JNDI context.
|
@Nullable T doInContext(Context ctx) throws NamingException
Implementations don't need to worry about error handling or cleanup, as the JndiTemplate class will handle this.
ctx
- the current JNDI contextnull
NamingException
- if thrown by JNDI methods