[jboss-cvs] jboss-docs/adminguide/docbook/en/modules ...

Sam Griffith sam.griffith at jboss.com
Mon Mar 26 11:14:04 EDT 2007


  User: sgriffith
  Date: 07/03/26 11:14:04

  Modified:    adminguide/docbook/en/modules  appendix-alternative_DBs.xml
  Log:
  Updated PostgreSQL section, got Docbook cleaned up some. Other dbs comign in next checkin.
  
  Revision  Changes    Path
  1.6       +379 -34   jboss-docs/adminguide/docbook/en/modules/appendix-alternative_DBs.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: appendix-alternative_DBs.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-docs/adminguide/docbook/en/modules/appendix-alternative_DBs.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- appendix-alternative_DBs.xml	26 Mar 2007 05:27:36 -0000	1.5
  +++ appendix-alternative_DBs.xml	26 Mar 2007 15:14:04 -0000	1.6
  @@ -218,8 +218,8 @@
   			</para>
   			<para>
   				A MySQL datasource definition can be found in <literal>jboss-4.2.0.CR1/docs/examples/jca</literal>.  If you look in there you'll find a file called <literal>mysql-ds.xml</literal>. It looks like this:
  -
  -	![CDATA[
  +				<programlisting>
  +	<![CDATA[
   	<datasources>
   	  <local-tx-datasource>
   	    <jndi-name>MySqlDS</jndi-name>
  @@ -245,13 +245,13 @@
   	    </metadata>
   	  </local-tx-datasource>
   	</datasources>
  -	]]
  -
  +	]]>
  +				</programlisting>
   			</para>
   			<para>
   				We need to copy that file to the <literal>deploy</literal> directory for our server. (In our case "default"). Once we do that we need to change the <literal>connection-url</literal> to <literal>jdbc:postgresql://localhost:3306/jboss</literal>. For the username put <literal>sam</literal> and for the password put <literal>password</literal>.
  -
  -	![CDATA[
  +				<programlisting>
  +<![CDATA[
   	<datasources>
   	  <local-tx-datasource>
   	    <jndi-name>MySqlDS</jndi-name>
  @@ -277,9 +277,10 @@
   	       <type-mapping>mySQL</type-mapping>
   	    </metadata>
   	  </local-tx-datasource>
  -	</datasources>
  -	]]
   
  +	</datasources>
  +	]]>
  +				</programlisting>
   			</para>
   				<para>When you save the file you should see the datasource be bound by JBoss in the console output like below. Each time you save the file the datasource will be bound and unbound, so you may see multiple entries like below.
   				<programlisting>
  @@ -295,9 +296,9 @@
   		<section>
   			<title>Linking a Datasource to your Application</title>
   			<para>
  -				To configure your application to use MySQL, look for a *jbosscmp-jdbc.xml deployment descriptor. It is located in your servers <literal>conf</literal> directory. 
  -
  -	![CDATA[
  +						For individual applications JBoss looks for a <literal>jbosscmp-jdbc.xml</literal> file in your applications deployment. To configure your application to use MySQL, look for a jbosscmp-jdbc.xml deployment descriptor in your applications jars files and then make sure the jbosscmp-jdbc settings are like so:
  +				<programlisting>
  +	<![CDATA[
   	<jbosscmp-jdbc>
   	   <defaults>
   	      <datasource>java:/MySqlDS</datasource>
  @@ -305,8 +306,8 @@
   				<datasource-mapping>mySQL</datasource-mapping>
   	   </defaults>
   	</jbosscmp-jdbc>
  -	]]
  -
  +	]]>
  +				</programlisting>
   				Although the <literal>datasource-mapping</literal> is optional, it is nice to know the type of the datasource, as this ties directly back to the type-mapping of the data-source.
   			</para>
   			<para>For a full set of default datasource mappings look in <literal>jboss-4.2.0.CR1/server/default/conf/standardjbosscmp-jdbc.xml</literal>. In that file you can look for the <literal>mySQL</literal> type mapping.
  @@ -333,8 +334,8 @@
   		</para>
   		<para>
   			Now we need to change the <literal>.../server/default/deploy/mysql-ds.xml</literal> file to look like include the following datasource definition:
  -
  -![CDATA[
  +			<programlisting>
  +<![CDATA[
   <datasources>
     <local-tx-datasource>
       <jndi-name>DefaultDS</jndi-name>
  @@ -360,8 +361,8 @@
   		</metadata>
     </local-tx-datasource>
   </datasources>
  -]]
  -
  +]]>
  +			</programlisting>
   		</para>
   		<para>
   			Now we need to go change the <literal>.../server/default/conf/standardjaws.xml</literal> file so that the following elements have the correct values.
  @@ -400,7 +401,7 @@
   		</para>
   -->
   		<para>
  -			Now we change and replace two files in <literal>.../server/default/deploy/jms</literal>. The first file we need to replace the file <literal>hsqldb-jdbc2-service.xml</literal> with <literal>.../docs/examples/jms/mysql-jdbc2-service.xml</literal>. In the mysql-jdbc2-service.xml file change the <literal>MySqlDS</literal> to <literal>DefaultDS</literal>. It's in the <literal>depends</literal> tag for the PersistenceManagers MBean. 
  +			Now we change and replace two files in <literal>.../server/default/deploy/jms</literal>. First we need to replace the file <literal>hsqldb-jdbc2-service.xml</literal> with <literal>.../docs/examples/jms/mysql-jdbc2-service.xml</literal>. In the hsql-jdbc2-service.xml file change the <literal>MySqlDS</literal> to <literal>DefaultDS</literal>. Next rename <literal>hsqldb-jdbc-state-service.xml</literal>  to <literal>mysql-jdbc-state-service.xml</literal> . It's in the <literal>depends</literal> tag for the PersistenceManagers MBean.
   		</para>
   
   		<para>
  @@ -527,7 +528,7 @@
   				</programlisting>
   			</para>
   			<para>
  -				Now we'll add our jboss user as well.
  +				Now we'll add our jboss user as well and set his password to <literal>password</literal>.
   				<programlisting>
   jboss=# create user jboss encrypted password 'password' createrole createdb;
   CREATE ROLE
  @@ -556,7 +557,112 @@
   				</programlisting>
   				While we haven't used the instance yet which would have caused the class to be loaded into the repository cache, we do have an instance, so JBoss knows about the driver and can see it. If we had used the class already we'd get much more information and it would look like this:
   				<programlisting>
  -???? Show sample program running output ????
  +org.postgresql.Driver Information
  +Repository cache version:
  +org.postgresql.Driver(f688e8).ClassLoader=org.jboss.mx.loading.UnifiedClassLoader3 at da817b{ url=null ,addedOrder=2}
  +..org.jboss.mx.loading.UnifiedClassLoader3 at da817b{ url=null ,addedOrder=2}
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/activation.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/antlr.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/autonumber-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/bcel.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/bindingservice-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/bsf.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/bsh-deployer.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/bsh.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/cglib.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/commons-codec.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/commons-collections.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/commons-httpclient.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/commons-logging.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/dom4j.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/ejb3-persistence.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/el-api.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/hibernate-annotations.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/hibernate-entitymanager.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/hibernate3.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/hsqldb-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/hsqldb.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/javassist.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jaxen.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-cache-jdk50.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-common-jdbc-wrapper.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-ejb3x.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-hibernate.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-j2ee.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-jaxrpc.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-jca.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-jsr77.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-jsr88.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-management.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-monitoring.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-remoting-int.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-remoting.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-saaj.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-serialization.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-srp.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-transaction.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss-vfs.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jboss.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbossjta-integration.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbossjta.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbossmq.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbosssx.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbossts-common.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jbossws-integration.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jmx-adaptor-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jnpserver.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/joesnmp.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jpl-pattern.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jpl-util.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/jsp-api.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/log4j-snmp-appender.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/log4j.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/mail-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/mail.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/postgresql-8.2-504.jdbc3.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/properties-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/quartz.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/scheduler-plugin-example.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/scheduler-plugin.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/servlet-api.jar
  +....file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/xmlentitymgr.jar
  +..org.jboss.system.server.NoAnnotationURLClassLoader at 7471e0
  +..sun.misc.Launcher$AppClassLoader at e39a3e
  +....file:/Users/sgriffith/jboss-4.2.0.GA/bin/run.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/.compatibility/14compatibility.jar
  +..sun.misc.Launcher$ExtClassLoader at 92e78c
  +....file:/Library/Java/Extensions/.DS_Store
  +....file:/Library/Java/Extensions/junit-4.1.jar
  +....file:/usr/local/lib/libsvnjavahl-1.0.0.0.dylib
  +....file:/Library/Java/Extensions/OpenBaseJDBC.jar
  +....file:/System/Library/Java/Extensions/CoreAudio.jar
  +....file:/System/Library/Java/Extensions/dns_sd.jar
  +....file:/System/Library/Java/Extensions/j3daudio.jar
  +....file:/System/Library/Java/Extensions/j3dcore.jar
  +....file:/System/Library/Java/Extensions/j3dutils.jar
  +....file:/System/Library/Java/Extensions/jai_codec.jar
  +....file:/System/Library/Java/Extensions/jai_core.jar
  +....file:/System/Library/Java/Extensions/libJ3D.jnilib
  +....file:/System/Library/Java/Extensions/libJ3DAudio.jnilib
  +....file:/System/Library/Java/Extensions/libJ3DUtils.jnilib
  +....file:/System/Library/Java/Extensions/libmlib_jai.jnilib
  +....file:/System/Library/Java/Extensions/mlibwrapper_jai.jar
  +....file:/System/Library/Java/Extensions/MRJToolkit.jar
  +....file:/System/Library/Java/Extensions/QTJava.zip
  +....file:/System/Library/Java/Extensions/QTJSupport.jar
  +....file:/System/Library/Java/Extensions/vecmath.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/apple_provider.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/dnsns.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/localedata.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunjce_provider.jar
  +....file:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/sunpkcs11.jar
  +++++CodeSource: (file:/Users/sgriffith/jboss-4.2.0.GA/server/default/lib/postgresql-8.2-504.jdbc3.jar )
  +Implemented Interfaces:
  +++interface java.sql.Driver(30c6cd)
  +++++ClassLoader: null
  +++++Null CodeSource
  +
  +### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3 at da817b{ url=null ,addedOrder=2}
   				</programlisting>
   			</para>
   		</section>
  @@ -569,7 +675,7 @@
   						</para>
   						<para>
   							A PostgreSQL datasource definition can be found in <literal>jboss-4.2.0.CR1/docs/examples/jca</literal>.  If you look in there you'll find a file called <literal>postgres-ds.xml</literal>. It looks like this:
  -
  +							<programlisting>
   				![CDATA[
   <datasources>
     <local-tx-datasource>
  @@ -594,16 +700,16 @@
   
   </datasources>
   				]]
  -
  +							</programlisting>
   						</para>
   						<para>
  -							We need to copy that file to the <literal>deploy</literal> directory for our server. (In our case "default"). Once we do that we need to change the <literal>connection-url</literal> to <literal>jdbc:postgresql://localhost:3306/jboss</literal>. For the username put <literal>sam</literal> and for the password put <literal>password</literal>.
  -
  +							We need to copy that file to the <literal>deploy</literal> directory for our server. (In our case "default"). Once we do that we need to change the <literal>connection-url</literal> to <literal>jdbc:postgresql://localhost:5432/jboss</literal>. For the username put <literal>jboss</literal> and for the password put <literal>password</literal>.
  +							<programlisting>
   				![CDATA[
   <datasources>
     <local-tx-datasource>
       <jndi-name>PostgresDS</jndi-name>
  -    <connection-url>jdbc:postgresql://[servername]:[port]/[database name]</connection-url>
  +    <connection-url>jdbc:postgresql://localhost:5432/jboss</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>jboss</user-name>
       <password>password</password>
  @@ -623,15 +729,15 @@
   
   </datasources>
   				]]
  -
  +							</programlisting>
   						</para>
   							<para>When you save the file you should see the datasource be bound by JBoss in the console output like below. Each time you save the file the datasource will be bound and unbound, so you may see multiple entries like below.
   							<programlisting>
  -18:01:23,304 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PostgresDS' to JNDI name 'java:PostgresDS'
  +05:53:24,421 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PostgresDS' to JNDI name 'java:PostgresDS'
   							</programlisting>
   						</para>
   						<para>
  -							This is how you configure a datasource for use in JBoss application server. Note that we did not take the HyperSonic datasource away as it is used by many JBoss services. If you are going to deploy to production, you will want to configure each service to use a specific datasource. Such as configuring JMS to use MySQL instead of the <literal>defaultDS</literal>. We'll see how to do that in another section.
  +							This is how you configure a datasource for use in JBoss application server. Note that we did not take the HyperSonic datasource away as it is used by many JBoss services. If you are going to deploy to production, you will want to configure each service to use a specific datasource. Such as configuring JMS to use PostgreSQL instead of the <literal>defaultDS</literal>. We'll see how to do that in another section.
   						</para>				
   			</para>
   		</section>
  @@ -639,14 +745,253 @@
   		<section>
   			<title>Linking the Datasource to your application</title>
   			<para>
  +						For individual applications JBoss looks for a <literal>jbosscmp-jdbc.xml</literal> file in your applications deployment. To configure your application to use PostgreSQL, look for a jbosscmp-jdbc.xml deployment descriptor in your applications jars files and then make sure the jbosscmp-jdbc settings are like so:
  +						<programlisting>
  +			![CDATA[
  +			<jbosscmp-jdbc>
  +			   <defaults>
  +			      <datasource>java:/MyPostgreSQL</datasource>
  +			      <!-- optional since 4.0 <datasource-mapping>Hypersonic SQL</datasource-mapping> -->
  +						<datasource-mapping>PostgreSQL</datasource-mapping>
  +			   </defaults>
  +			</jbosscmp-jdbc>
  +			]]
  +						</programlisting>
   				
  +						Although the <literal>datasource-mapping</literal> is optional, it is nice to know the type of the datasource, as this ties directly back to the type-mapping of the data-source.
  +					</para>
  +					<para>For a full set of default datasource mappings look in <literal>jboss-4.2.0.CR1/server/default/conf/standardjbosscmp-jdbc.xml</literal>. In that file you can look for the <literal>PostgreSQL</literal> type mapping.
  +					</para>
  +					<para>
  +						If you need to change any of the type mappings for mySQL you can put your own custom <literal>jbosscmp-jdbc.xml</literal> file right in your META-INF directory of your EJB JAR with the <literal>ejb-jar.xml</literal> and <literal>jboss.xml</literal> deployment descriptor files. Then you need to add a <literal>-Doptonal.dd=PostgreSQL</literal> to your <literal>ant</literal> build commands. When you've done that, your application will now be talking to MySQL. Now when you look at the tables for your MySQL database, you should see some tables that your application deployment created. You can see the tables in a MySQL database by typing <literal>show tables;</literal>.
   			</para>
   		</section>
   		
   		<section>
   			<title>Changing the DefaultDS for all of JBoss</title>
   			<para>
  +				Our jboss user that we created before has the appropriate permissions to create databases, etc. so here if you want a different username to be used for running all work as the DefaultDS, then create that user name and password like we did before. For this example we are just going to use our jboss user.
  +			</para>
  +			<para>
  +				Now we need to change the <literal>.../server/default/deploy/postgres-ds.xml</literal> file to look like include the following datasource definition:
  +				<programlisting>
  +	![CDATA[
  +<datasources>
  +  <local-tx-datasource>
  +    <jndi-name>PostgresDS</jndi-name>
  +    <connection-url>jdbc:postgresql://localhost:5432/jboss</connection-url>
  +    <driver-class>org.postgresql.Driver</driver-class>
  +    <user-name>jboss</user-name>
  +    <password>password</password>
  +        <!-- sql to call when connection is created.  Can be anything, select 1 is valid for PostgreSQL
  +        <new-connection-sql>select 1</new-connection-sql>
  +        -->
  +
  +        <!-- sql to call on an existing pooled connection when it is obtained from pool.  Can be anything, select 1 is valid for PostgreSQL
  +        <check-valid-connection-sql>select 1</check-valid-connection-sql>
  +        -->
  +
  +      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
  +      <metadata>
  +         <type-mapping>PostgreSQL 7.2</type-mapping>
  +      </metadata>
  +  </local-tx-datasource>
  +
  +</datasources>
  +	]]
  +				</programlisting>
  +			</para>
  +			<para>
  +				Now we need to go change the <literal>.../server/default/conf/standardjaws.xml</literal> file so that the following elements have the correct values.
  +				<programlisting>
  +	<datasource>java:/DefaultDB</datasource>
  +	<type-mapping>PostgreSQL</type-mapping>
  +				</programlisting>
  +			</para>
  +			<para>
  +				Now we need to go change the <literal>.../server/default/conf/standardjbosscmp-jdbc.xml file so that the following elements have the correct values.</literal>
  +
  +				<programlisting>
  +<datasource>java:/DefaultDS</datasource>
  +<datasource-mapping>PostgreSQL</datasource-mapping>
  +<fk-constraint>true</fk-constraint>
  +				</programlisting>
  +
  +			</para>
  +
  +			<para>
  +				Now we change and replace two files in <literal>.../server/default/deploy/jms</literal>. First we need to replace the file <literal>hsqldb-jdbc2-service.xml</literal> with <literal>.../docs/examples/jms/postgres-jdbc2-service.xml</literal>. In the hsql-jdbc2-service.xml file change the <literal>MySqlDS</literal> to <literal>DefaultDS</literal>. Next rename <literal>hsqldb-jdbc-state-service.xml</literal>  to <literal>postgres-jdbc-state-service.xml</literal> . It's in the <literal>depends</literal> tag for the PersistenceManagers MBean.
  +			</para>
   				
  +			<para>
  +			Now you've setup all you need to get the server to startup and use mySQL as the default data source.  Here is an example of the output you should see when you run the server with the settings above.
  +			
  +			
  +		  ERROR: ERROR: Not in the current 4.2.0.GA there is a tmp zip file that won't open. Retest this with an updated copy of the 4.2.0.GA.
  +			
  +			
  +			<programlisting>
  +				![CDATA[
  +sgriffith$ run.sh
  +=========================================================================
  +
  + JBoss Bootstrap Environment
  +
  + JBOSS_HOME: /Users/sgriffith/jboss-4.2.0.GA
  +
  + JAVA: java
  +
  + JAVA_OPTS: -Dprogram.name=run.sh -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
  +
  + CLASSPATH: /Users/sgriffith/jboss-4.2.0.GA/bin/run.jar
  +
  +=========================================================================
  +
  +08:08:39,651 INFO  [Server] Starting JBoss (MX MicroKernel)...
  +08:08:39,682 INFO  [Server] Release ID: JBoss [Trinity] 4.2.0.CR1 (build: SVNTag=JBoss_4_2_0_CR1 date=200701180935)
  +08:08:39,718 INFO  [Server] Home Dir: /Users/sgriffith/jboss-4.2.0.GA
  +08:08:39,719 INFO  [Server] Home URL: file:/Users/sgriffith/jboss-4.2.0.GA/
  +08:08:39,721 INFO  [Server] Patch URL: null
  +08:08:39,722 INFO  [Server] Server Name: default
  +08:08:39,723 INFO  [Server] Server Home Dir: /Users/sgriffith/jboss-4.2.0.GA/server/default
  +08:08:39,724 INFO  [Server] Server Home URL: file:/Users/sgriffith/jboss-4.2.0.GA/server/default/
  +08:08:39,725 INFO  [Server] Server Log Dir: /Users/sgriffith/jboss-4.2.0.GA/server/default/log
  +08:08:39,725 INFO  [Server] Server Temp Dir: /Users/sgriffith/jboss-4.2.0.GA/server/default/tmp
  +08:08:39,726 INFO  [Server] Root Deployment Filename: jboss-service.xml
  +08:08:40,802 INFO  [ServerInfo] Java version: 1.5.0_06,Apple Computer, Inc.
  +08:08:40,803 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_06-64,"Apple Computer, Inc."
  +08:08:40,803 INFO  [ServerInfo] OS-System: Mac OS X 10.4.7,ppc
  +08:08:41,952 INFO  [Server] Core system initialized
  +08:08:47,294 INFO  [WebService] Using RMI server codebase: http://localhost:8083/
  +08:08:47,381 INFO  [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
  +08:08:49,213 INFO  [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
  +08:08:49,214 INFO  [TransactionManagerService] Setting up property manager MBean and JMX layer
  +08:08:50,007 INFO  [TransactionManagerService] Starting recovery manager
  +08:08:50,424 INFO  [TransactionManagerService] Recovery manager started
  +08:08:50,425 INFO  [TransactionManagerService] Binding TransactionManager JNDI Reference
  +08:08:59,011 INFO  [EJB3Deployer] Starting java:comp multiplexer
  +08:09:04,147 INFO  [ServiceEndpointManager] jbossws-1.2.0.SP1 (build=200703111125)
  +08:09:08,909 INFO  [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
  +08:09:09,293 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
  +08:09:09,301 INFO  [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
  +08:09:09,301 INFO  [Catalina] Initialization processed in 1692 ms
  +08:09:09,302 INFO  [StandardService] Starting service jboss.web
  +08:09:09,308 INFO  [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.0.CR1
  +08:09:09,561 INFO  [Catalina] Server startup in 259 ms
  +08:09:10,022 INFO  [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
  +08:09:12,530 INFO  [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/08:09:13,332 INFO  [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp64413jbossws-context-exp.war/
  +08:09:13,947 INFO  [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
  +08:09:17,258 INFO  [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
  +08:09:19,185 INFO  [MailService] Mail Service bound to java:/Mail
  +08:09:19,972 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
  +08:09:20,207 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
  +08:09:20,427 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
  +08:09:20,760 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
  +08:09:21,049 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
  +08:09:21,292 INFO  [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
  +08:09:21,426 INFO  [QuartzResourceAdapter] start quartz!!!
  +08:09:21,758 INFO  [SimpleThreadPool] Job execution threads will use class loader of thread: main
  +08:09:23,286 INFO  [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
  +08:09:23,293 INFO  [RAMJobStore] RAMJobStore initialized.
  +08:09:23,294 INFO  [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
  +08:09:23,299 INFO  [StdSchedulerFactory] Quartz scheduler version: 1.5.2
  +08:09:23,300 INFO  [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
  +08:09:25,492 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
  +08:09:27,139 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
  +08:09:27,564 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=PostgresDS' to JNDI name 'java:PostgresDS'
  +08:09:28,283 INFO  [A] Bound to JNDI name: queue/A
  +08:09:28,291 INFO  [B] Bound to JNDI name: queue/B
  +08:09:28,420 INFO  [C] Bound to JNDI name: queue/C
  +08:09:28,462 INFO  [D] Bound to JNDI name: queue/D
  +08:09:28,471 INFO  [ex] Bound to JNDI name: queue/ex
  +08:09:28,630 INFO  [testTopic] Bound to JNDI name: topic/testTopic
  +08:09:28,634 INFO  [securedTopic] Bound to JNDI name: topic/securedTopic
  +08:09:28,644 INFO  [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
  +08:09:28,659 INFO  [testQueue] Bound to JNDI name: queue/testQueue
  +08:09:28,889 INFO  [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
  +08:09:29,240 INFO  [DLQ] Bound to JNDI name: queue/DLQ
  +08:09:29,472 INFO  [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
  +08:09:30,262 INFO  [TomcatDeployer] deploy, ctxPath=/quote, warUrl=.../tmp/deploy/tmp64443quote-exp.war/
  +08:09:31,086 WARN  [JARDeployer] Failed to add deployable jar: file:/Users/sgriffith/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64444jmsclear
  +java.util.zip.ZipException: error in opening zip file
  +       at java.util.zip.ZipFile.open(Native Method)
  +       at java.util.zip.ZipFile.init(ZipFile.java:203)
  +       at java.util.jar.JarFile.init(JarFile.java:132)
  +       at java.util.jar.JarFile.init(JarFile.java:70)
  +       at org.jboss.deployment.SubDeployerSupport.processNestedDeployments(SubDeployerSupport.java:377)
  +       at org.jboss.deployment.SubDeployerSupport.init(SubDeployerSupport.java:284)
  +       at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
  +       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
  +       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  +       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
  +       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  +       at java.lang.reflect.Method.invoke(Method.java:585)
  +       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  +       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  +       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  +       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  +       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  +       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  +       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  +       at $Proxy9.deploy(Unknown Source)
  +       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  +       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  +       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  +       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  +       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  +       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  +       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  +       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  +       at java.lang.reflect.Method.invoke(Method.java:585)
  +       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  +       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  +       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  +       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  +       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  +       at $Proxy0.start(Unknown Source)
  +       at org.jboss.system.ServiceController.start(ServiceController.java:417)
  +       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
  +       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  +       at java.lang.reflect.Method.invoke(Method.java:585)
  +       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  +       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  +       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  +       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  +       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  +       at $Proxy4.start(Unknown Source)
  +       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
  +       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  +       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  +       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  +       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
  +       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  +       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  +       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  +       at java.lang.reflect.Method.invoke(Method.java:585)
  +       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  +       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  +       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  +       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  +       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  +       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  +       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  +       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  +       at $Proxy5.deploy(Unknown Source)
  +       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  +       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  +       at org.jboss.Main.boot(Main.java:200)
  +       at org.jboss.Main$1.run(Main.java:508)
  +       at java.lang.Thread.run(Thread.java:613)
  +08:09:31,482 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
  +08:09:31,623 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
  +08:09:31,651 INFO  [Server] JBoss (MX MicroKernel) [4.2.0.CR1 (build: SVNTag=JBoss_4_2_0_CR1 date=200701180935)] Started in 51s:920ms
  +			</programlisting>
  +			Now we have JBoss using PostgreSQL as it's default datasource and starting up with no errors.
   			</para>
   		</section>
   		
  
  
  



More information about the jboss-cvs-commits mailing list