存档

2009年2月 的存档

Spring Framework 3.0 M2 released(Spring Framework 3.0 M2发布)

2009年2月28日 admin 没有评论

We are pleased to announce that the second Spring 3.0 milestone is finally available (download page).
This release comes with a wealth of revisions and new features:

Further Java 5 style API updates: consistent use of generic Collections and Maps, consistent use of generified FactoryBeans, and also consistent resolution of bridge methods in the Spring AOP API. Generified ApplicationListeners automatically receive specific event types only. All callback interfaces such as TransactionCallback and HibernateCallback declare a generic result value now. Overall, the Spring core codebase is now freshly revised and optimized for Java 5.

Extended concurrency support: Spring’s TaskExecutor abstraction has been updated for close integration with Java 5’s java.util.concurrent facilities. We provide first-class support for Callables and Futures now, as well as ExecutorService adapters, ThreadFactory integration, etc. This has been aligned with JSR-236 (Concurrency Utilities for Java EE 6) as far as possible. Furthermore, we provide support for asynchronous method invocations through the use of the new @Async annotation (or EJB 3.1’s @Asynchronous annotation). And in Spring 3.0 M3, we’ll be adding a scheduling namespace for convenient configuration of it all… including support for cron-style timers.

OXM module in core: We moved the Object/XML Mapping module, as known from the Spring Web Services project, to the Spring core project. OXM has been updated and revised for Java 5 as well, supporting marshalling and unmarshalling through JAXB2, JiBX, Castor, XMLBeans, and XStream. There is also OXM support for Spring JMS (MarshallingMessageConverter) and Spring MVC (MarshallingView).

RestTemplate: We have brand-new client-side REST support: the long-awaited RestTemplate, with HTTP processing infrastructure that is as flexible and extensible as you would expect from a Spring solution. There are also several improvements with respect to REST support in Spring MVC… Stay tuned for Arjen’s upcoming blog post on the latest REST support features!

MVC on Portlet 2.0: Spring Portlet MVC is based on the Portlet 2.0 API (JSR-286) now. We provide specific @ActionMapping, @RenderMapping, @ResourceMapping and @EventMapping annotations for Portlet MVC handler methods, including support for specific characteristics of those request types: e.g. action names, window states, resource ids, and event names (as defined by Portlet 2.0).

Early JPA 2.0 support: Finally, we are actively tracking the JPA 2.0 specification as well as emerging JPA providers with JPA 2.0 preview support. Spring 3.0 M2 already delivers early support for the JPA 2.0 API, e.g. query timeouts within Spring-managed transactions and QueryBuilder access in Spring-managed EntityManager proxies. We’ll wrap this up for Spring 3.0 RC1, as soon as the JPA 2.0 API is stable.

Now is a good time to give Spring 3.0 an early try! Let us know how it works for you… M2 doesn’t include reference documentation yet but comes with extensive javadoc and an extensive test suite. We’ll also be showing specific examples in follow-up blog posts.

We are now working towards our final milestone already: M3 will introduce annotation-based factory methods, declarative validation (based on JSR-303 “Bean Validation”), as well as new XML configuration namespaces (orm, scheduling). Spring MVC will receive an overhaul in terms of conversation management. We are also preparing for JSF 2.0 as far as necessary, keeping up the smooth integration experience with Spring.

spring3.0 M2发布了,可以到spring的网站上下载 。它带来了很多值得关注的新特性:

  • 对java 5的全面支持。主要是很多接口开始支持泛型,加强了类型安全。核心部分的代码也针对java 5做了优化。
  • 扩展了对并发的支持。
  • OXM模块从spring ws项目中移到了核心中。
  • 崭新的RestTemplate。接下来还会写一篇关于rest的博客,值得期待。
  • Portal2.0支持。
  • 开始尝试支持JPA2.0的一些特性。

下一个版本是M3,也是spring 3.0的最后一个milestone版本。在M3中会引入基于注解的工厂方法、声明是验证(JSR-303 “Bean Validation”,这个我比较期待,可以不用hibernate validation了)、还有spring mvc的conversation的范围管理以及尝试对JSF2.0的支持——都是非常值得期待的特性啊。

看来spring对标准的支持越来越好,越来越像一个轻量级的seam了。期待spring 3.0早日正式发布。

Popularity: 29% [?]

使用 GOOGLE CODE 的SVN服务器

2009年2月18日 admin 没有评论

如果你常在不同地方开发,代码维护是一个问题有的时候老是做重复性的工作,如果做好版本控制的话,也许就不会这么囧了…为了更好的维护代码,可以在code.google.com上建立一个svn projects代码仓,网上可以找到两个subversion服务的提供者:OpenSVNGoogle Code上的Project Hosting 。这两个网站你都可以建立新的repository放你的project (不过好象Google Code一个project的repository限制空间最多只能使用100 MB)


Google Code的左侧导览列中点选Project Hosting便会来到上面的网页,这时再点选Create a new project就可以填入你project的相关资料,这样Google Code就帮你产生了一个repository了。设定好之后你只要先知道你repository的位址(到你Project首页的Sources里去 看,会是https://<你project名称>.googlecode.com/svn/)就可以了,同时你也要知道你在Google Code的密码,到右上角的My Profile -> Settings里就会有Google Code产生的密码,这个也要记住,因为当你在commit的时候会需要用到。

在Windows上,可以使用一个有图形化介面的subversion软体:TortoiseSVN,我的上篇日志介绍过用TortoiseSVN来升级wordpress,安装这个软件后,它就会在你资源管理器的右键选单中加入subversion的相关指令,相当方便易用。SVN Checkout安装好TortoiseSVN之后,你可以选择你要存放project的位址,然后在该处按右键选SVN Checkout…,再填入你project repository的网址及要储存的资料夹,输入完帐号及密码后, repository上的档案就会下载下来了。注意你repository下会事先建立好三个目录:branch、trunk及tags,如果你还不是很熟悉版本控制的话,就先把你的code放在trunk目录下就好了,所以在checkout的时候网址应该输入:https://<你 project名称>.googlecode.com/svn/trunk/,然后本地端再输入你project的名称就好,这样一来你就有一份本地端的repository了。


接着,你就可以在这个目录下放你project的资料了,当你决定要commit到伺服器上的repository时,只要在project的目前上按右 键,选择SVN Commit…,这时就会跳出一个对话盒问你要加入或修改哪些档案,然后也可以让你填入log好记录这次的修订版本做了什么修改,方便日后你要取出某 个修定版本时作参考。

如果不公布代码? 到这里http://code.google.com/p/**your project**/adminAdvanced设置 delet project 则提示” This project is scheduled for deletion: Project owner request.”这样别人就不能check out然后你可以添加一些您信任的自己人的gmail 到 Project Members 中的 Project owner在project owner中的人就可以访问update了。

Popularity: 34% [?]

查看Oracle版本信息

2009年2月16日 admin 没有评论

1  查看oracle的版本信息

(1)用客户端连接到数据库,执行select * from v$instance
查看version项

(2)select * from product_component_version

(3)或查询V$VERSION查看组件级信息

2 ORACLE9I最初的系统管理员和密码

SYS        CHANGE_ON_INSTALL
SYSTEM     MANAGER

3、查看数据库版本
SQL> select banner from sys.v_$version;

BANNER
———————————————————-
Oracle8i Enterprise Edition Release 8.1.6.0.0 – Production
PL/SQL Release 8.1.6.0.0 – Production
CORE 8.1.6.0.0 Production
TNS for 32-bit Windows: Version 8.1.6.0.0 – Production
NLSRTL Version 3.4.1.0.0 – Production

4、查看安装了哪些选项
SQL> col PARAMETER format a60
SQL> col VALUE format a10
SQL> select * from sys.v_$option;

……..

已选择33行。

Popularity: 33% [?]

解决 Red5 Admin Panel不能登陆的问题

2009年2月12日 admin 没有评论

1.start red5  0.7.0 
2.open this url :  http://localhost:5080/admin/register.html
3. in the form fill your new user and password  and submit 
4.restart red5 and enter http://localhost:5080/demos/adminPanel.html 
using ”localhost” and the user/pass you define in step 3. 

如果还是不能登陆,就把 Red服务重启一下,就可以了。

Popularity: 34% [?]

Struts 2.1.6发布

2009年2月9日 admin 没有评论

哈哈,终于更新了,激动啊,看看下面说明吧:

Struts2框架刚刚发布最新2.1版。该版本做了重大升级,包括重构更多代码到插件框架、通过增加convention插件减少XML配置和改进REST支持。

我采访了Musachy Barroso——该版本的一位开发人员,请他回答了一些问题:

2.0和2.1之间的最大区别是什么?

2.1版修改了很多错误(有关Struts和Xwork的),添加了新的插件,例如REST、Convention和Java Templates,这些都体现了我们的发展方向。

很多功能移到了插件里,能解释一下原因吗?

基本思想就是在struts内核中只保留“核心”功能,把其他一切都移到插件里。这种做法便于维护代码库和放弃不再支持的功能,如Dojo插件。这些变化没有带给用户什么好处,如果用户不使用提到的插件,Struts的规模就比较小。

您能谈一下为何ajax标签不受重视了吗?

Struts 2 Ajax标签基于Dojo 0.4.x,把它们移植到Dojo最新版本上意味着完全重写。Dojo已被证明难以维护,因为新版本层出不穷,甚至在小版本之间代码变动也很大。用户经常 选择直接使用Dojo,因为标签不具有Dojo提供的全部功能。由于以上原因和缺少处理Dojo标签的志愿者,我们不得不减少对Ajax标签的关注。

为何codebehind插件变成了convention插件,引入了哪些新功能?

Convention最初由Brian Pontarelli作为外部项目开发,后来引入到Struts。Convention具有更好更快的类路径扫描器,支持更多配置元素,更好的日志功能,很多配置选项,配置重加载,便于文档化。

什么是java templates插件?

Java Templates插件是”简单主题”(simple theme)的一个快速实现,只使用Java编写(标准实现采用FreeMarker)。该插件的标签比标准的实现快4到5倍,缺点是无法重写。

目前有很多web框架,你觉得struts2的优势是什么?

Struts 2可能是目前最松耦合的框架。它非常易用,很多功能只需要很少或者不需要配置即可使用,容易掌握。同样的,添加插件以覆盖缺省行为也非常简单。松耦合也支 持在Struts不参与的情况下编写业务逻辑。而且,Struts可扩展性非常好,目前已运行于一些超高流量的网站上。

您还有什么要补充的吗?

Struts 2.1花费了很长时间,但是我们已经努力改进了构建和发布流程,所以未来版本更新会更加及时。

Struts 2.1.6可以通过http://struts.apache.org/2.1.6/index.html下载。

查看英文原文:Struts 2.1 Released

Popularity: 17% [?]

分类: JAVA 标签: