How to Deploy On JBoss

From Projectivity Documentation
Jump to: navigation, search
Go back to Installation Guide main section

Contents

Overview

Projectivity binary download bundle comes with an already configured JBoss Application Server version 4.2.3.GA

If you want to try to deploy Projectivity on your JBoss Instance, you need to go through some configuration hell.

This section helps you solving most of the problems you might find. If you have problems you can ask support on the Projectivity Community Forum.

You need the Projectivity source archive to do this.

Configure JBoss

Remove useless services

You can start configuring from JBoss default server instance.

However several services that come with the default configuration are not used by Projectivity and you better removed them to save resources.

It is mandatory to remove:

  • mail-service.xml (conflicts with projectivity-mail-service.xml)
  • jms (JBoss MQ must be replaced with JBoss Messaging)

You can safely remove the following (from JBoss 4.2.3.GA):

  • ejb3.deployer
  • http-invoker.sar
  • jboss-bean.deployer
  • jbossws.sar
  • management
  • bsh-deployer.xml
  • cache-invalidation-service.xml
  • client-deployer-service.xml
  • ejb3-interceptors-aop.xml
  • hsqldb-ds.xml
  • jboss-ha-local-jdbc.rar
  • jboss-ha-xa-jdbc.rar
  • jsr88-service.xml
  • mail-ra.rar
  • monitoring-service.xml
  • schedule-manager-service.xml
  • scheduler-service.xml

Update server instance libraries

Some server instance libraries of JBoss must be installed or updated.

copy the jars you find in the directory:

/whatever/path/to/source/archive/jboss/lib/

to the server instance lib directory:

/whatever/path/to/JBoss/sever/projectivity/lib

NOTES:

  • some library will overwrite existing files. This is normal since we are updating few libraries.
  • these libs include the PostgreSQL library version 8.3-603. You might need to replace it with the corresponding version of your PostgreSQL server.

Modify the JBoss URLComparator

This step is needed to allow the Projectivity modules to be deployed in the correct order by JBoss. We will configure the URLCompatartor to PrefixDeploymentSorter. This allows to prefix the modules to be deployed later with a number. See URLComparator Section on JBoss wiki for more information.

Edit the following file

/whatever/path/to/JBoss/sever/projectivity/conf/jboss-service.xml

and set the following attribute of the URLDeploymentScanner MBean:

<attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>

Install JBoss Messaging Server

Projectivity requires to replace the JMS (Java Messaging Service) default server of JBoss (JBoss MQ) to the new JBoss Messaging Server.

Please refer to JBoss Messaging Server web site in order to do it.

Set the security realm of the jmx-console

this is to make jmx-console to use the same security realm than projectivity

Edit the following file:

/whatever/path/to/JBoss/sever/projectivity/deploy/jmx-console.war/WEB-INF/jboss-web.xml

to be as follows:

<jboss-web>
   <security-domain>java:/jaas/ProtectivityRealm</security-domain>
</jboss-web>

and Edit the following file:

/whatever/path/to/JBoss/sever/projectivity/deploy/jmx-console.war/WEB-INF/web.xml

and change the end of the file to be as follows (replace from <security-constraint> tag):

<security-constraint>
    <web-resource-collection>
      <web-resource-name>HtmlAdaptor</web-resource-name>
      <description>An example security config that only allows users with the
        role JBossAdmin to access the HTML JMX console web application
      </description>
      <url-pattern>/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>SUPEROWNER</role-name>
    </auth-constraint>
  </security-constraint>
  <login-config>
     <auth-method>BASIC</auth-method>
     <realm-name>JBoss JMX Console</realm-name>
  </login-config>
  <security-role>
     <role-name>SUPEROWNER</role-name>
  </security-role>

Set the ejb-deployer data source

Edit the following file:

/whatever/path/to/JBoss/sever/projectivity/deploy/ejb-deployer.xml

and replace and DefaultDS occurance with PY_DS:

<depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=PY_DS</depends>

set the uuid-key-generator.sar data source

Edit the following file:

/whatever/path/to/JBoss/sever/projectivity/deploy/uuid-key-generator.sar/META-INF/jboss-service.xml

and replace and DefaultDS occurance with PY_DS:

<depends optional-attribute-name="DataSource">jboss.jca:service=DataSourceBinding,name=PY_DS</depends>

Set the web container to use the JBoss Class Loader

Edit the file:

 /whatever/path/to/JBoss/sever/projectivity/deploy/jboss-web.deployer/META-INF/jboss-service.xml
or (depending on the version)
 /whatever/path/to/JBoss/sever/projectivity/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml

and set the UseJBossWebLoader attribute to true:

<attribute name="UseJBossWebLoader">true</attribute>

JSF Libraries

JBoss 4.2.3.GA comes with JSF libraries.

If your version of JBoss lacks the following libraries you need to add them to the lib directory:

  • el-api.jar
  • el-ri.jar
  • jsf-impl.jar
  • jsf-api.jar

You find those libraries in the source archive under lib/EL and lib/JSF_RI

Deploying

Deploy the Projectivity Modules

Once you have successfully build Projectivity and configured JBoss you have to deploy the following modules (coping them under the deploy directory of the JBoss server instance):

  • Core_Business.jar
  • Core_Search.jar
  • 100_projectivity_index_synchronizer.sar
  • Module_Scope_Business.jar
  • Module_Asset_Business.jar
  • Module_Presentation.war
  • static.war

Deploy the Quartz Scheduler

Copy the directory:

/whatever/path/to/source/archive/jboss/deploy/200_projectivity-quartz-service.sar

to the server instance deploy directory:

/whatever/path/to/JBoss/sever/projectivity/deploy

Configure Data Source, Mail Service and Properties

Copy from the following source archive directory:

/whatever/path/to/source/archive/jboss/deploy

*projectivity-mail-service.xml
*projectivity-postgres-ds.xml
*projectivity-properties-service.xml

to the JBoss deploy directory:

/whatever/path/to/JBoss/sever/projectivity/deploy

NOTE: you need to edit these files to meet your system configuration. Documentation is in line.

Deploy the JBoss Messaging Queues

Copy from the source archive directory:

/whatever/path/to/source/archive/jboss/deploy/jboss-messaging.sar

the following files:

*projectivity-destinations-service.xml
*projectivity-postgresql-persistence-service.xml

to the JBoss Messaging sar directory, usually:

/whatever/path/to/JBoss/sever/projectivity/deploy/jboss-messaging.sar

NOTES:

  • these configuration file are specific for JBoss Messaging version 1.4.0.SP3 and you might need to update them for other versions.
  • the sar module jboss-messaging.sar that you find in the source archive works only with JBoss AS 4.2 and later, you need to follow the installation guide of JBoss Messaging to deploy it on different versions of JBoss AS.
Personal tools
Downloads
Other Resources