跳至主要内容

博文

目前显示的是标签为“JBoss”的博文

Book Review: Arquillian Testing Guide

Today I have received my hard copy of the book, Arquillian Testing Guide. Comparing to the resource I had got at the end of last year, much content are improved. Arquillian is a modern Java EE testing framework, based the well-known JUnit or TestNG, brought by JBoss.org. In fact, currently Arquillian is beyond Java EE, and not only for Java EE application and Java EE container, such as it also supports Android application test and can run test in Android system(or Android simulator) . Most of my Arquillian experience is based on Java EE. If you have some experience of JUnit experience before, and eager to find a testing solution for your Java EE application and want to run the test case in container automatically, this book is for you. With Arquillian, you are free from preparing the test fixture before you write real tests. You can write tests in the nature way, such as using @Inject, @Resource etc in your test case directly as the way in yo...

Generate reports with Seam 3 Reports and Apache Velocity

Seam 3 provides a collection of standard CDI extensions. Seam3 report module bridges CDI and several report engines, such as JasperReports Pentaho XDocReport Basic Configuration Assume you have already created a Maven based Java EE 6 application. If not, you can create one using JBoss Forge. Add Seam 3 reports related dependencies into your pom.xml . <dependency> <groupId>org.jboss.seam.reports</groupId> <artifactId>seam-reports-api</artifactId> <version>${seam-reports-version}</version> </dependency> <!-- If you are using Jasper Reports, add the following dependency --> <dependency> <groupId>org.jboss.seam.reports</groupId> <artifactId>seam-reports-jasper</artifactId> <version>${seam-reports-version}</version> </dependency> Generally, in order to generate a JasperReports based report in a Seam 3/Java EE6 project, y...

Send email with Seam 3 Mail and JMS

Seam 3 Mail module provides simple API to use Java Mail API to send email message. Basic Configuration Assume you have already created a Maven based Java EE 6 application. Add seam mail dependency to your pom.xml file. <dependency> <groupId>org.jboss.seam.mail</groupId> <artifactId>seam-mail-api</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jboss.seam.mail</groupId> <artifactId>seam-mail</artifactId> <scope>compile</scope> </dependency> Add basic mail configuration in your META-INF/seam-beans.xml . <mail:MailConfig serverHost="smtp.gmail.com" serverPort="587" auth="true" enableTls="true" username="<your gmail account>" password="<your password>"> <ee:modifies /> </mail:MailConfig> In your Java codes, inject ...

A new registeration problem occured...

NetBeans 6.5 patch 2 is available now. As the release note declared , the previous JBoss 5 registration problem is fixed in this patch. This means You can add a JBoss Application Server in Services Windows directly , as you add other app server. 1. Start NetBeans 6.5 , and open the Services Windows. 2.Right click the "Server" node , select Add Server in context menu. Unfortunately, I got a NullPointerException. I try to do this in another way . Open Server manager from Tools->Servers menu , click add Server button and then encounter the same problem. This is a bug reported in NetBeans bugzilla , as report #123180 . It is awfully boring. Update: From the www.planetnetbeans.org , a blog entry named " NetBeans, JDK Update 12 and Server Registrati " reports the same problem. The reason is that NetBeans 6.5 runs on the newest JDK 6 update 12. I've just updated it to update 12. Downgrade jdk to update 11 or wait for the ...

Registering JBoss 5 GA in NetBeans 6.5 under Fedora 10

JBoss 5 is GA for some days, but NetBeans 6.5 dose not support JBoss 5.0.0 GA. I use google and find the solution to fix the problem. Follow this blog entry, Registering JBoss 5.0 in NetBeans 6.5. Simple copy several jars from JBoss common lib directory to the instance lib directroy. Enter the JBoss home directory and enter common/lib directory. [hantsy@localhost jboss-5.0.0.GA]cd common/lib [hantsy@localhost lib]cp jboss-javaee.jar jboss.jar jbosssx.jar jmx-adaptor-plugin.jar jnpserver.jar log4j.jar ../../server/default/lib/ It is simple. Now you can add JBoss 5 to the Server node in NetBeans Services Windows. But I encountered another problem under Fedora 10. When I start JBoss 5 from NetBeans Service panel. It failed with the following error message. The transaction service port is used by another application. [hantsy@localhost ~]$ sudo netstat -apl|grep 4713 [sudo] password for hantsy: tcp 0 0 *:4713 *:* LISTEN 24723...