Configuring a different database for JMS tables and generating a script to create JMS tables

By default, the JBoss application server uses the default relational database that is specified in the server or environment file to store JMS-related information. If this database initially does not contain the JMS tables, and if the database user configured in the environment file has DDL privileges, the JMS tables will be automatically created when the server starts up.
To create JMS tables in a database other than the default relational database, add the following properties to the server or environment file for your deployment:
jms.jdbc.url
Required. The location of the database, where host and port specifies host name and port number of the database server. For example: jms.jdbc.url="jdbc:sqlserver://host:port".
jms.jdbc.driver
Required. The full class path of the JDBC driver used to run the JBoss application server. For example: jms.jdbc.driver="net.sourceforge.jtds.jdbc.Driver".
jms.jdbc.user
Required. An ID with the ability to create tables in the database specified by jms.jdbc.url. If you are using the same database for both the JMS and application tables, the user ID specified for deploying the application can also be used here. For example: jms.jdbc.user="DBAdmin".
jms.jdbc.password
Required. The password for the DBAdmin ID. For example: jms.jdbc.password="password".
jms.jdbc.owner
Optional. The owner of the JMS tables in the database. For example: jms.jdbc.owner="dbo".
jms.jdbc.minPoolSize
Optional. The minimum connection pool size. For example: jms.jdbc.minPoolSize="3".
jms.jdbc.maxPoolSize
Optional. The maximum connection pool size. For example: jms.jdbc.maxPoolSize="10".
jms.jdbc.properties
Optional. List of name=value pairs separated by 
 (the XML newline escape character). For example: jms.jdbc.properties="bufferMaxMemory=65536
prepareSql=3
sendStringParametersAsUnicode=false
maxStatements=0
appName=NexJ
xaEmulation=true
lobBuffer=10485760".
To generate an SQL script that creates JMS tables in either the default relational database or the database identified in the jms.jdbc.url property, add the following property to the server or environment file for your deployment:
jms.sql.file

The absolute file path, including the file name, where you want the generated SQL to be output. For example: jms.sql.file="C:\sqlfiles\create_jboss.sql".

If the user accessing the database that hosts the JMS tables does not have DDL privileges, use the jms.sql.file property to generate an SQL script that creates the JMS tables. Provide this script to a database administrator to create the JMS tables in the database.

To add jms.* properties to the server or environment file:
  1. In the Global Environments view or in the Environments tab of the Deployment layer, double-click the server or environment created for deploying the model. The file opens in the environment editor.
  2. In the Environment editor, click the Source tab. You can now view and edit the source XML that makes up the environment file.
  3. Add the jms.* properties to the opening Server or Environment tag. The tag should be similar to the following:
    <Environment ... jms.jdbc.url="jdbc:sqlserver://
    localhost:1433" jms.jdbc.driver="net.sourceforge.jtds.jdbc.Driver"
     jms.jdbc.user="deployment_ID" jms.jdbc.password="text:deployment_password"
     jms.sql.file="C:\sqlfiles\create_jboss.sql" ...>
  4. Click the Save button to save your changes.

If you specified the jms.jdbc.* properties, then the JMS database will be configured on the server when your NexJ application is deployed. When the server starts, if the JMS tables do not exist, they will be created in that database with the options specified. If the attempt to create the tables fails, review server.log for detailed information.

If you did not specify the jms.jdbc.* properties, then JMS database will be configured to be the same as the default relational database.

If you specified a file path in the jms.sql.file property, then the SQL script for creating the JMS tables will be generated in that location when your NexJ application is deployed. Provide your database administrator with this file to create the database schema.