Title: Message
You havn't really given enough info here (the problem certainly does *not* occur
with "any settings in hibernate.properties"), but I will assume that you are using
a Datasource (since otherwise Hibernate would set autocommit to false by
itself). So the trick is to set up your JBoss datasource to return connections
with autocommit false. This is certainly doable since most people have no
problems using Hibernate with JBoss, but I'm not sure of the details since I'm
a WebSphere user myself.
 
These kind of questions should really be directed to the user forum, where there
will be other JBoss users who can assist you.
 
Gavin
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, 16 December 2002 9:30 PM
To: [EMAIL PROTECTED]
Subject: [Hibernate] Postgres/JBoss/Hibernate problem

 

I am using JBoss 3.2.0-beta-2, Postgres 7.2 and JDK 1.3.1 as

well as hibernate 1.2.

I am having difficulty committing any changes that I make because I get

error message saying: "java.sql.SQLException: You cannot commit with autocommit set!"

bit of code:

[java]

Context ctx = new InitialContext();

SessionFactory sessions = (SessionFactory)ctx.lookup("java:/HibernateFactory");

Session sess = sessions.openSession();

Vertex v = new Vertex();

v.setName( "SomeName" );

sess.save(v);

sess.close();

[/java]

This problem occurs with any settings in hibernate.properties

What needs for correct work without exeption.

Regards, AAP

 



********** CAUTION - Disclaimer **********
This message may contain privileged and confidential
information. If you are not the intended recipient of this
message (or responsible for delivery of the message to
such person) you are hereby notified that any use,
dissemination, distribution or reproduction of this message
is prohibited. If you have received this message in error,
you should destroy it and kindly notify the sender by reply
e-mail. Please advise immediately if you or your employer
do not consent to Internet e-mail for messages of this kind.
Opinions, conclusions and other information in this
message that do not relate to the official business of
Expert Information Services Pty Ltd ("The Company")
shall be understood as neither given nor endorsed by it.

The Company advises that this e-mail and any attached
files should be scanned to detect viruses. The Company
accepts no liability for loss or damage (whether caused
by negligence or not) resulting from the use of any
attached files.
**EIS******** End of Disclaimer **********

Reply via email to