From: Suresh A. <su...@ex...> - 2001-03-28 00:37:00
|
-----Original Message----- From: Suresh Avadhanula Sent: Sunday, March 25, 2001 12:08 AM To: 'jbo...@li...' Subject: RE: [JBoss-user] Getting MySQL to work with JBoss Ok I was able to solve the problem. There are some things I would like to make clear. I removed the MLET entry from JBoss.conf <!-- MLET CODE ="org.jboss.jdbc.XADataSourceLoader" ARCHIVE="jboss.jar,mm.mysql-2.0.4-bin.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"> /MLET> --> and the JBoss server started OK. Should we have this entry in JBoss.conf file. I have the entry for MySQL in JBoss.jcml. JBoss documentation says that we need to creat the connection pool by specifying it in JBoss.conf and give the necessary parameters in JBoss.jcml. Does this still hold good. Any help is appreciated. Thanks. Suresh -----Original Message----- From: Suresh Avadhanula [mailto:su...@ex...] Sent: Saturday, March 24, 2001 4:59 PM To: 'jbo...@li...' Subject: [JBoss-user] Getting MySQL to work with JBoss Hi, I know most of you must have got it working. For some reason I am having trouble having MySQL as one of the datasource. I have updated to Jboss.jcml to have the following <mbean code="org.jboss.jdbc.XADataSourceLoader" name="DefaultDomain:service=XADataSource,name=mySQL"> <attribute name="PoolName">mySQL</attribute> <attribute name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l</attribute> <attribute name="Properties"></attribute> <attribute name="URL">jdbc:mysql://localhost/gandeev</attribute> <attribute name="GCMinIdleTime">1200000</attribute> <attribute name="JDBCUser">suresh</attribute> <attribute name="MaxSize">10</attribute> <attribute name="Password">suresh</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> I see the following error.. [mySQL] Starting [mySQL] Stopped [mySQL] java.lang.IllegalStateException: Cannot start XA Connection Pool; there is no TransactionManager in JNDI! [mySQL] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo ader.java:320) [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.IllegalStateException: Cannot start XA Connection Po ol; there is no TransactionManager in JNDI! [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XAData SourceLoader.java:320) [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 Now I see that Transaction manager was not started before MySQL Connection pool is being created. I set the dependency in jboss.dependencies <service name="DataSource"> <dependency service="Naming" required="true"/> <dependency service="TransactionManager" required="true"/> <dependency service="Logging" required="true"/> <dependency service="JdbcProvider" required="true"/> <dependency service="ClassPathExtension" required="true"/> <dependency service="Configuration" required="true"/> <dependency service="Hypersonic" required="false"/> </service> How can I configure JBoss's JMX so that Transaction managers start first before MySQL connection pool? Thanks -Suresh |