If a person goes to a shop and asks for Tea but, shopkeepar gives him sugar instead.
~ Pratibha Malhotra<br /> <br />Sun Certified Java Programmer<br />SCEA 1.4 (In Progress)<br />~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />"Many of life's failures are people who did not realize how close they were to success when they gave up!!"
i took it a bit different. make it coffee instead of sugar, because sugar and tea are not the substitute of eachother. Now see,
Customers asks for coffee, But Shopkeepar gives him Tea
it looks like a transaction. i will explain my point regarding this in further coming lines.
Customers asks for coffee, and Shopkeepar has Tea but not the coffee and said just sorry.
yeah here definitely. no transaction.
i am thinking about the knowledge based AI Systems here. Like, if you dont have a perfact match then go for some other match.
just like if a shop keeper has all the beverages of coca cola company. and not deals with papsico. and some customer asks for pepsi then usually shopkeeper would say "sorry sir we dont have pepsi, But you can get a coca cola if you want". because it is somehting alternate. and here if the customer agrees then it would be a transaction. isn't it.
Hi, Taking this discussion furthur,I would want to give you a problem that I m facing. I have some code which uses JDBC and doesnt have any transactionality in place. Also code doesnt run inside in any application server. If I want to implement transactionality on my usage of JDBC then what would be the right way to go about it.
Right now I obtain a DB connection from a pre-created pool whenever I require to fire a Query and after firing the Query I return it back to the pool.
Holding the connection for my entire flow in AutoCommit = False mode will be surely a hit on performance. Is there any better way to do this?
The strength of the Wolf is the pack & the strength of the pack is the wolf....Rudyard Kipling
Joined: Aug 15, 2004
couldn't get you for the first one.
for second one: its considered a good practice. getting the connection object at the time of usage and place it back immediatly after use.
Joined: Dec 08, 2001
Hi Adeel, What I meant was that If there are Query1 , Query2, Query3 being fired in my flow, then all the 3 should be a part of one transaction. But right now my code doesnt have that. Meaning that it fires Query1,then says commit,then Query2 and then commit,etc. Also it is not guareenteed that we use the same Connection object for all the 3 queries. Is there any way I can use JTS here?
Joined: Aug 15, 2004
i think it is a seperate question. could you please post it as a seperate topic.