This sections will explain the configuration steps needed to successfully deploy the Imixs JSF Sample Application in conjunction with the Glassfish Java EE Server.
You can download the Glassfish Server from the Glassfish project site. This side also includes an Installation guide for installing Glassfish on different platforms. Glassfish is provided in two versions. Version 2.1 is a Java EE5 Implementation. The newer Version Glassfish 3 is based on the Java EE6 specification. The setup for these version is similar so you can choose both.
After you have installed the Glassfish Server you can start the server by switching into the directory
and execute the startsrv script.
After the server is started you can open the Glassfish web console with the following URL:
The default user name is 'admin' and the default password is 'adminadmin'
After you have successful installed and tested the Glassfish Server you can download the Imixs Sample Application for Glassfish from the Imixs Download page The Download Page provides different versions of the Sample Application for Glassfish 2.1 and Glassfish 3. So download the appropriate sample application for your server system.
The Imixs Sample application uses a database resource with the name "jdbc/workflow-db". So you need first to set up a Database Pool and a JDBC resource before you are able to deploy an Imixs JSF Sample application successful. In this example we create a database pool for the build in derby database from glassfish. You can also configure any other database like MySQL, Oracle, Informix, Microsoft SQL Server,....
To create a new database pool in glassfish follow these steps:
1. make sure the derby database is started
2. start admin console -> http://localhost:4848/asadmin
3. navigate to Application Server >> Resources >> JDBC >> Connection Pools
4. click "new" to create a new database source
5. click "next". Now only the following property settings are necessary:
6. Now create a JDBC Resource - Navigate to "Application Server >> Resources >> JDBC >> JDBC Resources"
7. click "new" to create a new resource - jndiName: jdbc/workflow-db - PoolName: imixs_db_pool
To work with the JSF Sample application you need also to configure a security realm. Follow the steps below:
1. start admin console -> http://localhost:4848/asadmin
2. navigate to Configuration->Security->realms
3. add a new file realm named "imixsrealm"
4. choose the class Name "com.sun.enterprese.security.auth.realm.file.FileRealm"
5. Set the JAAS Context to "fileRealm"
6. Set the Key File to a new File name. e.g. "keyfile"
7. open the newly created realm configuration and click on button "manage users"
8. Add the following test accounts:
|Manfred||IMIXS-WORKFLOW-Manager||This user will have maximum access|
|Eddy||IMIXS-WORKFLOW-Editor||User can edit all workitems|
|Anna||IMIXS-WORKFLOW-Author||User will be allowed to create workitems and edit his own|
|Ronny||IMIXS-WORKFLOW-Reader||This user will be only allowd to read workitems|
|Norbert||This user will have no access (just to be sure security works well)|
It is also possible to configure other security bindings as the file based described here. Only the realm name should match to "imixsrealm".
Now install the EAR file of the Imixs Sample Application by the following steps:
1. Be sure, that your database server is up and running. Start it with >asadmin start-database
2. Be sure, that the domain, which you will deploy the application on, is started and alive
3. Now you can start the Admin Console in the browser. The port is listed in the output while starting the domain, i.e. in the default domain domain1 it is >http://[ name of the server ]:4848
4. Choose Applications -> Enterprise Applications and click the button "deploy" in the main frame
5. Choose as type "Enterprise Application (.ear)"
6. at Location choose "Packaged file to be uploaded to the server" and browse to the location, where the ear file is stored
7. press the button "ok" located in the upper right corner --> ear will be deployed