Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
Since the intention is to provide a safer execution for the user then +1, but if you are going to do this then i guess session.connection() will still be ok since it will just be proxied. btw. your example is a bit simplified since when hibernate runs inside an appserver the user will norma

RE: [hibernate-dev] Connection proxying

2006-08-30 Thread Steve Ebersole
Not sure. You know I would love to get rid of Session.connection() completely. Guess it depends on how clean and generally useful this new Work and command code becomes. However, removing that connection() method does additionally create an issue in regards to how to then deal with the common us

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
However, removing that connection() method does additionally create an issue in regards to how to then deal with the common usage pattern of "subordinate sessions": sf.openSession( s.connection() )... One thought was to add either a sf.openSubordinateSession( s ) or even s.openSubordinateSessio

RE: [hibernate-dev] Connection proxying

2006-08-30 Thread Steve Ebersole
Imagine this usage: Session s = ...; Connection c = s.connection(); PS stmnt = c.prepareStatement( ... ); RS rs = stmnt.executeQuery(); s.load( ... ); rs.next(); ... Seems harmless enough, right? Will it work? Answer: well it depends ;) Both the ConnectionProvider being used and the connection

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Emmanuel Bernard
session.connection() is completely useless in a JavaEE environment @Resource Connection connection; is much better Max Rydahl Andersen wrote: However, removing that connection() method does additionally create an issue in regards to how to then deal with the common usage pattern of "subordinat

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
session.connection() is completely useless in a JavaEE environment @Resource Connection connection; is much better and your point is ? Tell me again how I get the connection injected into e.g. a Hibernate interceptor ? or in plain j2se etc. ;) /max Max Rydahl Andersen wrote: However

[hibernate-dev] Insert not working

2006-08-30 Thread Dinesh Chaturvedi
Hi,I have just started working on hibernate. I was trying to start with some sample applications.I am facing this problem when I am trying to insert data. It does not throw any error but does not do any insert. I can easily fetch information using the same mapping.Can someone help me with this.I am

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
Session s = ...; Connection c = s.connection(); PS stmnt = c.prepareStatement( ... ); RS rs = stmnt.executeQuery(); s.load( ... ); rs.next(); ... Seems harmless enough, right? Will it work? Answer: well it depends ;) Both the ConnectionProvider being used and the connection release mode confi

Re: [hibernate-dev] Insert not working

2006-08-30 Thread Max Rydahl Andersen
http://forum.hibernate.org /max Hi, I have just started working on hibernate. I was trying to start with some sample applications. I am facing this problem when I am trying to insert data. It does not throw any error but does not do any insert. I can easily fetch information using the same

RE: [hibernate-dev] Connection proxying

2006-08-30 Thread Steve Ebersole
Depends... Do you mean the current session.connection()? If so, then no, they will not be the same. Currently, session.connection() enforces that the connection is usable until (1) the connection is "closed" or (2) the transaction ends. If you tried the Work code you listed, that guarantee would

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Christian Bauer
On Aug 30, 2006, at 9:39 PM, Steve Ebersole wrote: The question was simply whether exposing the Work/command APIs justify removal of the connection() method from the perspective of using it for direct JDBC work. I do not know that answer to that. Unfortunately, I suspect it does not and tha

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
So I think we agree (just using different words ;) Something like the Worker would be beneficial and s.getNewSession() might be an alternative to sf.openSession( s.connection() ). and session.connection() probably has to stick around as a necessary evil for some usecases. When do you plan f

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
The question was simply whether exposing the Work/command APIs justify removal of the connection() method from the perspective of using it for direct JDBC work. I do not know that answer to that. Unfortunately, I suspect it does not and that we will need to keep connection() around; but one ca

RE: [hibernate-dev] Connection proxying

2006-08-30 Thread Steve Ebersole
Then we need @bad... ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Rydahl Andersen Sent: Wednesday, August 30, 2006 3:01 PM To: Christian Bauer; hibernate-dev@lists.jboss.org Subject: Re: [hibernate-dev] Connection proxying >> The question was s

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Emmanuel Bernard
You should contribute to http://www.jcp.org/en/jsr/detail?id=305 ;-p Steve Ebersole wrote: Then we need @bad... ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Max Rydahl Andersen Sent: Wednesday, August 30, 2006 3:01 PM To: Christian Bauer; hibernat

[hibernate-dev] hibernate-hsqldb-testsuite Build Completed With Testsuite Errors

2006-08-30 Thread qa
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-hsqldb-testsuite?log=log20060830215954 TESTS FAILEDAnt Error Message: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:92: The following error occurred while executing this line: /home/cruisecontrol/work/sc

[hibernate-dev] hibernate-mysql-testsuite Build Completed With Testsuite Errors

2006-08-30 Thread qa
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-mysql-testsuite?log=log20060830232053 TESTS FAILEDAnt Error Message: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:127: The following error occurred while executing this line: /home/cruisecontrol/work/sc

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
You should contribute to http://www.jcp.org/en/jsr/detail?id=305 ;-p Steve Ebersole wrote: Then we need @bad... ;) :) but seriously @deprecate is not only "a going away" marker. From http://java.sun.com/j2se/1.4.2/docs/guide/misc/deprecation/deprecation.html: "Valid reasons for wishing

Re: [hibernate-dev] Connection proxying

2006-08-30 Thread Max Rydahl Andersen
I would say .connection() falls in some of those categories and should only be used in very few cases (until we provide alternatives for the important "patterns"). Should have said: ...only be used in very few cases (and even less when/if we provide alternatives for the important "patt