From: Peter C. <pet...@ho...> - 2001-03-17 06:44:27
|
With some useful instructions, I was able to get it to work. 1. Modify <mbean code="org.jboss.jdbc.JdbcProvider" name="DefaultDomain:service=JdbcProvider"> to <attribute name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,org. gjt.mm.mysql.Driver</attribute> 2. Added <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySqlDS"> <attribute name="PoolName">MySqlDS</attribute> <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l</attribute> <attribute name="Properties"></attribute> <attribute name="URL">jdbc:mysql://localhost/test:3306</attribute> <attribute name="GCMinIdleTime">1200000</attribute> <attribute name="JDBCUser">user</attribute> <attribute name="MaxSize">10</attribute> <attribute name="Password">password</attribute> <attribute name="GCEnabled">false</attribute> <attribute name="InvalidateOnError">false</attribute> <attribute name="TimestampUsed">false</attribute> <attribute name="Blocking">true</attribute> <attribute name="GCInterval">120000</attribute> <attribute name="IdleTimeout">1800000</attribute> <attribute name="IdleTimeoutEnabled">false</attribute> <attribute name="LoggingEnabled">false</attribute> <attribute name="MaxIdleTimeoutPercent">1.0</attribute> <attribute name="MinSize">0</attribute> </mbean> among the existing datasource definitions. -----Original Message----- From: jbo...@li... [mailto:jbo...@li...]On Behalf Of Tim Yates Sent: March 16, 2001 6:01 AM To: JBoss-User Subject: Re: [jBoss-User] Problem Setting Up DB Connection Pool I think the dB connection config has changed in 2.1 nothing goes in jboss.conf anymore, the jdbc setup and the datasource setup goes in jboss.jcml have a look in jboss-auto.jcml for a default db setup Hope this helps you, Good luck, Tim. ----- Original Message ----- From: Peter Cheung <pet...@ho...> To: <jbo...@li...> Sent: Friday, March 16, 2001 5:18 AM Subject: [jBoss-User] Problem Setting Up DB Connection Pool > I was following the instructions on > http://www.jboss.org/manual/adv_config.html to set up the database > connection pool for mySQL in jBoss 2.1. I got: > > [Configuration] Could not create MBean > DefaultDomain:service=XADataSource,name=m > ySQL() > [Configuration] java.lang.ClassNotFoundException: > [Configuration] at > javax.management.loading.MLet.findClass(MLet.java:800 > ) > [Configuration] at > java.lang.ClassLoader.loadClass(ClassLoader.java:297) > > [Configuration] at > java.lang.ClassLoader.loadClass(ClassLoader.java:253) > > [Configuration] at > com.sun.management.jmx.MBeanServerImpl.findClass(MBea > nServerImpl.java:2466) > [Configuration] at > com.sun.management.jmx.MBeanServerImpl.createMBean(MB > eanServerImpl.java:499) > [Configuration] at > org.jboss.configuration.ConfigurationService.create(C > onfigurationService.java:339) > [Configuration] at > org.jboss.configuration.ConfigurationService.loadConf > iguration(ConfigurationService.java:270) > [Configuration] at java.lang.reflect.Method.invoke(Native Method) > [Configuration] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1628) > [Configuration] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1523) > [Configuration] at org.jboss.Main.<init>(Main.java:182) > [Configuration] at org.jboss.Main$1.run(Main.java:94) > [Configuration] at > java.security.AccessController.doPrivileged(Native Me > thod) > [Configuration] at org.jboss.Main.main(Main.java:90) > > and > > [mySQL] java.lang.ClassNotFoundException: > org.jboss.minerva.xa.XADataSourceImpl > [mySQL] at javax.management.loading.MLet.findClass(MLet.java:800) > [mySQL] at java.lang.ClassLoader.loadClass(ClassLoader.java:297) > [mySQL] at java.lang.ClassLoader.loadClass(ClassLoader.java:253) > [mySQL] at > java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) > > [mySQL] at java.lang.Class.forName0(Native Method) > [mySQL] at java.lang.Class.forName(Class.java:120) > [mySQL] at > org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo > ader.java:270) > [mySQL] at > org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport. > java:93) > [mySQL] at java.lang.reflect.Method.invoke(Native Method) > [mySQL] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl > .java:1628) > [mySQL] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl > .java:1523) > [mySQL] at > org.jboss.util.ServiceControl.start(ServiceControl.java:97) > [mySQL] at java.lang.reflect.Method.invoke(Native Method) > [mySQL] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl > .java:1628) > [mySQL] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl > .java:1523) > [mySQL] at org.jboss.Main.<init>(Main.java:190) > [mySQL] at org.jboss.Main$1.run(Main.java:94) > [mySQL] at java.security.AccessController.doPrivileged(Native > Method) > [mySQL] at org.jboss.Main.main(Main.java:90) > [Service Control] Could not start > DefaultDomain:service=XADataSource,name=null > [Service Control] java.lang.ClassNotFoundException: > org.jboss.minerva.xa.XADataS > ourceImpl > [Service Control] at > javax.management.loading.MLet.findClass(MLet.java:800 > ) > [Service Control] at > java.lang.ClassLoader.loadClass(ClassLoader.java:297) > > [Service Control] at > java.lang.ClassLoader.loadClass(ClassLoader.java:253) > > [Service Control] at > java.lang.ClassLoader.loadClassInternal(ClassLoader.j > ava:313) > [Service Control] at java.lang.Class.forName0(Native Method) > [Service Control] at java.lang.Class.forName(Class.java:120) > [Service Control] at > org.jboss.jdbc.XADataSourceLoader.startService(XAData > SourceLoader.java:270) > [Service Control] at > org.jboss.util.ServiceMBeanSupport.start(ServiceMBean > Support.java:93) > [Service Control] at java.lang.reflect.Method.invoke(Native Method) > [Service Control] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1628) > [Service Control] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1523) > [Service Control] at > org.jboss.util.ServiceControl.start(ServiceControl.ja > va:97) > [Service Control] at java.lang.reflect.Method.invoke(Native Method) > [Service Control] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1628) > [Service Control] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe > rverImpl.java:1523) > [Service Control] at org.jboss.Main.<init>(Main.java:190) > [Service Control] at org.jboss.Main$1.run(Main.java:94) > [Service Control] at > java.security.AccessController.doPrivileged(Native Me > thod) > [Service Control] at org.jboss.Main.main(Main.java:90) > > This was what I did. It seemed like the article was out-dated for v2.1. So I > changed the set up a little, such as: > > 1. Added this instead to jboss.conf: > <MLET CODE="org.jboss.jdbc.XADataSourceLoader" > ARCHIVE="jboss.jar,minerva-1_0b3.jar" CODEBASE="../../lib/ext/"> > <ARG TYPE="java.lang.String" VALUE="mySQL"> > <ARG TYPE="java.lang.String" > VALUE="org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl"> > > 2. Added the mySQL driver to jboss.conf > > <mbean code="org.jboss.jdbc.JdbcProvider" > name="DefaultDomain:service=JdbcProvider"> > <attribute > name="Drivers">org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,org. > gjt.mm.mysql.Driver</attribute> > </mbean> > </MLET> > > 3. And follow the instruction of adding this to jboss.jcml: > > <mbean name="DefaultDomain:service=XADataSource,name=mySQL"> > <attribute name="Properties"></attribute> > <attribute name="URL">jdbc:mysql://peter/test</attribute> > <attribute name="GCMinIdleTime">1200000</attribute> > <attribute name="JDBCUser">peter</attribute> > <attribute name="MaxSize">10</attribute> > <attribute name="Password">password</attribute> > <attribute name="GCEnabled">false</attribute> > <attribute name="InvalidateOnError">false</attribute> > <attribute name="TimestampUsed">false</attribute> > <attribute name="Blocking">true</attribute> > <attribute name="GCInterval">120000</attribute> > <attribute name="IdleTimeout">1800000</attribute> > <attribute name="IdleTimeoutEnabled">false</attribute> > <attribute name="LoggingEnabled">false</attribute> > <attribute name="MaxIdleTimeoutPercent">1.0</attribute> > <attribute name="MinSize">0</attribute> > </mbean> > > What did I do wrong ? Please advice. Thx. > > > > -- > -------------------------------------------------------------- > To subscribe: jbo...@li... > To unsubscribe: jbo...@li... -- -------------------------------------------------------------- To subscribe: jbo...@li... To unsubscribe: jbo...@li... |