Package org.springframework.remoting.rmi

Examples of org.springframework.remoting.rmi.RmiProxyFactoryBean.afterPropertiesSet()


            rmiProxyFactoryBean.setServiceUrl(url.toIdentityString());
            rmiProxyFactoryBean.setServiceInterface(serviceType);
            rmiProxyFactoryBean.setCacheStub(true);
            rmiProxyFactoryBean.setLookupStubOnStartup(true);
            rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
            rmiProxyFactoryBean.afterPropertiesSet();
            final Object remoteObject = rmiProxyFactoryBean.getObject();
            return new Invoker<T>() {
                public Class<T> getInterface() {
                    return serviceType;
                }
View Full Code Here


      RmiProxyFactoryBean factory = new RmiProxyFactoryBean();
      factory.setServiceUrl("rmi://localhost:1299/SpringRMICallbackServerService:" + sessionId);
      factory.setServiceInterface(org.jboss.test.remoting.performance.spring.rmi.SpringRMICallbackServer.class);
      try
      {
         factory.afterPropertiesSet();
      }
      catch (Exception e)
      {
         System.out.println("unable to create callback proxy");
         System.out.println(e);
View Full Code Here

      RmiProxyFactoryBean factory = new RmiProxyFactoryBean();
      factory.setServiceUrl("rmi://localhost:1299/SpringHttpCallbackServerService:" + sessionId);
      factory.setServiceInterface(org.jboss.test.remoting.performance.spring.http.client.SpringHttpCallbackServer.class);
      try
      {
         factory.afterPropertiesSet();
      }
      catch (Exception e)
      {
         System.out.println("unable to create callback proxy");
         System.out.println(e);
View Full Code Here

        rmiProxyFactoryBean.setServiceUrl(url.toIdentityString());
        rmiProxyFactoryBean.setServiceInterface(serviceType);
        rmiProxyFactoryBean.setCacheStub(true);
        rmiProxyFactoryBean.setLookupStubOnStartup(true);
        rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
        rmiProxyFactoryBean.afterPropertiesSet();
        return (T) rmiProxyFactoryBean.getObject();
    }

    protected int getErrorCode(Throwable e) {
        if (e instanceof RemoteAccessException) {
View Full Code Here

        String serviceUrl = MessageFormat.format(RMI_SERVICE_URL, params.getIp(), String.valueOf(params.getPort()));
        // 自己实现的有连接池的Stub
        RmiProxyFactoryBean proxy = new RmiProxyFactoryBean();
        proxy.setServiceUrl(serviceUrl);
        proxy.setServiceInterface(CommunicationEndpoint.class);
        proxy.afterPropertiesSet();
        return new RmiCommunicationConnection(params, (CommunicationEndpoint) proxy.getObject());// 创建链接
    }

    @Override
    public void releaseConnection(CommunicationConnection connection) {
View Full Code Here

            rmiProxyFactoryBean.setServiceUrl(url.toIdentityString());
            rmiProxyFactoryBean.setServiceInterface(serviceType);
            rmiProxyFactoryBean.setCacheStub(true);
            rmiProxyFactoryBean.setLookupStubOnStartup(true);
            rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
            rmiProxyFactoryBean.afterPropertiesSet();
            final Object remoteObject = rmiProxyFactoryBean.getObject();
            return new Invoker<T>() {
                public Class<T> getInterface() {
                    return serviceType;
                }
View Full Code Here

    @Bean
    public GlobalConfigurationManagementService globalConfigurationManagementService() {
        RmiProxyFactoryBean rmiProxyFactoryBean = new RmiProxyFactoryBean();
        rmiProxyFactoryBean.setServiceUrl("rmi://127.0.0.1:1199/GlobalConfigurationManagementService");
        rmiProxyFactoryBean.setServiceInterface(GlobalConfigurationManagementService.class);
        rmiProxyFactoryBean.afterPropertiesSet();
        return (GlobalConfigurationManagementService) rmiProxyFactoryBean.getObject();
    }

    @Bean
    public DataManipulationService dataManipulationService() {
View Full Code Here

    @Bean
    public DataManipulationService dataManipulationService() {
        RmiProxyFactoryBean rmiProxyFactoryBean = new RmiProxyFactoryBean();
        rmiProxyFactoryBean.setServiceUrl("rmi://127.0.0.1:1199/DataManipulationService");
        rmiProxyFactoryBean.setServiceInterface(DataManipulationService.class);
        rmiProxyFactoryBean.afterPropertiesSet();
        return (DataManipulationService) rmiProxyFactoryBean.getObject();
    }

    @Bean
    public LoginService loginService() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.