Tuesday, February 19, 2008
Solid State Drive (SSD) and Server Hardware
1. Very fast read access
2. Better write performance
Which will make
1. High Performance
2. High reliability
3. increased Throughput
So probably hardware vendor at least should give options to go for SSD for the above reasons.
Integrating Java EE 5(JEE5), JBPM, JBoss Seam, Netbeans and Glassfish V2
Integrating Java EE 5(JEE5), JBPM, JBoss Seam, Netbeans and Glassfish V2
I have ported jboss todo example application into Java EE 5 (Jee5) running on Glassfish v2 using Netbeans 6 IDE.
Create an enterprise application called todo with todo-war and todo-ejb applications modules.
Please download the jboss –seam at http://www.jboss.com/products/seam
before proceeding to next step. Also download and install netbeans from http://www.netbeans.org/downloads
Jboss seam required jboss-seam.jar as ejb application which should be added into application.xml. But Netbeans has deployment issue when we just add jboss-seam.jar as ejb application. In order to overcome this issue, we need to create separate module in Netbeans for seam. So create jboss-seam ejb module.
Creating jboss-seam ejb module:
Click “New Project”, Click “
You need to configure dependant jar files Library for jboss-seam ejb module.
To configure libraries, right click on the “jboss-seam” project click “properties” menu which opens the dialog box titled “Project Properties - jboss-seam”. Go to “Library”. In the right hand side click “Add Library” and Click “Manage Libraries”, then “New Library”. Give the name “Jboss-Seam-Lib”, click “Add Jar/Folder” button to add the jar files. Browse through {Seam Installation/unzipped Directory}/ lib
Add all the jar files except
§ jboss-seam.jar
Click “Ok” and choose “Jboss-Seam-Lib” in the “Add Library” dialog. Library “Jboss-Seam-Lib” will be listed under the “Compile” tab of the dialog box titled “Project Properties - jboss-seam”. Uncheck the check box, this will make sure that these jars will be used only for compilation. So whenever we use “jboss-seam” ejb module, these jars will not be copied. Next, we need to copy the source files from {Seam Installation/unzipped Directory}/src/main into Netbeans’ jboss-seam module under the “Source Packages” in Project view. Thus we got “jboss-seam.jar” equivalent module in netbeans.
JBPM Integration:
All the Jar files which is mentioned below will be available under the folder {Seam Installation/unzipped Directory}/ lib.
In order to run Jbpm, we need additional Jar files which I am going to explain below,
Required Jar for ear application (todo):
Right click on the EA project “todo”, click properties menu which opens the dialog box titled “Project Properties - todo”. Go to “Packaging” section under “Build”.
Create a library called “JBPMLib” (You can create a new library by clicking “Add Library” button in the right side pane and Click “Manage Libraries”, then “New Library”. Give the name “JBPMLib”, click “Add Jar/Folder” button to add the jar files )and add the following jar files.
§ jbpm-jpdl.jar
§ testng.jar
§ quartz.jar
JBPM requires Hibernate which is used as persistence framework. So create one more library for Hibernate (“Hibernate-Seam-Lib”) and add the bellow jar files
§ antlr.jar
§ cglib.jar
§ commons-beanutils.jar
§ commons-collections.jar
§ commons-digester.jar
§ commons-logging.jar
§ dom4j.jar
§ hibernate-annotations.jar
§ hibernate-commons-annotations.jar
§ hibernate-entitymanager.jar
§ hibernate-validator.jar
§ hibernate.jar
§ javassist.jar
§ log4j.jar
I also added the below jar files which is required for jboss-seam.
§ jboss-archive-browsing.jar
§ jboss-common-core.jar
§ jboss-el.jar
Once all the jars added, Click “Ok” and choose “JBPMLib” in the “Add Library” dialog. Library “JBPMLib” will be listed in “Packaging” section under “Build”. Double click on “Location in Archive” column of “JBPMLib” and edit it to “/lib”. Same way add the “Hibernate-Seam-Lib” and edit the “Location in Archive” to “/lib” and click somewhere outside to change the focus (otherwise edit will not be saved sometimes). Add “jboss-seam” ejb module by clicking “Add Project” button. Click “Ok”. This is how we added JBPM and its dependant jar files under lib location in the ear file. All other modules under the ear files will have access to the libraries (jar) under “ear/lib” folder.
Finally your Package dialog will have
- dist\todo-ejb.jar (by default it will be added) Location in Archive: “/”
- dist\todo-war.war (by default it will be added) Location in Archive: “/”
- dist\jboss-seam.jar (You added recently) Location in Archive: “/”
- JBPMLib (You added recently) Location in Archive: “/lib”
- Hibernate-Seam-Lib (You added recently) Location in Archive: “/lib”
Deployment Descriptor Changes:
Add jboss-seam.jar as ejb module in application.xml of “todo” ear module.
Required Jar for ejb application (todo-ejb):
Configure the todo-ejb libraries by going through Project Properties,
Add following Library files
- JBPMLib
- Hibernate-Seam-Lib
- Jboss-seam.jar
Note: Uncheck the “Package” Column for all the above libraries as it is added through EAR application (“todo”), otherwise it will add it into root location of ear file not under lib location.
Ejb App without Ejb: We can’t deploy ejb module without an ejb, so create a dummy stateless session bean.
Empty Seam.properties should be added to let seam knows this project is seam project.
Add the source copied from {Seam Installation/unzipped Directory}/examples/toto/src under “Source Packages”
Required Jar for WAR/web application (todo-war):
Go to the Packaging section of “Project Properties”.
Add following jar files
§ jboss-seam-debug.jar
§ jboss-seam-ui.jar
And edit “Path in ear” column and change it to “WEB-INF/ib”
Adding JBPM Config files:
We need to make following config files available to JBPM engine
- hibernate.cfg.xml
- jbpm.cfg.xml
- todo.jpdl.xml
Please place these files under “Source Packages” directly. So at the end you will be able to see these files under “
Add the source copied from {Seam Installation/unzipped Directory}/examples/toto/resources/WEB-INF to WEB-INF
And “{Seam Installation/unzipped Directory}/examples/toto/view” to “web” folder of Netbeans.
That’s all. Run the todo application. Enjoy Business Process…