Version 8

    Jboss General How To

     

     

    1.     Change Jboss running port:

     

      •      Open server.xml that is located under <configuration>/deploy/ jbossweb-tomcat55.sar

      •      Change <Connector port="8080" to the desire port.

      •      Restart Jboss.

     

    2.     Add jdbc drivers to classpath:

      •      Create folder <drive>:\drivers.

      •      Under that folder create folder for each db type (i.e. mssql,oracle etc.).

      •      Copy the driver jars to there designated folder.

      •      Create variable in run.bat/sh MSSQL_DRIVER=<pathtomssql>\jars.

      •      Add to Application server classpath the driver jars full path and name for each.

      •      Restart Jboss.

     

    3.     Start Jboss with MySql server as the default DB server.

      •      First install MySql server, administrator and query browser.

      •      From the MySql command line run the following commands.

        •      CREATE DATABASE jboss;

        •      SHOW DATABASES;

        •      mysql> GRANT ALL PRIVILEGES ON jboss. to jboss@localhost IDENTIFIED BY 'password';

        •      select User,Host,Password from mysql.User;

        •      CREATE TABLE JMS_MESSAGES (MESSAGEID INT NOT NULL,DESTINATION VARCHAR ( 255) NOT NULL, TXID INT , TXOP CHAR ( 1),MESSAGEBLOB BLOB , PRIMARY KEY (MESSAGEID, DESTINATION));

        •      CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER );

      •      Add to the CLASSPATH the MySql driver.

      •      Delete the hsqldb-ds.xml

      •      Copy from Docs/examples/jca the mysql-ds.xml to the deploy folder.

      •      Change the connection url from mysql-host to mysql host name.

      •      Change user-name to jboss

      •      Change password to password.

      •      Start Jboss.

     

    4.     Run 2 configurations on the same computer

    All you need to do is to change ports in the new configuration

      •      Open /deploy/jbossweb-tomcat55.sar/server.xml

      •      Open conf/jboss-service.xml and change ports 8083,1099,1098,4444,4445

      •      Open deploy/jms/uil2-service.xml and change port 8093

    Note that during installation of Black Box you will need to provide port of HTTP connector (see step1) and port of JNDI provider URL (changed in step 2).

    5.     ...

     

    6.     Configure Isolated ClassLoader.

      •      Add the following lines to jboss-app.xml (located inside EAR file into the META-INF directory)

     

      •      Add the following lines to jboss-web.xml

         

      •      Change the following values to true in ear-deployer.xml

    .

      •      Change the following values to false in jboss-service found under tomcat/META-INF

               

      •      Change the DownloadServerClasses attribute in server/<CONFIGURATION>/conf jboss-services.xml to false.

     

    Remember that it is Isolated ClassLoader so when deploying the same application twice changes must be made in the jar names and in ejb.xml.

     

    7.     Disable Hot Deployment in Jboss.

      •      Open the conf/jboss-service.xml.

      •      Add the following attribute:    <attribute name="ScanEnabled">false</attribute>.

    8.     Change Partition Name (Cluster Name)

      •      Open cluster-service.xml located in <config>/deploy and replace all occurrences of DefaultPartition with your meaningful name.

      •      Search for “UDP mcast_addr="228.1.2.3" and change the last number to any number between 0 – 255.

      •      open farm-service.xml located in deploy/deploy.last and change DefaultPartition to the same name.

      •      Open cluster-examples-service.xml located in <conf>/farm and change DefaultPartition to the same name.

      •      In Jboss 4.0.1SP1 open jboss.xml located in <conf>deploy/jbossha-httpsession.sar/ClusteredHttpSessionEB.jar/META-INF/

     

    Or you may simple run JBoss with parameter -Djboss.partition.name=

    Details here