Hi,
   I am quite new to jboss datasource configuration and I am struck up with configuring my application to support multiple databases. I need to support 2 databases. I am using jboss 3.0.x. The ms-sqlservice.xml file looks like this...

?xml version="1.0" encoding="UTF-8"?>

<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->

<server>

  <!-- ======================================================================-->
  <!-- New ConnectionManager setup for Microsoft SQL Server 2000 driver -->
  <!-- You may download the latest Microsoft JDBC driver from *Microsoft* -->
  <!-- http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml&frame=true -->
  <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
  <!-- ===================================================================== -->

  <mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=SQLServerPool">

    <!-- Include a login module configuration named MSSQLDbRealm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:

    <application-policy name = "MSSQLDbRealm">
       <authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">yourprincipal</module-option>
<module-option name = "userName">yourusername</module-option>
<module-option name = "password">yourpassword</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=SQLServerPool</module-option>
</login-module>
       </authentication>
    </application-policy>

    NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
    must match the object name of the ConnectionManager you are configuring here.
    -->
    <!--uncomment out this line if you are using the MSSQLDbRealm above
    <attribute name="SecurityDomainJndiName">MSSQLDbRealm</attribute>
    -->

    <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=SQLServerPool">
<attribute name="JndiName">SQLServerPool</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<!--Below here are Database Driver settings.If in case Sprinta2000 is needed the following two lines needs to uncommented and the corresponding two lines for SQLServerDriver have to be commentted-->
<config-property name="ConnectionURL" type="java.lang.String">jdbc:inetdae7://localhost:1433?database=Release1.4</config-property>
<config-property name="DriverClass" type="java.lang.String">com.inet.tds.TdsDriver</config-property>
<!--set these only if you want only default logins, not through JAAS-->
<config-property name="UserName" type="java.lang.String">test</config-property>
<config-property name="Password" type="java.lang.String">test</config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
       </mbean>

       <!-- Connection to another database called TCEnterprise -->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=TCE">
<attribute name="JndiName">TCE</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<!--Below here are Database Driver settings.If in case Sprinta2000 is needed the following two lines needs to uncommented and the corresponding two lines for SQLServerDriver have to be commentted-->
<config-property name="ConnectionURL" type="java.lang.String">jdbc:inetdae7://localhost:1433?database=TCEnterprise</config-property>
<config-property name="DriverClass" type="java.lang.String">com.inet.tds.TdsDriver</config-property>
<!--set these only if you want only default logins, not through JAAS-->
<config-property name="UserName" type="java.lang.String">test</config-property>
<config-property name="Password" type="java.lang.String">test</config-property>
</properties>
</attribute>
<!--Below here are advanced properties -->
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
    </depends>
    <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->
       <mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=SQLServerPool">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
       </mbean>
    </depends>
    <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
    <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
    <attribute name="TransactionManager">java:/TransactionManager</attribute>
    <!--make the rar deploy! hack till better deployment-->
    <depends>jboss.jca:service=RARDeployer</depends>
  </mbean>
</server>


is the above configuration correct or have i missed anything here or misplaced any code in the above file... My problem here is that I am not able to access the table MsgOut in the database TCE... it throws an exception as below...


java.sql.SQLException: [PEGASUS]Invalid object name 'MsgOut'.
        at com.inet.tds.e.a(Unknown Source)
        at com.inet.tds.b.do(Unknown Source)
        at com.inet.tds.b.executeQuery(Unknown Source)
        at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:289)
        at org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand.executeStatementAndHandleResult(JDBCQueryCommand.java:62)
        at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:176)
        at org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.execute(JDBCBeanExistsCommand.java:58)
        at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:134)
        at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:255)
        at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
        at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:731)
        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:324)
        at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1119)
        at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:206)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
        at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
        at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
        at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
        at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
        at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
        at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
        at org.jboss.ejb.Container.invoke(Container.java:730)
        at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
        at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
        at $Proxy439.create(Unknown Source)
        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:324)



Please let me know where am i wrong or am i completely wrong in the process.. please guide me through...

thanx in advance...
balu.