[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Configure JBoss to connect to multi database on multi ma

catania do-not-reply at jboss.com
Mon Oct 8 21:49:34 EDT 2007


   I use jboss-4.0.5.GA, EJB 3.0 and WinXP.
   On B and C, I installed MySQL.
   On A, inside \server\default\deploy, I have two file: remote1-ds.xml and remote2-ds.xml.
   remote1-ds.xml:
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDS</jndi-name>
  |     <connection-url>jdbc:mysql://computerB/Bdatabase</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>pc6</user-name>
  |     <password>pc6</password>    
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>20</max-pool-size>    
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>  
  |   </local-tx-datasource>
  | </datasources>

remote2-ds.xml:
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDS</jndi-name>
  |     <connection-url>jdbc:mysql://computerC/Cdatabase</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>pc6</user-name>
  |     <password>pc666</password>    
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>20</max-pool-size>    
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>  
  |   </local-tx-datasource>
  | </datasources>

   When, I install JBoss on A machine, I choosen "Local" on the DataSource Configuration part. When JBoss start, I received some error:
--- Incompletely deployed packages ---
  | org.jboss.deployment.DeploymentInfo at 2af98d73 { url=file:/C:/Program Files/jboss-
  | 4.0.5.GA/server/default/deploy/remote2-ds.xml }
  |   deployer: org.jboss.deployment.XSLSubDeployer at 1d5b883
  |   status: Deployment FAILED reason: Trying to install an already registered mbea
  | n: jboss.jca:service=LocalTxCM,name=MySqlDS
  |   state: FAILED
  |   watch: file:/C:/Program Files/jboss-4.0.5.GA/server/default/deploy/remote2-ds.
  | xml
  |   altDD: null
  |   lastDeployed: 1191892567170
  |   lastModified: 1191892567139
  |   mbeans:

  After, I edited remote2-ds.xml from MySqlDS to MySqlDSTmp:
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDSTmp</jndi-name>
  |     <connection-url>jdbc:mysql://computerC/CDatabase</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>pc6</user-name>
  |     <password>pc666</password>    
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>20</max-pool-size>    
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>  
  |   </local-tx-datasource>
  | </datasources>
  But when JBoss start, I don't received some errors but only BDatabase (MySqlDS) on B machine that JBoss can connect (it have some tables same as: hilosequences, jms_messages, ...). CDatabase on C machine is not. Although, JBoss show some infomations:
08:44:01,255 INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca
  | :service=DataSourceBinding,name=MySqlDSTmp' to JNDI name 'java:MySqlDSTmp'

  Guide to me, thanks.

  catania.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092820#4092820

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092820



More information about the jboss-user mailing list