永发信息网

dwr 如何实现。单例模式

答案:1  悬赏:60  手机版
解决时间 2021-11-25 00:08
  • 提问者网友:骑士
  • 2021-11-24 13:51
dwr 如何实现。单例模式
最佳答案
  • 五星知识达人网友:污到你湿
  • 2021-11-24 15:16
dwr能够使用单例模式而不是“实现”。是不是单例取决于你的Java代码。如果你写了一个单例的类。可以在dwr.xml中指定使用getInstance方法而不是new。最简单的是直接使用static。getInstance返回单例对象。

The creator attribute is required - it specifies which creator will be used.
The following Creators are available in DWR:
new: Which uses the Java 'new' operator.
static: Which uses the 'getInstance()' method (by default) to obtain an instance of the class.
none: This does not create objects. See below for why. (v1.1+)
scripted: Uses a scripting language like BeanShell or Groovy via BSF.
spring: Gives access to beans through the Spring Framework.
jsf: Uses objects from JSF. (v1.1+)
struts: Uses struts FormBeans. (v1.1+)
pageflow: Gives access to a PageFlow from Beehive or Weblogic. (v1.1+)
ejb3: An experimental Creator to give access to EJB3 session beans. This code should not be seen as production quality until it has undergone more testing, and has an official maintainer. (v2.0+)
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯