2011-05-31 70 views
0

我有一个奇怪的问题,我在阅读Spring集成文档,在“19. Remoting and web services using Spring”部分下,有一个接口,但它并未在任何地方使用。为什么文档谈论这个接口呢?RMI:RemoteAccountService扩展远程

public interface RemoteAccountService extends Remote { 
    public void insertAccount(Account account) throws RemoteException; 
    public List<Account> getAccounts(String name) throws RemoteException; 
} 

回答

1

它得到部分19.5.1实现了JAX-RPC包装类。粘贴第19.5.1部分的前几行讨论如下: -

/** 
* JAX-RPC compliant RemoteAccountService implementation that simply delegates 
* to the AccountService implementation in the root web application context. 
* 
* This wrapper class is necessary because JAX-RPC requires working with dedicated 
* endpoint classes. If an existing service needs to be exported, a wrapper that 
* extends ServletEndpointSupport for simple application context access is 
* the simplest JAX-RPC compliant way. 
* 
* This is the class registered with the server-side JAX-RPC implementation. 
* In the case of Axis, this happens in "server-config.wsdd" respectively via 
* deployment calls. The web service engine manages the lifecycle of instances 
* of this class: A Spring application context can just be accessed here. 
*/import org.springframework.remoting.jaxrpc.ServletEndpointSupport; 

public class AccountServiceEndpoint extends ServletEndpointSupport implements RemoteAccountService {