Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
25Activity
0 of .
Results for:
No results containing your search query
P. 1
Spring Jbpm JSF Example

Spring Jbpm JSF Example

Ratings:

5.0

(1)
|Views: 2,973|Likes:
Published by aravindssk

More info:

Published by: aravindssk on Jun 22, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/26/2012

pdf

text

original

 
Generated by Clearspace on 2009-06-19-04:00
1
Spring-Jbpm-JSF-Example
Spring Jbpm JSF Maven Project Example
-This is a simple example of an app that runs a simple process and shows how to integrateSpring with Jbpm The view technology chosen is JSF and the database chosen isMySql.  
Requirements
The basic requirement is that you have running aMySqldatabase that connects to yourschema. 
House Cleaning
The application described can be downloaded (maven project) and then you can mvn cleaninstall to create your simpleForms.war and deploy it on yourTomcat server(i am running on6.0.9)  
Your may need to manually install the jbpm lib files jbpm-3.1.2.jar and jbpm-identity-3.1.2.jar
for your maven to get them correctly. Then modify the pom file accordingly that is,
 
Spring-Jbpm-JSF-ExampleGenerated by Clearspace on 2009-06-19-04:00
2
<dependency><groupId>jboss</groupId><artifactId>jbpm</artifactId><version>3.1.2</version><scope>compile</scope></dependency><dependency><groupId>jboss</groupId><artifactId>jbpm-identity</artifactId><version>3.1.2</version><scope>compile</scope></dependency>
 
Setting your infrastructure
JBPM Tables
For starters we need to have the jbpm tables into yourMySqldatabase. The easiest way I found is to let hibernate create them for you: (Using the attached project)
1.
grab a hold on
WEB-INF/jdbc.properties 
file and modify the required fields, save thefile.
1.
That is, make sure you modified username and password fields
2.
Open up
WEB-INF/applicationWebContext.xml 
and uncomment
<prop key="hibernate.hbm2ddl.auto">create</prop> 
located under
 jbpmSessionFactory 
bean, save the file.
1.
On your terminal window run mvn clean install
2.
Fetch the
simpleForms.war 
from the target directory created by maven
3.
Copy and paste the
simpleForms.war 
into your tomcat webapps directory
4.
Start up your Tomcat server and make sure it starts up successfully.
5.
Check against your database (I useDBVisualizeror any other database viewer) andmakesure you can see a large array of tables created eg JBPM_PROCESSDEFINITION etc..
 
Spring-Jbpm-JSF-ExampleGenerated by Clearspace on 2009-06-19-04:00
3
1.
Shut down your Tomcat Server, go back to your project and comment outthe
<prop key="hibernate.hbm2ddl.auto">create</prop> 
in your
WEB-INF/ applicationWebContext.xml 
file 
Integrating Spring into the mix
This will give you an explanation on how Spring is wired into the application and allows foreasier management of your processes.
web.xml
Things to note for
We will currently use only one spring application context file (look under
<param-name>contextConfigLocation</param-name> 
). 
We use the Spring'sOpenSessionInViewFilterto handle hibernate sessions underthe hood 
We use JSF 1.1 and is configured in the web.xml file with only one faces-config file
The Faces Servlet uses the url pattern of .faces meaning our applyHolidayForm.jspmaps to applyHolidayForm.faces 

Activity (25)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
JonathanMiranda liked this
chakribook added this note
where is the link to download the maven project? Thanks.
Sandeep Kumar liked this
swaroop.oggu4531 liked this
Rahul Bhandari liked this
somsak_tk liked this
somsak_tk liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->