Re: [JBoss-user] XADataSourceLoader vs. ConnectionFactoryLoader
XADataSourceLoader is "the old way" of getting a JDBC DataSource to get JDBC Connections from for rdbms database access. ConnectionFactoryLoader is "the new way" of getting a JCA ConnectionFactory for a JCA resource adapter connecting to an "arbitrary" resource manager. This can be used with the special case of the resource manager being a rdbms with a jdbc driver by using one of the jca-jdbc wrappers to make the jdbc driver look like a jca resource adapter, so it fits into the jca framework. The jca stuff has been in jboss since I think 2.2, slowly getting more flexible. It is the only option in jboss 3.0 The jca framework has the advantage over plain jdbc in that it clearly specifies how the application server manages connection pooling and transaction management while providing connection "handles" to client programs (such as JAWS or a BMP entity bean). This management framework, while needed for the common jdbc case, works exactly the same way for other kinds of transactional resources: various companies are coming up with resource adapters for SAP, CICS, etc etc. It is also possible to write a rdbms driver based on jca while exposing jdbc connections: IMHO, after having done this, this results in a very clear allocation of responsibility for the functions and classes of the driver. So: for 2.4 it may be more convenient to use the XADataSourceLoader, however for 3.0 you will be using ConnectionFactoryLoaders. I changed the names of the configuration elements for ConnectionFactoryLoader a bit to try to clarify them for 3.0. There were a couple of weeks in which the cvs head (post 2.4) XADataSourceLoader actually set up a ConnectionFactoryLoader as a migration aid, and the manual reflected this. This was too much of a nuisance to maintain and include so now you get to migrate by hand. If you look under the right tag in cvs you may find this XADataSourceLoader version, however it is not part of any release. Other than this the mbeans are not related. david jencks On 2001.10.12 20:22:39 -0400 Lucas McGregor wrote: > I have been pouring over the docs/forums/mail list to try to understand > the > relationship between a XADataSourceLoader and a ConnectionFactoryLoader. > > Are they separate things? > Are they supposed to be linked? > Does the XDDataSourceLoader use the ConnectionFactoryLoader? > > I have both set-up in my jboss.jcml. Both start up. I can acquire a > DataSource that lets me operate on the same database by going though the > XADataSourceLoader via lookup for java:/jdbc_login or through the > ConnectionFactoryLoader via lookup java:/minerva_jdbc_login. > > Are they just different ways to get to the same thing? If so, is one > preferable or different from the other. The documentation doesn't really > show them as linked, and they both have current Jboss2.4 docs. > > any clues would be massively appreciated, > lucas mcgregor > > >name="DefaultDomain:service=XADataSource,name=jdbc_login"> > jdbc_login >name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl ibute> > >name="URL">jdbc:AvenirDriver://xxx.xxx.xxx.xxx:1433/NG_NW > 120 > xxx > 10 > xxx > false > false > false > true > 6[JBoss 2.4] > 12 > 180 > false > true > 1.0 > 5 > > > > > > > name="JCA:service=ConnectionFactoryLoader,name=minerva_jdbc_login"> > minerva_jdbc_login > JCA:service=RARDeployer > > Minerva JDBC LocalTransaction ResourceAdapter > > > ConnectionURL=jdbc:AvenirDriver://xxx.xxx.xxx.xxx:1433/NG_NW > Driver=net.avenir.jdbc2.Driver > Username=xxx > Password=xxx > > > MinervaSharedLocalCMFactory > > > > # Pool type - uncomment to force, otherwise it is the default > #PoolConfiguration=per-factory > > # Connection pooling properties - see > # org.jboss.pool.PoolParameters > MinSize=0 > MaxSize=10 > Blocking=true > GCEnabled=false > IdleTimeoutEnabled=true > InvalidateOnError=false > TrackLastUsed=false > GCIntervalMillis=12 > GCMinIdleMillis=120 > IdleTimeoutMillis=180 > MaxIdleTimeoutPercent=1.0 > > > > org.jboss.resource.security.ManyToOnePrincipalMapping > > > userName=xxx > password=xxx > TransactionIsolation=TRANSACTION_SERIALIZABLE > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] XADataSourceLoader vs. ConnectionFactoryLoader
I have been pouring over the docs/forums/mail list to try to understand the relationship between a XADataSourceLoader and a ConnectionFactoryLoader. Are they separate things? Are they supposed to be linked? Does the XDDataSourceLoader use the ConnectionFactoryLoader? I have both set-up in my jboss.jcml. Both start up. I can acquire a DataSource that lets me operate on the same database by going though the XADataSourceLoader via lookup for java:/jdbc_login or through the ConnectionFactoryLoader via lookup java:/minerva_jdbc_login. Are they just different ways to get to the same thing? If so, is one preferable or different from the other. The documentation doesn't really show them as linked, and they both have current Jboss2.4 docs. any clues would be massively appreciated, lucas mcgregor jdbc_login org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl jdbc:AvenirDriver://xxx.xxx.xxx.xxx:1433/NG_NW 120 xxx 10 xxx false false false true 6[JBoss 2.4] 12 180 false true 1.0 5 minerva_jdbc_login JCA:service=RARDeployer Minerva JDBC LocalTransaction ResourceAdapter ConnectionURL=jdbc:AvenirDriver://xxx.xxx.xxx.xxx:1433/NG_NW Driver=net.avenir.jdbc2.Driver Username=xxx Password=xxx MinervaSharedLocalCMFactory # Pool type - uncomment to force, otherwise it is the default #PoolConfiguration=per-factory # Connection pooling properties - see # org.jboss.pool.PoolParameters MinSize=0 MaxSize=10 Blocking=true GCEnabled=false IdleTimeoutEnabled=true InvalidateOnError=false TrackLastUsed=false GCIntervalMillis=12 GCMinIdleMillis=120 IdleTimeoutMillis=180 MaxIdleTimeoutPercent=1.0 org.jboss.resource.security.ManyToOnePrincipalMapping userName=xxx password=xxx TransactionIsolation=TRANSACTION_SERIALIZABLE ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] XADataSourceLoader MBean Start/Stop
This problem is such a nuisance, isn't it? You could try patch 424399 that I submitted back in may. I couldn't get anyone interested in applying it then and I've been concentrating on the jca stuff since. Using ConnectionFactoryLoaders in rabbithole does not have this problem, but you may want to wait for a version that is changing less rapidly. david jencks On 2001.09.12 23:03:01 -0400 John Landers wrote: > When one stops an XADataSourceLoader MBean > and restarts it or even destroy's it and then inits it > it will not restart. It produces this error below > because the ObjectPool is inited in the constructor > of XAPoolDataSource and set to null on stop ( close). > > Any know any work arounds? > I have a MBean that adds these as sub MBeans > and when I stop it, it stops them. > Maybe these are not designed to stop / start. > > [XADataSourceLoader] Stopped > java.lang.NullPointerException > at > org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource. > java:107) > at > org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.jav > a:341) > at > org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107 > ) > at java.lang.reflect.Method.invoke(Native Method) > at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16 > 28) > at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15 > 23) > at > com.sun.jdmk.comm.HtmlInvokePage.buildPage(HtmlInvokePage.java:240) > at > com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest(HtmlRequestHan > dler.java:325) > at > com.sun.jdmk.comm.HtmlRequestHandler.processRequest(HtmlRequestHandle > r.java:152) > at > com.sun.jdmk.comm.HtmlRequestHandler.doRun(HtmlRequestHandler.java:79 > ) > at com.sun.jdmk.comm.ClientHandler.run(ClientHandler.java:84) > at java.lang.Thread.run(Thread.java:484) > > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] XADataSourceLoader MBean Start/Stop
When one stops an XADataSourceLoader MBean and restarts it or even destroy's it and then inits it it will not restart. It produces this error below because the ObjectPool is inited in the constructor of XAPoolDataSource and set to null on stop ( close). Any know any work arounds? I have a MBean that adds these as sub MBeans and when I stop it, it stops them. Maybe these are not designed to stop / start. [XADataSourceLoader] Stopped java.lang.NullPointerException at org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource. java:107) at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.jav a:341) at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107 ) at java.lang.reflect.Method.invoke(Native Method) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16 28) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15 23) at com.sun.jdmk.comm.HtmlInvokePage.buildPage(HtmlInvokePage.java:240) at com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest(HtmlRequestHan dler.java:325) at com.sun.jdmk.comm.HtmlRequestHandler.processRequest(HtmlRequestHandle r.java:152) at com.sun.jdmk.comm.HtmlRequestHandler.doRun(HtmlRequestHandler.java:79 ) at com.sun.jdmk.comm.ClientHandler.run(ClientHandler.java:84) at java.lang.Thread.run(Thread.java:484) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] XADataSourceLoader
Hi, I found this problem back in early march and submitted a patch by email. Apparently in the move to sourceforge it got lost. I've resubmitted it to the sourceforge patch page. Patch # is 424399. Christian, you might add the bug # to the patch if you submit a bug. This patch is against 2.3 cvs but the same modifications worked with 2.1. My theory is that if you stop a XADatasource, you want a new copy when you restart it. At least the pools don't seem to be amenable to reconfiguration. So my fix frees the old source when the mbean is stopped, and a new one is created when the mbean is restarted. Also, if the connection can't be established when the pool is initialized, it's freed so you can change the configuration and try again without restarting the server. Thanks david jencks On 2001.05.15 15:39:16 -0400 Toby Allsopp wrote: > On Tue, May 15, 2001 at 01:35:22PM +0200, Christian Biasuzzi wrote: > > Hi, > > I'm playing with the latest jboss CVS snapshot > > and I found yesterday that I'm not able to restart a XADataSource > > MBean (the DefaultDS, for example) after having stopped it > > > > here follows my log: > > > > [DefaultDS] java.lang.NullPointerException > > [DefaultDS] at > > org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource.java:96) > > > > [DefaultDS] at > > org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:267) > > > > [DefaultDS] at > > org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:101) > > [DefaultDS] at java.lang.reflect.Method.invoke(Native Method) > > [DefaultDS] at > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) > > > >. > > > > If I put a > > > > source = null; > > > > at the end of stopService() in XADataSourceLoader class > > (actually forcing the creation of a new XADataSource) everything runs > > fine, but I'm not sure this is the > > right thing to do > > Please log this as a bug on SourceForge. I'll have a look at it at some > point > if no one else does. > > Thanks, > > Toby. > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > http://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] XADataSourceLoader
On Tue, May 15, 2001 at 01:35:22PM +0200, Christian Biasuzzi wrote: > Hi, > I'm playing with the latest jboss CVS snapshot > and I found yesterday that I'm not able to restart a XADataSource > MBean (the DefaultDS, for example) after having stopped it > > here follows my log: > > [DefaultDS] java.lang.NullPointerException > [DefaultDS] at > org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource.java:96) > > [DefaultDS] at > org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:267) > > [DefaultDS] at > org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:101) > [DefaultDS] at java.lang.reflect.Method.invoke(Native Method) > [DefaultDS] at > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) > >. > > If I put a > > source = null; > > at the end of stopService() in XADataSourceLoader class > (actually forcing the creation of a new XADataSource) everything runs > fine, but I'm not sure this is the > right thing to do Please log this as a bug on SourceForge. I'll have a look at it at some point if no one else does. Thanks, Toby. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] XADataSourceLoader
Hi, I'm playing with the latest jboss CVS snapshot and I found yesterday that I'm not able to restart a XADataSource MBean (the DefaultDS, for example) after having stopped it here follows my log: [DefaultDS] java.lang.NullPointerException [DefaultDS] at org.jboss.pool.jdbc.xa.XAPoolDataSource.setPoolName(XAPoolDataSource.java:96) [DefaultDS] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:267) [DefaultDS] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:101) [DefaultDS] at java.lang.reflect.Method.invoke(Native Method) [DefaultDS] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628) . If I put a source = null; at the end of stopService() in XADataSourceLoader class (actually forcing the creation of a new XADataSource) everything runs fine, but I'm not sure this is the right thing to do Christian ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user