spring2.5事务&aop (3)
配置事务:<tx:advice id="txAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="...
spring2.5事务&aop (2)
开发dao层:接口:public interface FooDAO { abstract public void insert(Customer customer);} 实现类:public class FooDAOImp implements FooDAO...
spring2.5事务&aop (1)
数据库使用MYSQL,创建数据库create table customer ( id int(11) not null auto-increment, &nbs...
J2EE持久层
J2EE底层可以使用的框架有很多,比如hibernate,IBatis等等, 本人只使用过Hibernate,而且经常使用它继承Spring以及EJB做业务的开发,不可否认的是Hibernate的确是J2EE持久层不错...
Hibernate 优化
最好将batch size 设置为一个适当的值一般为30-50,在大量插入的时候停止一级缓存, 否则有可能引起内存溢出,或者每组flush一次,之后清空即可。 在批量更...
EJB--Query Best Practices
Named QueriesFirst and foremost, we recommend named queries whenever possible. Persistence providerswill often take steps to precompile JPQL named queries to SQL as part of the deployment or initializ...
object file byte转换
public static byte[] getBytesFromFile(File f){ if (f == null){ return null; ...
spring 2.5 aop 1
Spring 2.5 aop类别函数入参说明方法切点函数execution方法匹配模式串满足某一匹配模式的所有目标类方法的连接点。如execution(*greetTo(..))表示所有目标类中的greetTo()方法@annotation()...
Spring 发布 RMI (客户端)
客户端: package remote.rmi.client; import remote.rmi.AccountService; public class SimpleObject { private AccountService accountService; &nbs...
RSA加密
基于RSA加密的实现,WriteIn为加密后向文件写入,ReadIn为从文件读出后解密写入文件的时候控制字符长度小于16位