Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ExternalDatasource java class locking database table
Bill Klish
OpenDeploy 6.0.2 SP1
SQL Server 2000
I have written a simple External Data source class that selects from a sequence table and returns the value. All of the data is loaded correctly into the db and datadeploy finishes. The rows are committed. If I attempt to query the sequence table, it is frozen until I physically restart the opendeploy service.
As far as I can see I am closing the statements and result sets within my code. I took the example file and updated the code that gets the value.
After restarting opendeploy, I see that the sequence value is never committed. Do I need to manually commit each of these updates to the Database? I figured that the Connection object passed in would be tied to the overall deployment, but after re-reading the manual and example files, it looks like it is a separate connection. So, I need to manually commit each update to the table then.
Do I also need to close the connection?
Find more posts tagged with
Comments
Bill Klish
I found the problem. It would be helpful if the DataDeploy documentation was updated to reflect this.
Instead of this being documented in the manual, the IWExternalDataSource java interface code has this buried within the Java comments:
"the Connection object supplied to this method is not the same connection that DataDeploy uses to perform the deployment."
What this means is that when datadeploy performs a commit or rollback the connection being used by the IWExternalDataSource is not committed and rolled back as well. Therefore, what was happening was on success or failure, all of my transactions were still open, causing the lock on the table.
To fix this problem, you need to explicitly commit or rollback in your IWExternalDataSource java code.
Please update the DataDeploy documentation to reflect this.