站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

JndiCallback (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.jndi
Interface JndiCallback


public interface JndiCallback

Callback interface to be implemented by classes that need to perform an operation (such as a lookup) in a JNDI context. This callback approach is valuable in simplifying error handling, which is performed by the JndiTemplate class. This is a similar to JdbcTemplate's approach.

Note that there is hardly any need to implement this callback interface, as JndiTemplate provides all usual JNDI operations via convenience methods.

Author:
Rod Johnson
See Also:
JndiTemplate, JdbcTemplate

Method Summary
 Object doInContext(Context ctx)
          Do something with the given JNDI context.
 

Method Detail

doInContext

Object doInContext(Context ctx)
                   throws NamingException
Do something with the given JNDI context. Implementations don't need to worry about error handling or cleanup, as the JndiTemplate class will handle this.

Parameters:
ctx - the current JNDI context
Returns:
a result object, or null
Throws:
NamingException - if thrown by JNDI methods

The Spring Framework

Copyright © 2002-2007 The Spring Framework.