Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Oracle Persistence Builder of Visual Age

 
marko markovic
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i use oracle database and visual age for java.
i use persistence builder for object relational mapping.
How can i say with JDBC that i want to create transactions of Oracle manually, means that i say when
a transaction begin and when must commit.
i had the problem that when i begin a transaction, after all code oracle do automatically a commit,
but i don't want this. I want to say it myself when commit and therefore i think i must do a connection
with manually transactions, How?
Need help or good(helpful) links.

Ok, i find a setAutoCommit. in the classes of persistence builder. But this class where the method
is, isn't call directly, so i couldn't not do setAutoCommit. If i saw the setAutoCommit is set to false
as default, but when i execute my app it says that need transcation. Here is the message Error:
--------- UNCAUGHT EXCEPTION ---------
com.ibm.vap.common.VapTransactionRequiredException: Transaction required
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.rmi.RemoteException(java.lang.String)
javax.transaction.TransactionRequiredException(java.lang.String)
com.ibm.vap.common.VapTransactionRequiredException()
com.ibm.vap.Transactions.Version com.ibm.vap.Transactions.SharedTransactionView.getVersionForRead(com.ibm.vap.Transactions.OID)
com.ibm.vap.Transactions.Version com.ibm.vap.Transactions.BOManager.getVersionForRead()
java.lang.String phxDomain.PhxgenericcolorImpl.getNamegc()
void phxTest.Database.main(java.lang.String [])
--------- UNCAUGHT EXCEPTION ---------
com.ibm.vap.common.VapTransactionRequiredException: Transaction required
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
java.io.IOException(java.lang.String)
java.rmi.RemoteException(java.lang.String)
javax.transaction.TransactionRequiredException(java.lang.String)
com.ibm.vap.common.VapTransactionRequiredException()
void com.ibm.vap.Transactions.SharedTransaction.rollback()
void phxTest.Database.main(java.lang.String [])

if you use the classes of persistence builder 3.5 enterprise edition, maybe you can help that i can
use transaction correctly or maybe you know a person who know that. I need HELLLLLPPPP ((((
All the weekend i tried to get this f****** code to work!
So, maybe you know anything about this?

i do this:

com.ibm.vap.Transactions.Transaction.begin();
System.out.println("Transaction created");
Phxgenericcolor theGenericColor =
PhxgenericcolorHomeImpl.singleton().create("5");
System.out.println("homeimpl created");
theGenericColor.setNamegc("Test1");
theGenericColor.setRedgc("150");
theGenericColor.setGreengc("150");
theGenericColor.setBluegc("150");
System.out.println("values set");
Transaction.getCurrent().commit(); <= her is the error
so i don't know why i getr his problem. remember i use oracle
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic