Resin 3.1 Released with Servlet 2.5 support

Resin 3.1.x

Resin 3.1.x is a development branch. New capabilities will be added along with bug fixes for future versions of the Resin 3.1.x branch.

Deployments which need a Resin version with only bug fixes should use the Resin 3.0.x branch.

Servlet 2.5

Resin 3.1 adds Servlet 2.5 support. The Servlet 2.5 specification adds annotation-based injection to servlets, filters, and listeners. Servlets can now mark a field as a @Resource and Resin will assign the configured database, bean, or service to the field, avoiding the need for a JNDI lookup.

Database configuration
package example;

import javax.annotation.Resource;
import javax.servlet.*;
import javax.sql.*;

public class MyServlet extends GenericServlet {
@Resource(name="jdbc/mysql")
private DataSource _database;

public void service(ServletRequest req, ServletResponse res)
{
...
}
}

Amber capabilities

With Resin 3.1, the JPA features have been reviewed. Amber now provides a near to complete and stable implementation of the JPA specification.

JPA queries are fully supported, including queries with parameters, named queries, and subqueries. The javax.persistence.Query API is also supported, including date/time (temporal) data types.

Embedded properties and optimistic-locking with version fields have been added to Amber in Resin 3.1. Also, inheritance combined with many-to-one, one-to-many, one-to-one, and many-to-many relationships have been reviewed and are now totally stable following the final release of the JPA specification.

Finally, an object relational mapping file (orm.xml) can now be merged together with annotations, when present. In other words, with Resin 3.1, the set of JPA features supported by Amber is near to complete, i.e., only a few unusual features will be added to the next release.

watchdog/startup changes

Resin 3.1 now uses a Java watchdog process to manage Resin instances for reliability. Like the older 3.0 wrapper.pl, it detects if the instance has stopped and restarts it automatically.

Because the watchdog is now a Java process, the Resin start and stop can now use a Java -jar command:

starting server web-a
unix> java -jar $RESIN_HOME/lib/resin.jar -server a start

Also, because the Resin instance is started from Java itself, the JVM command-line arguments must now be specified in the resin.conf.

JVM command-line arguments

With Resin 3.1, JVM command-line arguments are specified in the resin.conf. The watchdog JVM will read the resin.conf, select the proper <server>, and apply the server's arguments. As usual, the <server-default> tag can provide common defaults.

setting -Xmx and -Xss




-Xmx1024m
-Xss1m
-verbosegc
AddThis Social Bookmark Button

相关文档(Relevant Entries)
JNI完全手册
JBuilder9制作EXE文件
如何在Java中调用dll
JNI调用固有方法
Cache Your Data JDBC vs ADO NET
IntelliJ IDEA 5.0 新特性
用JavaHelp系统开发和交付更好的文档
《Eclipse集成开发工具》
Posted on February 11, 2007 3:54 PM | | | Comments (0) | | TrackBacks (0)

引用地址(TRACKBACKS)
 
TrackBack URL for this entry:
http://www.wujianrong.com/mt-tb.cgi/4574

发布评论(ADD YOUR COMMENTS)
 
感谢您参与评论;发表您的意见时请保持文章的相关性;不相关的或是单纯宣传的内容可能会被删掉。您的E-mail只是用来确认您发表的文章,不会出现在网页上。
Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

称呼(Name):      记住我的个人信息(Remember)
邮箱(Email):
网址(URL):
评论(Add your comments):

相关内容
广告计划