I am not able to understand what you are asking ?
And how is this realted tp Microcontainer ?
Please frame your queries properly so that we can understand what you are asking .
thanks for response
I configure LocalTxDataSource in my jboss-beans.xml
My test accesses to Datatasource through JNDI:
datasource = (DataSource) new InitialContext().lookup(jdbcUrl);
and then to connection warper:
connection = datasource.getConnection();
connection instanceof WrappedConnection
and when I close it by
WrappedConnection puts real JDBC connection to the connection pool.
But I need to close JDBC connection!!!
How i can to do this? or How I can disable the connection pooling in jboss-beans.xml? or In which forum I should post this question?
at previous post
<bean name="StagingDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource"> <property name="driverClass">org.hsqldb.jdbcDriver</property> <property name="connectionURL">jdbc:hsqldb:file:test-output/staging</property> <property name="userName">sa</property>
>>But I need to close JDBC connection!!!
I dont understand why do you want to this . If you don't need pooling which is what DS provides you simple get the connection using explicitily through the jdbc api and then close in the application code .
You can write a POJO which have getConnection()/closeConnection() , configure this in jboss-beans.xml file ....
>>I dont understand why do you want to this
It is for test purposes only. I need to shutdown Embeded HSQLDB to backup dbase.script file after exporting dbase schema (by hibernate), before my tests started. But connection with closed HSQLDB retain in the pool. Then application access to it ... ba-ba-ah!!!. Therefore I need to manually close it.
I can'to solve my problem with direct JDBC code, because my application accesses to Datasources and UserTransaction through JNDI. I'm use microcontainer only for this purposes (JNDI & Tx). Certainty I can implement by my hands, but i afraid that it will be painful ...
I was expect that "no-pooling" mode is easy configurable on xml.
Ok. Which classes I should extends to provide "no-pooling" mode?
I think that is WrappedConnection, CachedConnectionManager, LocalTxDataSource
min-pool-size=max-pool-size=0 will give you no-pooling , can you please try this ?
It is strange but i've gon exception on this setting yesterday
org.jboss.util.NestedSQLException: ... nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 1000 [ms] ))
"max-pool-size=0" means "no connection" but not "no pooling"
Yes you are right .... I did not think much here .
You will have to write your own POJO . However let me see if we can get the connection handle from the WrapperConnection , but using the DS in this way does not make any sense to me .....
Please use this forum