hi guys
when i use this code
Session session = HibernateUtil.getSessionFa
ctory().ge
tCurrentSe
ssion();
session.beginTransaction()
;
try {
//code to call store proc
}
catch(Exception e)
{
e.printStackTrace();
}
session.getTransaction().c
ommit();
i get this exception
>>>>>>>>>>>>>>>>
org.hibernate.transaction.
JDBCTransa
ction toggleAutoCommit Could not toggle autocommit
java.sql.SQLException: DSRA9350E: Operation setAutoCommit is not allowed during a global transaction.
at com.ibm.ws.rsadapter.jdbc.
WSJdbcConn
ection.set
AutoCommit
(WSJdbcCon
nection.ja
va:2414)
at org.hibernate.transaction.
JDBCTransa
ction.togg
leAutoComm
it(JDBCTra
nsaction.j
ava:194)
at org.hibernate.transaction.
JDBCTransa
ction.comm
itAndReset
AutoCommit
(JDBCTrans
action.jav
a:142)
at org.hibernate.transaction.
JDBCTransa
ction.comm
it(JDBCTra
nsaction.j
ava:115)
at com.aoc.judiciary.framewor
k.daoImpl.
TestDaoImp
l.getInfo(
TestDaoImp
l.java:69)
at com.aoc.judiciary.framewor
k.ejb.Bean
testingBea
n.retrieve
Info(Beant
estingBean
.java:95)
at com.aoc.judiciary.framewor
k.ejb.EJSL
ocalStatel
essBeantes
ting_f6322
7a0.retrie
veInfo(EJS
LocalState
lessBeante
sting_f632
27a0.java:
29)
at com.aoc.judiciary.framewor
k.delegate
Impl.Local
TestDelega
teImpl.ret
rieveInfo(
LocalTestD
elegateImp
l.java:74)
at com.aoc.judiciary.framewor
k.ActionCl
asses.Acti
on1.retrie
ve(Action1
.java:76)
at sun.reflect.NativeMethodAc
cessorImpl
.invoke0(N
ative Method)
>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>
and intrestingly when i dont write the "session.getTransaction().
commit() " statement , there are no exceptions on console.
any one encountered this situation in their project?
thanks
J
Start Free Trial