Arno

Introduction

This is version 0.1 of small application that demonstrates how to use EJB technology and Struts web development framework together. It is a personal organizer that let’s its users to manage their tasks and events. Don’t expect high usability of this software (in some future versions it will be considered) because it is only ment to be a demo.

Demonstrating

In this version software demonstrates:

  • How to write and configure Enterprise Java Beans (with bean managed persistance)
  • How to write and configure basic Struts classes and files
  • How to use EJBs in Struts framework
  • How to use some other web technologies (e.g. CSS,…) in your projects
  • How to use Ant in J2EE development
  • How to configure and deploy this application on JBoss application server

Prerequisites

In order to run this demo you need to aquire and install few other software packages:

  • Application server – You must install J2EE apllication server. This demo is developed for JBoss applications server, but you can use any other server you want.
  • Database server – You must install database server. This demo is developed for Postgres database server, but you can use any server of your choice as long it has JDBC driver.
  • Struts framework – You must install Struts framework. Visit Struts official site at http://jakarta.apache.org/struts/
  • Ant build system – You must install Ant build system. Visit Ant official site at http://jakarta.apache.org/ant/

Installation

This are steps neccessary for deployment of “arno” on JBoss 3 application server using Postgres 7 database server on Linux. For any other enviroment you should consult appropriate documentation. Some steps are common to all enviroments.

  • Download source code archive of arno from here
  • Extract archive – If you are using Linux, type
    tar zxvf arno-0.1.tar.gz
  • Create database named arno – If you are using Postgres on Linux, type something like
    createdb -Upostgres arno

    This step is enviroment dependent, please contact your database documentation for any specific information on this topic

  • Initialize database with conf/arno.sql file – If you are using Postgres on Linux, type something like
    psql -Upostgres -f conf/arno.sql arno
  • Configure application server enviroment – You should make database server accessible to the application server. This usually means that you must put JDBC driver of your database server in application server classpath and register connections to the apllication server. This step is enviroment dependent and here you can find insturctions for JBoss – Postgres enviroment.

      – Copy Postgres JDBC driver into JBoss library folder (e.g. /opt/jboss/server/default/lib/). If you have any questions regarding Postgres JBDC driver, please visit http://jdbc.postgresql.org/

      – Copy conf/postgres-service.xml file in JBoss deployment folder. This file is a connection manager file for JBoss server

  • Deploy the applicaton – Edit build.xml file in project root folder. Set values for variables:

      – servlet.jar – path to the java servlet engine. You can usually locate this file in application server library folder

      – struts.libs – path to the Struts library

      – compile.classpath – path to the J2EE API engine. You can usually locate this file in application server library folder

      – deploy.home – deploy folder of the application server

    Run ant with deploy action

    ant deploy
  • Run the application – Start application server and access application (e.g. http://localhost:8080/arno/). You can log on with default account (user/pass: admin/admin) and start adding another users to the application. There is two kinds of users: Administrators (manage users) and regular users (manage tasks, events and folders).

Todo

In future releases of Arno, you can expect:

  • Container managed beans examples
  • More documentation that explains development process
  • Advanced Struts options and tag examples
  • Custom tag examples
  • … much, much more

For any questions regarding this demo, please don’t hesitate to contact me

Leave a comment

Your email address will not be published. Required fields are marked *