-
1. Re: XA or not XA data source
davidjencks Jul 24, 2002 9:29 AM (in response to claude)Use the XADataSourceLoader and set blocking=true. I recommend a blocking timeout also. The JDBC.... leaves its connections with autocommit on, which means you have no tx control and statements that don't make sense by themselves (like select ... for update) won't work.
-
2. Re: XA or not XA data source
bbbear Jul 24, 2002 11:46 PM (in response to claude)Hi David,
I have the same problem with configuring datasource with JBoss 2.4.4_Tomcat4.0.1. I tried to do what you've suggested, set blocking=true. However, JBoss server hangs at here:
[INFO,MSSQLPool] Starting
[INFO,MSSQLPool] XA Connection pool MSSQLPool bound to java:/MSSQLPool
I wonder what has gone wrong. Previously, when I have not set blocking=true, it throws me a NullPointerException and I've tried to search through the forum, have yet find any solutions. Basically I'm trying to configure MS SQL 7 datasource, which resides on another machine (Windows platform), with JBoss2.4.4_Tomcat4.0.1 under Linux platform (RedHat 7.2). I changed all the things that I've found from the forum but it still throws NullPointerException and until now it hangs there. Therefore, I'm hoping someone where I can consult with to have a look at my jboss.jcml's JDBC config portion. Please tell me where have I missed. Would really appreciate if there's anyone who can help, thank you!
p/s: Below is previous's testing result when I have not set blocking=true
Regards,
Karen
###### JBoss output ########
...
[INFO,JdbcProvider] Initializing
[INFO,JdbcProvider] Loaded JDBC-driver:com.microsoft.jdbc.sqlserver.SQLServerDriver
[INFO,JdbcProvider] Loaded JDBC-driver:org.postgresql.Driver
[INFO,JdbcProvider] Initialized
[INFO,MSSQLPool] Initializing
[INFO,MSSQLPool] Initialized
[INFO,PostgreSQLPool] Initializing
[INFO,PostgreSQLPool] Initialized
...
...
...
[INFO,JdbcProvider] Starting
[INFO,JdbcProvider] Started
[INFO,MSSQLPool] Starting
[INFO,MSSQLPool] XA Connection pool MSSQLPool bound to java:/MSSQLPool
[ERROR,MSSQLPool] Stopped
java.lang.NullPointerException
at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(Unknown Source)
at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:412)
at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
at $Proxy0.start(Unknown Source)
at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.Main.(Main.java:208)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)
[ERROR,ConfigurationService] Unexpected error
java.lang.NullPointerException
at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(Unknown Source)
at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:412)
at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:103)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:967)
at $Proxy0.start(Unknown Source)
at org.jboss.util.ServiceControl.start(ServiceControl.java:79)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at org.jboss.Main.(Main.java:208)
at org.jboss.Main$1.run(Main.java:110)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:106)
[INFO,PostgreSQLPool] Starting
[INFO,PostgreSQLPool] XA Connection pool PostgreSQLPool bound to java:/PostgreSQLPool
[INFO,PostgreSQLPool] Started
####### jboss.jcml #######
com.microsoft.jdbc.sqlserver.SQLServerDriver,
org.postgresql.Driver
MSSQLPool
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
jdbc:microsoft:sqlserver://PA2300:1433;DatabaseName=MASTERDB;SelectMethod=cursor
1200000
sa
100
sa
false
false
true
false
120000
1800000
true
false
1.0
0 -
3. Re: XA or not XA data source
tkimu Aug 2, 2002 8:57 PM (in response to claude)Hi Karen
Even I have the same problem, did u figureout the problem, If u resolved this, can I know the satus
Thanks
Krishna -
4. Re: XA or not XA data source
davidjencks Aug 2, 2002 9:03 PM (in response to claude)In 2.4, hanging with blocking == true or returning null with blocking == false means your datasource configuration is wrong and the driver can't get a connection to the datasource.
-
5. Re: XA or not XA data source
bbbear Aug 8, 2002 12:59 AM (in response to claude)Hi Krishna,
I've finally got it through by replacing the domain name of the URL to IP address. If you've noticed my configuration of the datasource, I put PA2300 at the URL, which won't work in my case but to replace it with IP address, it now works.
HTH
p/s: Thanks David for pointing where should I look into. It's indeed the datasource configuration's problem.
Regards,
Karen