Mar 08 2007

The Deployment scanner - jboss

Catégorie : Web & J2EE server, Jboss, Tips and tricksCharles Collier @ 1:13 am

Start

The conf/jboss-service.xml file is full of options. One of these ones is about the deployment scanner. If you make any change in a jboss config file then you’ll have to restart the server.

Open the conf/jboss-service.xml in vi or some text editor capable of saving in plain text. Scroll near the bottom to the MBean definition for the DeploymentScanner:

Deployment Sorter

As you scroll down you should see some comments followed by this:

org.jboss.deployment.DeploymentSorter

This is the deployment sorter which enforces the default deployment order. Starting from 4.0.1, it gets the sort order from the MainDeployerss EnhancedSuffixOrder. If you prefer a UNIX System-V init style you can comment this sorter and uncomment the following line:

org.jboss.deployment.scanner.PrefixDeploymentSorter

This sorter will use a numeric prefix-based order. If you wish to use this sort, you should read further on the prefix deployment order.

Scan Period

As you scroll further you will find:

5000

The default value is 5000 milliseconds or 5 seconds. This determines how frequently the directories which the Deployment Scanner is watching (/deploy) will be polled. Of course it very usefull when you are under development. But when you a production server this option should be disable (because of waste CPU, or protect from unwanted productions changes)

URLs

As you scroll further you will find:

deploy/

It will defined where data (such as .ear or .war) for hot deployments will be used.
It could even be http://url or webdav url.
For example, if you wanted to protect the database passwords you might do this:

deploy/,datasources/

You could set the file system permissions on datasources/ such that JBoss could read them, but developers could not.

Recursive

Finally, you should see:

True

This will cause the deployment scanner to recurse into subdirectories. Read this for more informaton on the drawbacks.

Disable Hot Deployment

Add the following attribute:

false

Feb 17 2007

Definition d’un datasource sous jboss

Catégorie : Web & J2EE server, JbossCharles Collier @ 2:56 pm

Pour mettre en place, une datasource, il suffit de prendre un exemple ici /usr/local/jboss/docs/examples/jca/*-ds.xml

oracle-ds.xml par exemple

copier le /usr/local/jboss/server/default/deploy/ sous le nom fichier_de_datasource.xml

il faudra y faire reference dans les fichiers de config xml de l’appli qui sera deployer sous jboss:

Jboss_datasource_definition


Feb 01 2007

JBoss - open source J2EE application server

Catégorie : Jboss, Tutoriaux, LinuxCharles Collier @ 10:45 pm

* What is Jboss?
* Downloading Jboss
* Installing JBoss
-with command line
-with graphical mode
* Running JBoss
* Exploring the Directory Structure
* Configuration
* Deploying an application to JBoss
* Summary

JBoss is an open source J2EE application server. It is J2EE 1.4 spec-compliant, which means that it offers the same level of functionality as its more expensive commercial counterparts such as Oracle Application Server, Websphere (IBM) or Weblogic (BEA). The main difference is the price and to be honest the main admin interface.For example, an absolute beginner would find more comfortable to have a web interface to declare a jdbc datasource, instead of declaring it with “VI” editing an xml file. Considering the reliability of other open source products like Apache web server, Jboss should also become more popular and reliable, but it has already begun to become a serious competitor for the market leaders.

Although the term application server applies to all platforms, it has become heavily identified with the Sun Microsystems J2EE platform; we should always say Jboss is a J2EE application server

What is Jboss?

Go to the JBoss Application Server Downloads page. -> http://labs.jboss.com/portal/jbossas/download

Choose the latest production version of the JBoss Application Server package. (4.0.5 Production 2006-10-18) Since the 4.0.3 SP1 version, you can try a “Run Installer” http://jboss.sourceforge.net/jnlp/jems-installer-1.2.0.GA.jnlp or download it. You must have a X console or a graphical interface to use it.