JBoss configuration


CONFIGURATION OF JBOSS WITH JETTY AND POSTGRESQL

IN WINDOWS 98.

by Vicent-Ramon Palasí Lallana.

Aurum Solutions.

El Salvador. Central America

This document explains the steps that have to be followed in order to configure Jboss with Jetty and PostgreSQL in a Windows 98. You can freely distribute this document and the files attached to it but you must always include the name of the author and his company.

1.- Disclaimer.

This document is provided "AS IS," without a warranty of any kind. All representations and warranties are excluded. In no event will the author be liable for any lost revenue, profit or data, or for indirect, special, consequential, incidental or punitive damages, arising out of the use of or inability to apply the content of this document.

English is not the author's mother tongue. So this document can contain language errors of any kind. Feel free to correct them if you want it.

2.- Contents of the Zip file.

This document must be distributed compressed in a Zip file. The contents of the ZIP file has to be:

Jboss configuration.doc This document in Word format (original format).

Jboss configuration.html -> This document in HTML format.

run.bat -> BAT file to start Jboss.

jboss.jcml -> Configuration file of jboss.

standardjaws.xml -> Configuration file of jboss.

3.- Release info.

The information of this document refers to Windows 98, Jboss 2.4.4. with Jetty, Java SDK 1.4, PostgreSQL 7.1.3-2 (downloaded with Cygwin). The author has tested only this environment, although he believes that part of this document or even the whole document can be applied to other configurations of the same products.

4.- Why Jboss, Jetty and PostgreSQL?

The author has aimed at achieving an 100% Open Source Environment which could be used in production in order to provide commercial solutions. Jboss was the only J2EE server capable to do that. PostgreSQL is the only Open Source Database with JDBC driver supporting transactions (although the last versions of MySQL also support transactions, the JDBC driver has not been updated to reflect that). Jetty has been chosen because it is an HTML, servlet and JSP server. Another servlet server would have not been able to provide static content so it would have been necessary to install a Web server (like Apache). Choosing Jetty avoid the need to install another product.

5.- Downloading and installing.

First, download jBoss 2.4.4. from the Download link at Jboss site (www.jboss.org). This is easy. Then download Cygwin from www.cygwin.org (this is a bit more hard, follow the instructions of this site). Make sure you download PostgreSQL 7.1.3-2 and bunzip2 with cygwin and all the “base”, “shell” and “database” utilities (not all of these are mandatory, but I have had no time to test which of them are needed and which are not).

Install Cygwin on your computer (the Cygwin setup program does that). At this document, it is assumed that the folder is <cygfol>.

Then, download CygIPC at this site:

http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/

You will download the latest binary file (e.g., cygipc-1.10-1.tar.bz2). Save it to the <cygfol> folder. Launch a Cygwin window (clicking the Cygwin icon on your desktop or running <cygfol>\cygwin.bat). Inside Cygwin, uncompress the binary file with a command like this: “bunzip2 -c <path-to-archive>/cygipc-1.10-1.tar.bz2 | tar xvf -”(don't forget the final dash).

To test the CygIPC install, launch a Cygwin window and type: “ipc-daemon & It should echo its process number and give no errors.

Uncompress Jboss and place it on a folder. We will name it <jbossfol>. The folder <jbossfold> has to include the following subfolders:

Jboss

Jetty

Jetty-jmx

The Jboss subfolder will be named <jbosssub> in this document (please don't confuse it with <jbossfol> which has the same name, that is, “Jboss”).

Add the following lines to your autoexec.bat (every sentence beginning with “set” must be in one different line, be careful not to leave superfluous blank spaces) :

set JAVA_HOME=<the folder of your Java SDK installation>

set JBOSS_DIST=<jbosssub>

set JBOSS_CLASSPATH= %JBOSS_DIST% \LIB\EXT;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\tools.jar;%JBOSS_DIST%\lib\ext\*.jar

set CLASSPATH=%JBOSS_DIST%\JBOSS\LIB\EXT;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\tools.jar;%JBOSS_DIST%\lib\ext\*.jar (optionally, this is followed by the rest of your classpath).

6.- Configuring Jboss

There is a run.bat file at the <jbosssub>\bin directory. Replace this file with the run.bat file attached to the present document.

Copy the files jboss.jcml and standardjaws.xml (that are attached to the present document), to the <jbosssub>\conf\default and <jbosssub>\conf\jetty directories. By doing so, you will replace four existing files.

Remove the file named “tomcat-test.ear” from the <jbosssub>\deploy directory since we are working with Jetty and not with Tomcat.

7.- Configuring PostgreSQL

Copy the file “<cygfol>\usr\share\postgresql\java\postgresql.jar” to the directory <jbosssub>\lib\ext.

Launch a Cygwin window and type the command “ipc-daemon &“. Then, initialize PostgreSQL with “initdb -W -D /usr/share/postgresql/data”. When the program asks twice for superuser password, press ENTER twice (this is provisional, you should change it later)

Reboot the machine in order to set the changes made to autoexec.bat.

8.- Running it all.

Steps from 1 to 7 must be followed only once or, more exactly, each time jBoss is installed. But step 8 (the present one) must be followed each time jBoss is runned.

First, we must run PostgreSQL. Launch a Cygwin window and type “ipc-daemon &“. Then, run “postmaster -i -D /usr/share/postgresql/data”.

Then execute one of these programs: <jbosssub>\bin\run.bat (if you want to run jBoss without Jetty) or <jbosssub>\bin\run_with_jetty.bat (if you want to run jBoss with Jetty).

That's all. One last note, if you want a GUI to manage PostGreSQL, download PgAdminII from http://pgadmin.postgresql.org/ This is not necessary so information regarding pgAdminII installation and execution is not included here.

9.- References

This document is the result of the work of the author. This work has been partially based on the following documents:

http://www.ejip.net/faq/postgresql_win_setup_faq.jsp

and

http://main.jboss.org/thread.jsp?forum=61&thread=7205&message=377518&q=PostgreSQL#377518

Since these documents have some inaccuracies and don't have the same objectives than the present document, my advise is not to consult them.



Wyszukiwarka

Podobne podstrony:
CISCO how to configure VLAN
NS2 lab 4 4 7 en Configure Cisco IOS IPSec using Pre Shared Keys
Configuration Guide WAN Access(V100R006C00 02)
Configsys
6 4 1 2 Packet Tracer Configure Initial Router Settings Instructions
5 3 3 5 Packet Tracer Configure Layer 3 Switches Instructions
Conformations and Configuration
107? ConfigGuide
Installing WSUS for Configuration Manager 2012 R2
cisco router configuration tutorial 4RFRMJJB5VAS625R6IMZTYKDZMOXETS3MOXNMZQ
lab 13, 9.2.1.10 Packet Tracer Configuring Standard ACLs Instructions
lab8, 3.2.2.4 Packet Tracer - Configuring Trunks Instructions
SÅ‚ownik, ACPI (Advanced Configuration and Power Interface): Standard zarzÄ…dzania energiÄ… wypracowany
SÅ‚ownik, ACPI (Advanced Configuration and Power Interface): Standard zarzÄ…dzania energiÄ… wypracowany
15 5 2 Lab Configure Wireless Router
15 4 2a Lab Config Browser Setting
configuring the switches (2)
lab8, 2.2.4.11 Lab - Configuring Switch Security Features
Configsys

więcej podobnych podstron