- 浏览: 663078 次
- 性别:
- 来自: 宇宙中的某个角落
最新评论
-
zhuzf:
写的太好了
实例分析Java Class的文件结构 -
随便小屋:
写的太好了,Mark一下,楼主辛苦了!
实例分析Java Class的文件结构 -
lowkey2046:
引用 应用程序注册读就需事件和相关联的事件处理器应该是读就绪吧 ...
高性能IO设计的Reactor和Proactor模式 -
BigBird2012:
“JVM引入了分代收集的策略,其中对新生代采用"Ma ...
JVM内存模型以及垃圾收集策略解析 -
xuelian2010:
找到合适的人做正确的事情!!!
三月份辞职创业,北京第一家线下体验店成功开张,伙伴们加油!
文章列表
@OneToMany(mappedBy = "customer",cascade = {CascadeType.ALL},fetch = FetchType.LAZY)
private Collection<CartItem> cartItems;
@OneToMany(mappedBy = "customer",cascade = {CascadeType.ALL},fetch = FetchType.EAGER)
private Collection<BookOrder> orders ;
在用JPA进行注释时, ...
- 2008-05-04 20:28
- 浏览 13085
- 评论(7)
现在J2EE领域无论是表现层,业务层还是持久层,框架满天飞,虽然说框架为我们省了很大的力气,但是我们还是需要掌握J2EE里面经常用到的一些模式,下面对J2EE领域业务层的几个模式做一个小的总结:
服务门面,应用服务,业务委托,服务定位器这四个模式是J2EE中经常要用到的几个模式,其中服务门面我们可以通过POJO或者是EJB中session bean来实现,应用服务就是与服务门面交互的具体的服务,服务门面去调用应用服务来获得相应的服务,这样就可以使得服务门面的业务逻辑和具体的服务相分离,实现低耦合高复用。现在再来说说业务委托,它是又业务层的人员来实现,并且暴露给表现层人员来使用,业务委托其实就是对 ...
- 2008-05-04 19:37
- 浏览 1939
- 评论(0)
webwork2中有两种Action的驱动方式,它们就是property-drivern和model-driven,对于这两种方式来说,不同的人有不同的看发,我比较喜欢以model-driven的方式来实现property-driven.为什么这么说呢?在webwork中提供了ModelDriven这个接口,以此来实现Model-driven,其实这两者之间没有什么必然的联系,实现了model-driven后,只不过是将我们的model对象放在了valuestack中,这样就可以直接用模型对象的属性名来实现对模型对象属性的访问,但是我们完全可以不实现ModelDriven接口,我们照样也可以使用 ...
这段时间学习了一下webwork2,觉得此框架设计的满轻量的,它是在Xwork这个命令框架的基础上进行了web的MVC的封装。其中可以看到很多j2ee的模式:比如前端控制器,过滤器(在webwork中是拦截器interceptor),context对象等。下面具体来总结一下:
首先来看看web.xml文件,此文件里配置了web应用程序一些必要的配置。其中最重要的就是将所有的action都映射到ServletDispatcher这个类,此类其实就是一个前端控制器,当它接受到一个请求后,它会遍历HttpServletRequest,HttpSession,ServletContext ...
控制反转模式是当今J2EE架构中常用到的模式之一,它符合好莱坞法则:不要调用我,我会调用你。在没有运用IOC的时候,我们一般都是通过工厂来管理对象,当我们需要一个对象的时候,我们通过工厂来创建它,这样就造成 ...
在传统的EJB时代,EJB的架构过于复杂,并且在写EJB组件的时候,不仅要写业务Bean,而且开发人员还得写好Home,LocalHome,EJBLocalObject以及EJBObject这四个接口,这样以来就显得非常繁琐,开发人员不能把精力集中到对业务Bean的设计中。EJB3.0在架构上有了很大的改变,完全采用pojo的编程模型,在写EJB3.0组件时,不需要在写繁琐的非业务有关的接口了,而是可以把主要的精力集中到业务Bean上来,只要写一个业务接口就行了,其他的事情都交给EJB容器去做,这样就大大缩短了开发的周期。
- 2008-04-04 02:18
- 浏览 1457
- 评论(0)
There are three kinds of attributes in the servlet api.they are seperated ServletContext attribute,ServletRequest attribute and httpsession attribute.they have different accessibility,scope and usage.as follows are they.
First of all,we talk the ServletContext attribute ,any part of the web app c ...
Yestarday,i left my home to go to college,after 16 hours' trip,i arrived at xi'an.in the train,i made serval friends who work in xi'an.
and i am going to take another train to XiMen.when i arrive at XiMen,it may be 6:00am at the day after tomorrow.
- 2008-02-14 15:09
- 浏览 1218
- 评论(0)
Tonight,i come to the silly net world.what'more ,i come arcoss a stupid man.he is very stupid,i just want to kick his ass.but i endured to him......
- 2008-01-30 00:45
- 浏览 1280
- 评论(0)
[u][/u]I read the State pattern in the Head first design pattern a few days ago,At the present,i will just sum it up.
Without state pattern,we just use "if-else" controlling construct to treat with the change of the object state,as this,the coupling is very high,when the requirment cha ...
- 2008-01-14 17:26
- 浏览 1440
- 评论(0)
Recently,I have been reading the Head first design patterns,unconsciously,i have finish the seven chapters.and here i will review the whati just read tonight.
Tonight,i read the seventh chapter of my love book at the schoollibrary.this chapter tells us about the Adapter and facade pattern,i felt ...
I read the sixth chapter of Head first design pattern a few days ago.I want to review it at the present.
First,here is the official definition.The commond pattern enscuplates a request as a object ,thereby letting you parameterized other objects with the different requests,and support the undo o ...
- 2007-12-09 23:36
- 浏览 1678
- 评论(0)
I read the singleto pattern with the head first design pattern yestarday evening.i will review it .
First of all ,we should konw about the offical definition of the pattern,here is it .the singleto
ensures that a class has only one instance, and provide a global point of access to it .it is ...
- 2007-11-22 21:47
- 浏览 1305
- 评论(0)
Just now ,i lost my bicycle again ,this is my third bicycle.the first is broken with the collision with a truck.
and the rest were lost in less than 20 days.
The phenomenon of bicycle lose is very common at my university .i am a example .
I wish that the university ...
- 2007-11-21 23:41
- 浏览 1705
- 评论(0)
I read the chapter 4 of head first design pattern just now.I just sum up my thought about the factory pattern.
The factory pattern contains three pattern in general.here are they.the first is simple factory,the second
is factory method pattern ,and the last is abstract factory pattern.the thre ...
- 2007-11-21 00:25
- 浏览 1423
- 评论(1)