EJB 3.1 Support in JBoss 6.0M2 – Building JBoss

January 27th, 2010

JBoss recently announced that initial support for EJB 3.1 will be available in the upcoming JBoss 6.0 M2 application server.

At present, the EJB 3.1 functionality supported is:

  • developing EJBs without declaring interfaces; and
  • deploying EJBs in WAR files

Since JBoss AS 6.0 M2 isn’t currently available, the best way to get it to try out this new finctionality is to check the source out from the JBoss Subversion repository and build the application server.

Building JBoss AS 6.0 from the trunk is very straightforward to build. To checkout and build the code, you need to have Subversion and Maven installed on your development system.

The code can be checked out from the anonymous JBoss Subversion repository:

svn co http://anonsvn.jboss.org/repos/jbossas/trunk

After checking out (which may take up to an hour or more), the source can be built using the build/build.bat (build/build.sh) command or by using Maven.

> cd trunk\build
> mvn clean install

After about 10 minutes or so, you should have a snapshot build of the upcoming JBoss 6.0. The distrbution is placed in the build\target\jboss-6.0.0-SNAPSHOT directory.

> cd target\jboss-6.0.0-SNAPSHOT\bin
> run.bat
Calling E:\Develop\jboss6\trunk\build\target\jboss-6.0.0-SNAPSHOT\bin\run.conf.bat
===============================================================================

JBoss Bootstrap Environment

JBOSS_HOME: E:\Develop\jboss6\trunk\build\target\jboss-6.0.0-SNAPSHOT

JAVA: C:\Program Files\Java\jdk1.6.0_18\bin\java

JAVA_OPTS: -Dprogram.name=run.bat -Xms128M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -server

CLASSPATH: C:\Program Files\Java\jdk1.6.0_18\lib\tools.jar;E:\Develop\jboss6\trunk\build\target\jboss-6.0.0-SNAPSHOT\bin\run.jar

===============================================================================

19:46:47,792 INFO [AbstractJBossASServerBase] Server Configuration:

JBOSS_HOME URL: file:/E:/Develop/jboss6/trunk/build/target/jboss-6.0.0-SNAPSHOT/
Bootstrap: $JBOSS_HOME\server/default/conf/bootstrap.xml
Common Base: $JBOSS_HOME\common/
Common Library: $JBOSS_HOME\common/lib/
Server Name: default
Server Base: $JBOSS_HOME\server/
Server Library: $JBOSS_HOME\server/default/lib/
Server Config: $JBOSS_HOME\server/default/conf/
Server Home: $JBOSS_HOME\server/default/
Server Data: $JBOSS_HOME\server/default/data
Server Log: $JBOSS_HOME\server/default/log/
Server Temp: $JBOSS_HOME\server/default/tmp

19:46:47,855 INFO [AbstractServer] Starting: JBossAS [6.0.0.SNAPSHOT (build: SVNTag=JBoss_6.0.0-SNAPSHOT date=r99956)]

david Java , ,

Book Review of “JBoss RichFaces 3.3″

January 22nd, 2010

Yesterday I posted a review of JBoss RichFaces 3.3 by Demetrio Filocamo. Head on over to developinjava.com to read the full review.

In summary, I liked the book and would recommend it for developers using RichFaces.

david Java , ,

DZone CDI / Weld Reference Card

January 20th, 2010

It’s good to see that DZone has released another new Refcard, this time on Contexts and Dependency Injection (CDI) and Weld – the CDI reference implementation.

If you’re looking at CDI or Java EE 6, then its worth downloading this Refcard.

david Java ,

Creating a Weld Project using Maven and NetBeans

January 15th, 2010

Now that the Beta Maven archetypes for Weld (the reference implementation of JSR 299 – Java Contexts and Dependency Injection) have been published in the Maven Central Repository, its easy to create Weld projects using Maven and NetBeans.

Assuming you have NetBeans 6.8 set up with GlassFish v3 server and the Maven plugin, use the following steps to create a new project.

1. Create a new Maven project.

Select “File | New Project” and then choose Maven as the category and “Maven Project” as the project type.

2. Add the Weld Maven Archetypes

On the Maven Archetype screen, press the “Add…” button. This will cause the “Specify archetype details” screen to be displayed. On this screen we can add details of the different Maven archetypes that are currently available for Weld.


There are currently 3 Maven archetypes defined in the catalog.

Artifact Id Description
weld-jsf-servlet-minimal Weld archetype for creating an application using JSF 2.0 and CDI 1.0 for Servlet Containers (Tomcat 6 / Jetty 6)
weld-jsf-jee-minimal Weld archetype for creating a minimal Java EE 6 application using JSF 2.0, CDI 1.0 and EJB 3.1 (persistence unit not included)
weld-jsf-jee Weld archetype for creating a Java EE 6 application using JSF 2.0, CDI 1.0, EJB 3.1 and JPA 2.0 (persistence unit included)

For this example, I’m using weld-jsf-servlet-minimal. Enter the details of the archetype from the catalog into the dialog and press “OK”.

On the following screen, select the archetype you’ve just added and press the “Next” button.

3. Select Project Details
On the final page of the create project wizard, enter the project name, location and base package name for the project and press the “Finish” button.

4. Run the project
Now that we’ve created a sample project, it can easily be executed by right clicking on the project node and selecting the “Run” option. This will open a dialog asking for the default deployment server – select a GlassFish v3 server and press “OK”.

If all is successful, the project should now build and be opened in the default browser.

david Java , , , ,

Introduction to JSF 2 Using NetBeans 6.8 and GlassFish v3

August 16th, 2009

I’ve just published an article entitled, “Introduction to JSF 2 Using NetBeans and GlassFish” over at developinjava.com.

In the article I give a brief introduction to JSF 2 and show how you can create JSF 2 managed beans without XML just by using annotations. I also show how you can localize a JSF 2 application and how the Bean Validation Framework can be used to add server side validation onto POJOs.

The article shows how its becoming much easier to write Enterprise Applications using Java EE 6 with the new annotations that are being added to this version of the platform.

To write the sample application in the article I used NetBeans 6.8M1. I’ve found this version of NetBeans to be remarkably stable and the integration with GlassFish 3 to be excellent.

david Java , , , ,

SharePoint and Office Live Workspace Support in Office 2008

July 21st, 2009

Microsoft have just released an update to Office 2008 for Mac that is now available through the Office Update mechanism.

According to the Microsoft Release Notes:

The Microsoft Office 2008 for Mac 12.2.0 Update contains changes that improve stability, reliability, and performance.

This update also includes a new application called Microsoft Document Connection. This application makes it easy to work with files that are located on a SharePoint site or Microsoft Office Live Workspace.

I’m more interested in the new Microsoft Document Connection application as this allows easy access to Microsoft Office Live Workspaces from within Office applications.

Document Connection

Document Connection

To access your Office Live Workspace, all you need to do is select “Add Location” from within the Document Connection Application and choose to “Sign in to an Office Live Workspace”. This allows you to make a connection to your workspace and only needs to be done once for each workspace. After creating this link, you can easily open your Workspace documents from within Office applications using the “File | Open From Document Connection…” dialog.

This type of functionality has been available in Word 2007 for a long time and its a welcome addition to Office 2008.

david Uncategorized ,

Seam Crashing Java on OS X

July 21st, 2009

If you’re developing Seam applications on an Apple Mac using OS X 10.4 Tiger, chances are that at some point the JVM will crash with a segmentation fault such as:

Invalid memory access of location 2df4d000 eip=904716f9

This problem seems to be caused by Apple’s Quartz Renderer and in my experience seems to occur more frequently when using RichFaces.

To get around the problem, you need to tell the JVM not to use Apple’s Quartz Renderer which can be easily done by adding the following JVM option to the JBoss startup script:

-Dapple.awt.graphics.UseQuartz=false

david Java ,

NetBeans Tip: Changing JDK Versions

June 18th, 2009

When you install a new JDK on your PC, NetBeans doesn’t automatically use the new JDK, rather it will continue to use the JDK that was defined when NetBeans was installed. This isn’t generally a problem unless you’ve uninstalled the original JDK when installing a new version.

If the JDK that you specified does not exist when NetBeans starts up, is will display an error dialog saying that the original JDK cannot be found and asking if you want to use the default version.

Default JDK?

Default JDK?


To overccome this problem, we can tell NetBeans which JDK to use. This is done by editing the file NetBeans\etc\netbeans.conf. Within this file, the default JDK to use for NetBeans is defined by the netbeans_jdkhome attribute.

netbeans_jdkhome=”C:\Program Files\Java\jdk1.6.0_13″

Change this attribute to the path of the JDK that you wish to start NetBeans with, restart the IDE and the appropriate JDK will be used.

david Java ,

NetBeans and Kenai JIRA Integration

June 1st, 2009

NetBeans 6.7 RC1 has been released today and one of the new featires available with the RC is JIRA integration. NetBeans 6.7 now supports both Bugzilla and JIRA integration although the JIRA integration is described as “Early Access”.

To install JIRA support, you need to add the JIRA plugin via the “Tools | Plugins” menu option.

Once installed, you can easily configure the JIRA plugin to use kenai.com as as a JIRA issue tracker. Open up the Services Pane, and right click on “Issue Trackers” and choose “Create Issue Tracker”.

Create Issue Tracker

Create Issue Tracker

The resultant dialog allows the Kenai JIRA information to be configured.

Create Issue Tracker

Create Issue Tracker

When creating the Issue tracker, you can give it any Name that you wish. The Issue Tracker Url should be set to https://kenai.com/jira and the Username and Password fields should be set to your Kenai username and password.

Once you’ve created an Issue Tracker, you can then easily browse and create issues within JIRA.

Report a new Issue

Report a new Issue

Find Issues

Find Issues

david Java , ,

New Seam Web Development Book Now Available

April 30th, 2009

My new book, Seam 2.x Web Development is now available on Amazon as well as direct from Packt Publishing.

If you’d like to know more about the book, then a full table of contents is available on the book page at Packt Publishing, together with a free downloadable chapter of the book.

david Java , , , ,