0 Replies Latest reply on Feb 16, 2011 11:34 AM by Michael Leet

    Bridge errors in JBossAS 5.1.0GA startup using MySQL

    Michael Leet Newbie


        I have been troubleshooting an apparent issue with JBoss AS 5.1.0GA using JBoss Messaging 1.4.3.GA configured to use MySQL for message persistence.  The issue is straightforward; I configure JBoss AS to use MySQL for database persistence switching out the deploy/hsqldb-ds.xml and messaging/hsqldb-persistence-service.xml for mysql-ds.xml and mysql-persistence-service.xml respectively.


      I made the following updates to mysql-ds.xml;




      I made the following updates to mysql-persistence-service.xml;

           <!--<depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends>-->

           <attribute name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</attribute>


      based on recommendations found in the messaging forums. I have attached these files as well as the topic and bridge configuration files I used.


      I deployed mysql-ds.xml to $JBOSS_HOME/server/default/deploy

      I deployed mysql-persistence-service.xml to $JBOSS_HOME/server/default/deploy/messaging

      I deployed test-destinations-service.xml to $JBOSS_HOME/server/default/deploy

      I deployed test-bridge-service.xml to $JBOSS_HOME/server/default/deploy


      All files were created using the templates in $JBOSS_HOME/docs/examples


      The problem, although not ultimately an error, is that JBoss loads the bridge service before loading the messaging service and tries to bridge topics that do not exist yet.  As you can see in the attached log file JBoss starts the bridge service before starting the messaging service.  I have configured exactly the same setup using both the default database, hypersonic, as well as postgresql and JBoss starts the messaging service appropriately, creating the topics, then the connection factories, then the bridging service starts up bridging the now valid topics.


      I am trying to clean up the JBoss Startup and although the bridge service does bridge the topics after the default 30000ms timeout, this behaviour is unwanted.  It must somehow be connected to the mysql-persistence-service.xml file but I have been unable to track down the exact issue.


      I am working in a Windows XP Service Pack 2 environment using Java 1.6.0_17, MySQL 5.5.9, mysql-connector-java-5.1.15-bin.jar (deployed to server/default/lib).  I start JBossAS using run.bat -b


      Thanks and look forward to any responses