How to Using SimonXADatasource in jboss as 7

61 views
Skip to first unread message

chaojun zhang

unread,
Oct 30, 2013, 11:28:44 AM10/30/13
to java...@googlegroups.com
Hi All,
  Is there a way to using monitor XaDataSource in jboss as 7 ?I want to the whole application both the datasource and XaDatasource implementions can be monitor? 
  
  I already review class SimonXADatasource ,it seems can be used to wrap the real xadatasource ,So I  configure "url" and "realDatasourceClassName"  in our configuration file according the properties defined in this class.

  I have datasource:
1)xa datasource configuration in datasource subsystem
     <datasources>
<xa-datasource jndi-name="java:/MyDS" pool-name="MyDS"
                  enabled="true" jta="true" use-java-context="true" use-ccm="true">
                  <xa-datasource-property name="url">jdbc:simon:oracle:thin:@127.0.0.1:1521:test</xa-datasource-property>
                     <xa-datasource-property name="realDataSourceClassName">oracle.jdbc.xa.OracleXADataSource</xa-datasource-property>
                  <xa-datasource-property name="user">admin</xa-datasource-property>
                  <xa-datasource-property name="password">password</xa-datasource-property>
                  <driver>simon</driver> 
               </xa-datasource>
                <drivers>
                    <driver name=" simon " module="org.javasimon.driver">
                        <xa-datasource-class>org.javasimon.jdbcx4.SimonXADatasource</xa-datasource-class>
                    </driver>
      
                </drivers>
            </datasources>

2)I also create another jboss module name “org.javasimon.driver” which used above .

   module.xml
  <?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.javasimon.driver">
    <resources>
        <resource-root path="javasimon-core-3.4.0.jar"/>
         <resource-root path="javasimon-jdbcx4-3.4.0.jar"/>
         <resource-root path="ojdbc-11.2.0.1.0.jar"/> 
    </resources>
<dependencies>
           <module name="javax.api"/>
           <module name="javax.transaction.api"/>        
       </dependencies>
</module>

When I restart jboss ,jboss always said a new/missing depenency.
Anyone who can tell me the correct  configure would be great ,  many thanks. 

 

Gérald Quintana

unread,
Oct 30, 2013, 12:02:11 PM10/30/13
to java...@googlegroups.com
Hi,
"jboss always said a new/missing depenency." Which ones?
JavaSimon only depends on SLF4J

Gérald


2013/10/30 chaojun zhang <zcj2...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "javasimon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javasimon+...@googlegroups.com.
To post to this group, send email to java...@googlegroups.com.
Visit this group at http://groups.google.com/group/javasimon.
For more options, visit https://groups.google.com/groups/opt_out.

Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

mk_zhang

unread,
Oct 31, 2013, 2:25:39 AM10/31/13
to java...@googlegroups.com
Thanks, I added the slf4j dependency in my module and it worked well.

Another question is do i need to override AbstractSimonDataSource to support jtds driver ? seems currently only support following driver :
1)oracle driver
2)h2 driver
3)mssql driver

But I can't found any jtds driver in drivers.properties?

Gérald Quintana

unread,
Oct 31, 2013, 2:43:36 AM10/31/13
to java...@googlegroups.com

I'm sorry but I can't help you with JBoss. Did you try the original Microsoft JDBC driver? Did you try another database? Does it work without Simon, and in this case what's the config?

Gérald

Le 31 oct. 2013 06:25, "mk_zhang" <zcj2...@gmail.com> a écrit :
Ok .I added the slf4j dependency and it worked well. Thanks.

But when I try to testing to integrate jtds driver ,seems still have some dependency missing?
I can't told you which one is missing ,because jboss don't log any more information .

I have 
1)xa datasource configuration in datasource subsystem
     <datasources>
<xa-datasource jndi-name="java:/MyDS" pool-name="MyDS"
                  enabled="true" jta="true" use-java-context="true" use-ccm="true">
                  <xa-datasource-property name="url">jdbc:simon:jtds:sqlserver://127.0.0.1:1433/test;instance=sqlexpress2010</xa-datasource-property>
 
                  <xa-datasource-property name="user">admin</xa-datasource-property>
                  <xa-datasource-property name="password">password</xa-datasource-property>
                  <driver>simon</driver> 
               </xa-datasource>
                <drivers>
                    <driver name=" simon " module="org.javasimon.driver">
                        <xa-datasource-class>org.javasimon.jdbcx4.SimonXADatasource</xa-datasource-class>
                    </driver>
      
                </drivers>
            </datasources>

module.xml

<module xmlns="urn:jboss:module:1.1" name="org.javasimon.driver">
    <resources>
        <resource-root path="javasimon-core-3.4.0.jar"/>
         <resource-root path="javasimon-jdbcx4-3.4.0.jar"/>
         <resource-root path="jtds-1.2.4.jar"/> 
    </resources>
<dependencies>
           <module name="javax.api"/>
           <module name="javax.transaction.api"/>    
          <module name="org.slf4j"    />
       </dependencies>
</module>

On Thursday, October 31, 2013 12:02:11 AM UTC+8, Gérald wrote:

mk_zhang

unread,
Oct 31, 2013, 9:10:19 AM10/31/13
to java...@googlegroups.com
I already solve this problem by override AbstractSimonDataSource .Anyway thanks your help
Reply all
Reply to author
Forward
0 new messages