Chen Jian

SQL查询的一点点调优经验

   1.尽量减少表连接,尤其是尽量避免自己跟自己连接    2.用于表连接的字段要做索引,而且两个表的连接字段都要索引。    3.作为查询条件的字段要做索引。比如说,若按“年龄”查找记录,则"出生日期"字段应该建索引

JMS的基本概念

啥是JMS:    A Java API that allows applications to create, send, receive, and read messages using reliable, asynchronous, loosely coupled communication    Defines a common set of interfaces and associated semantics that allow programs written in the Java programming language to communicate with other messaging implementations JMS不作什么     JMS自己不实现消息服务机制.消息服务是由 MOM(messaging-oriented middleware) 提供的     不过,现在很多MOM都采纳了JMS机制并提供了JMS实现,so a …

JMS的基本概念 Read More »

基于AXIS实现的ServletEndpointSupport在每次请求时都会产生一个新实例

ServletEndpointSupport AXIS 在每次请求时都会产生一个新实例,每次都会调用onInit()方法 这是底层的代码:   JavaProvider.class     protected Object makeNewServiceObject(MessageContext msgContext,                                              String clsName)         throws Exception     {         ClassLoader cl     = msgContext.getClassLoader();         ClassCache cache   = msgContext.getAxisEngine().getClassCache();         JavaClass  jc      = cache.lookup(clsName, cl);         return jc.getJavaClass().newInstance();     } ==================================================================== 要想使用singleton模式 的ServletEndpointSupport,必须自定义一个 provider,并覆盖上面的方法

部署j2ee 应用的基本规范

   1.基本过程:creation -> assembly -> deployment    2.基本结构       若干个同类的 java ee component(如 web, ejb)   组成 一个 java ee module( 可以有,也可以没有 deployment descriptor 。 可独立部署)       几个java ee module 再组合成 一个 ee applcation ( 有 deployment descriptor, META-INF/application.xml )    3.把库加入到类路径       a.ear包里的库.可选方法为以下之一:           i.在manifest.mf中指明Class-Path          ii.deployment descriptor 器指明 library-directory,或者直接把库都放到 lib目录下         另外,web app中的库应放到 WEB-INF/lib …

部署j2ee 应用的基本规范 Read More »

spring + axis集成开发(服务器端)

   1.用POJO写的service: 接口 +  实现类,并通过spring 注册为 业务bean    2.为上面的业务bean定义一个decorator,并让它继承ServletEndpointSupport类。      除了装饰原来的业务方法外,还要重载ServletEndpointSupport的onInit()方法.      在 onInit()里,把业务bean从ApplicationContext中取出来    3.最后写一个wsdd文件,定义web service 的名字,并使它与上面定义的decorator挂钩