- 浏览: 258693 次
- 性别:
- 来自: 天津
文章分类
- 全部博客 (180)
- J2SE (15)
- J2EE (7)
- Struts (2)
- Hibernate (18)
- Spring (22)
- ssh (2)
- HTML (1)
- JS (10)
- CSS (3)
- jQuery (15)
- extJS (0)
- FLEX (14)
- Web service (7)
- Axis2 (3)
- lucene2.0 (9)
- maven (3)
- JBoss (0)
- WebLogic (0)
- Linux (8)
- Android (0)
- SiteMesh (1)
- JPA (0)
- JBPM (1)
- xFire (3)
- XML (4)
- apache (4)
- bingo专区 (0)
- 加密解密算法研究 (1)
- 数据库 (16)
- 资料 (1)
- 经验 (4)
- 健康 (1)
- 技术交流区 (1)
- 交友区 (0)
- jquery 插件区 (1)
最新评论
-
forrest_lv:
很有帮助
Axis2 XFire CXF 比较 -
kuloujianzun:
...
flex DataGrid -
zx.peng:
大哥,请教一下...
下面在别的地方引入:(在什么地方、怎么 ...
FLEX下拉多选框 -
elvislee030:
试试去,正好要找这个组件。。先谢过
FLEX下拉多选框 -
futrueboy:
如果你发到网上来,请翻译的好点
Apache Mina的学习应用(三)
和burlap和hessian一样的配置细细 服务端服务的接口类 package cn.com.huawei.httpinvoker.service; import java.util.List; public interface IUserService { package cn.com.huawei.httpinvoker.service.impl; import java.util.ArrayList; import cn.com.huawei.httpinvoker.service.IUserService; public class UserService implements IUserService{ 服务端web。xml的配置信息 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?> 服务端的remoting-servlet。xml的配置信息 <?xml version="1.0" encoding="UTF-8"?> 客户端的配置信息如下 package cn.com.huawei.httpinvoker.client; import java.util.List; import cn.com.huawei.httpinvoker.service.IUserService; private IUserService userservice; public IUserService getUserservice() { public void setUserservice(IUserService userservice) { public List getUsernames() { } package cn.com.huawei.httpinvoker.client; import org.springframework.context.ApplicationContext; public class HttpInvokerTest { # Properties file with server URL settings for remote access. serverName=localhost 客户端的applicationcontext。xml的配置信息 <?xml version="1.0" encoding="UTF-8"?> </beans> 部署发布接口
public List getUsernames();
}
服务端服务的实现类的应用
import java.util.List;
public List getUsernames()
{
List<String> usernames=new ArrayList<String>();
usernames.add("xiaobai");
usernames.add("xiaoli");
return usernames;
}
}
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>remoting</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>remoting</servlet-name>
<url-pattern>/remoting/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
服务端的applicationcontext。xml的配置信息
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="userservicetarget" class="cn.com.huawei.httpinvoker.service.impl.UserService"/>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean name="/UserService-httpinvoker"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service" ref="userservicetarget" />
<property name="serviceInterface"
value="cn.com.huawei.httpinvoker.service.IUserService" />
</bean>
</beans>
public class HttpInvokerClient {
return userservice;
}
this.userservice = userservice;
}
return this.userservice.getUsernames();
}
import org.springframework.context.support.ClassPathXmlApplicationContext;
public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext(
"applicationContext.xml");
HttpInvokerClient hessina = (HttpInvokerClient) ctx.getBean("httpInvokerclient");
System.out.println("rmiclient:" + hessina.getUsernames());
}
}
客户端的client。properties的属性信息
# Applied by PropertyPlaceholderConfigurer from "clientContext.xml".
httpPort=8080
rmiPort=1199
serverPath=SpringHttpInvoker
contextPath=remoting/UserService-httpinvoker
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>client.properties</value>
</property>
</bean>
<bean id="httpInvokerclient" class="cn.com.huawei.httpinvoker.client.HttpInvokerClient">
<property name="userservice">
<ref bean="httpInvokerProxy"/>
</property>
</bean>
<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://${serverName}:${httpPort}/${serverPath}/${contextPath}</value>
</property>
<property name="serviceInterface">
<value>cn.com.huawei.httpinvoker.service.IUserService</value>
</property>
<!--
Comment the following in to use Apache Commons HttpClient instead of the JDK's
standard HttpURLConnection (as used by the default SimpleHttpInvokerRequestExecutor).
-->
<!--
<property name="httpInvokerRequestExecutor">
<bean class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor"/>
</property>
-->
</bean>
发表评论
-
Spring 企业级开发应用---------AXIS和spring的远程服务整合的应用
2010-08-16 14:36 1144Spring框架对远程访问 ... -
Spring 企业级开发应用---------hessian和spring的远程服务整合的应用
2010-08-16 14:35 912hessian和burlap使用同一公司的产品实现机制不同 ... -
Spring 企业级开发应用---------burlap和spring的远程服务整合的应用
2010-08-16 14:34 837使用burlap和spring整合发布远程服务 开发步骤 ... -
Spring 企业级开发应用---------rmi和spring的整合的应用
2010-08-16 14:34 803使用spring和rmi开发远程服务的类的应用(此处可以一 ... -
spring2.5 和Hibernate的注解的应用
2010-08-16 14:30 769一、步骤 a. <!-- 数据源 --&g ... -
获取ApplicationContext的几种方式
2010-08-16 14:26 951第一种采用类路径的加载方式获取: Appli ... -
Spring 注解的配置的细节
2010-08-16 14:16 1677一. spring注解 1.准备工作(1)导入comm ... -
使用Spring 2.5 注释驱动的 IoC 功能
2010-08-16 14:10 839在项目中使用Spring的注解,关于sp ... -
Spring 和ActionMQ整合JMS开发应用
2010-08-16 13:51 1494Spring 和ActionMQ整合 ... -
Spring中添加 Log4j注解
2010-08-16 13:49 2482参照别人的代码做了个Demo如下: Spring的加载时 ... -
Spring 的优秀工具类盘点,特殊字符转义和方法入参检测工具类
2010-08-16 13:46 968Spring 不但提供了一个功能全面的应用开发框架,本身还 ... -
Spring Web 相关工具类
2010-08-16 13:38 991Web 相关工具类 您几乎总是使用 Spring 框架开 ... -
Spring 的优秀工具类盘点
2010-08-16 13:22 738Spring 不但提供了一个功能全面的 ... -
Spring ApplicationContext.xml配置的12个技巧
2010-08-16 13:08 1231Spring是一个强有力的ja ... -
Spring 中一个常用的反射类库ReflectionUtils
2010-08-16 13:05 4350在项目中部分方法采用反射,通过类访问类的属性,通过类反问方法, ... -
spring 的OpenSessionInViewFilter简介
2010-08-16 11:39 589假设在你的应用中Hibernate是通过spring 来管 ... -
使用hibernate3和Spring解决Oracle大字段(长文本)问题
2010-08-16 11:33 1445使用Oracle来存储长文本始终没Mysql ... -
Spring中Quartz的配置
2009-11-02 09:56 642Quartz是一个强大的企业级任务调度框架,Spring中继承 ... -
使用Spring2.5的Autowired实现注释型的IOC
2009-11-01 21:10 970使用Spring2.5的新特性——Autowired可以实现 ... -
Spring声明式事务管理(下)
2009-11-01 20:58 1135三.用BeanNameAutoProxyCreator自动 ...
相关推荐
spring源码导入SpringObjenesis类报错解决,缺少jar包spring-cglib-repack-3.2.0.jar和spring-objenesis-repack-2.1.jar
spring源码缺失jar。spring-cglib-repack-3.2.5.jar,spring-objenesis-repack-2.6.jar
spring-cloud-netflix-hystrix应用
开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-1.3.1开发工具 mybatis-spring-...
开发工具 spring-aop-4.3.6.RELEASE开发工具 spring-aop-4.3.6.RELEASE开发工具 spring-aop-4.3.6.RELEASE开发工具 spring-aop-4.3.6.RELEASE开发工具 spring-aop-4.3.6.RELEASE开发工具 spring-aop-4.3.6.RELEASE...
轻量级J2EE企业应用实战--Struts+Spring+Hibernate整合开发笔记
springboot 整合spring-boot-starter-mail 发邮件
Spring是一个开放源代码的设计层面框架,他解决的是业务逻辑层和其他各层的松耦合问题,因此它将面向接口的编程思想贯穿整个系统应用。Spring是于2003 年兴起的一个轻量级的Java 开发框架,由Rod Johnson创建。简单...
开发工具 spring-webmvc-4.3.6.RELEASE开发工具 spring-webmvc-4.3.6.RELEASE开发工具 spring-webmvc-4.3.6.RELEASE开发工具 spring-webmvc-4.3.6.RELEASE开发工具 spring-webmvc-4.3.6.RELEASE开发工具 spring-web...
开发工具 框架JAR spring-framework-4.3.6.RELEASE-dist开发工具 框架JAR spring-framework-4.3.6.RELEASE-dist开发工具 框架JAR spring-framework-4.3.6.RELEASE-dist开发工具 框架JAR spring-framework-4.3.6....
spring-cglib-repack-3.2.5.jar和spring-objenesis-repack-2.6.jar
开发工具 spring-web-4.3.6.RELEASE开发工具 spring-web-4.3.6.RELEASE开发工具 spring-web-4.3.6.RELEASE开发工具 spring-web-4.3.6.RELEASE开发工具 spring-web-4.3.6.RELEASE开发工具 spring-web-4.3.6.RELEASE...
开发工具 spring-jdbc-4.3.6.RELEASE开发工具 spring-jdbc-4.3.6.RELEASE开发工具 spring-jdbc-4.3.6.RELEASE开发工具 spring-jdbc-4.3.6.RELEASE开发工具 spring-jdbc-4.3.6.RELEASE开发工具 spring-jdbc-4.3.6....
开发工具 spring-context-4.3.6.RELEASE开发工具 spring-context-4.3.6.RELEASE开发工具 spring-context-4.3.6.RELEASE开发工具 spring-context-4.3.6.RELEASE开发工具 spring-context-4.3.6.RELEASE开发工具 spring...
开发工具 spring-tx-4.3.6.RELEASE开发工具 spring-tx-4.3.6.RELEASE开发工具 spring-tx-4.3.6.RELEASE开发工具 spring-tx-4.3.6.RELEASE开发工具 spring-tx-4.3.6.RELEASE开发工具 spring-tx-4.3.6.RELEASE开发工具...
《轻量级J2EE企业应用实战--Struts+Spring+Hibernate整合开发》图书配套源码part1
开发工具 spring-beans-4.3.6.RELEASE开发工具 spring-beans-4.3.6.RELEASE开发工具 spring-beans-4.3.6.RELEASE开发工具 spring-beans-4.3.6.RELEASE开发工具 spring-beans-4.3.6.RELEASE开发工具 spring-beans-...
2018-02-08从git_hub上拉取的Spring源码打成的jar,构建Spring-beans5.0以上源码所缺失的两个jar包spring-cglib-repack-3.2.6.jar,spring-objenesis-repack-2.6.jar
开发工具 spring-core-4.3.6.RELEASE开发工具 spring-core-4.3.6.RELEASE开发工具 spring-core-4.3.6.RELEASE开发工具 spring-core-4.3.6.RELEASE开发工具 spring-core-4.3.6.RELEASE开发工具 spring-core-4.3.6....
Spring Framework 是一种轻量级的解决方案,是构建你的企业级应用程序的潜在一站式解决 方案。 尽管如此, Spring 是模块化的,允许你只使用你需要的那些部分,而不必引入其他 的。 你可以使用IoC容器,任何 Web ...