Version: Smart GWT Power 2.3 – nightly 2010.10.17
I’m observing a strange behaviour on my glassfish test environment with connection pool. The following code is working fine in my Eclipse environment without connection pool and on the glassfish without connection pool too.
In the code I write some data in a oracle temporary table and fetch the data with standard SmartGWT features. To read the data from the temp table I have to use the same database transaction.
Is the code executed on a Glassfish application server with utilizing the connection pool I receive no data.
To my mind there are only two reasons for that problem:
-A different DB session is used
-A different transaction is used
ServerDMI Code:
Datasource:
Datasource with Connection-Pooling (Pool-Name: jdbc/cti_sdom):
More information required?
I’m observing a strange behaviour on my glassfish test environment with connection pool. The following code is working fine in my Eclipse environment without connection pool and on the glassfish without connection pool too.
In the code I write some data in a oracle temporary table and fetch the data with standard SmartGWT features. To read the data from the temp table I have to use the same database transaction.
Is the code executed on a Glassfish application server with utilizing the connection pool I receive no data.
To my mind there are only two reasons for that problem:
-A different DB session is used
-A different transaction is used
ServerDMI Code:
Code:
public DSResponse fetch(DSRequest dsRequest) throws Exception { SQLTransaction.startTransaction(dsRequest.rpc); Connection c = SQLTransaction.getConnection(dsRequest.rpc); //authentification call AuthentificationDAO.login(c, userName, password); //the next two lines must be in one transaction //this procedure is writing some data over a plsql procedure //in a oracle temporary table //on a commit oracle deletes the data SSMTreeDAO.generateSsmTree(c); // in the execute methode a fetch is executed on the temp table DSResponse response = dsRequest.execute(); SQLTransaction.endTransaction(dsRequest.rpc); return response; }
Datasource:
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource ID="ssm_tree" serverType="sql" tableName="sdm$vi_web_ssm_tree" titleField="sst_name"> <fields> <field name="sst_id" type="integer" primaryKey="true" /> <field name="sst_parent_sst_id" type="integer" foreignKey="ssm_tree.sst_id" rootValue="1" /> <field name="sst_name" type="text" /> </fields> <operationBindings> <operationBinding operationType="fetch"> <serverObject className="de.sdom.frontend.server.dmi.SSMTreeDMI" lookupStyle="new" /> <serverMethod>fetch</serverMethod> </operationBinding> </operationBindings> </DataSource>
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource dbName="jdbc/cti_sdom" ID="ssm_tree" serverType="sql" tableName="sdm$vi_web_ssm_tree" titleField="sst_name"> <fields> <field name="sst_id" type="integer" primaryKey="true" /> <field name="sst_parent_sst_id" type="integer" foreignKey="ssm_tree.sst_id" rootValue="1" /> <field name="sst_name" type="text" /> </fields> <operationBindings> <operationBinding operationType="fetch"> <serverObject className="de.sdom.frontend.server.dmi.SSMTreeDMI" lookupStyle="new" /> <serverMethod>fetch</serverMethod> </operationBinding> </operationBindings> </DataSource>
Comment