Connecting a Windows 7 machine to Windows 2000 server domain controller

You cannot connect unless the Windows 2000 machine has service pack 4. So install that from Microsoft. Then make the NTLM changes suggested here:
http://ykyuen.wordpress.com/2009/09/04/windows-7-cannot-connect-to-newtork-drive/

You might then get the DNS error. The fix is here (changing the DNS server on Win 7 point to Server ip):
http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/cannot-add-windows-7-pc-to-domain-get-the/f6b8bc13-18b6-4a67-afa5-755d98a51776

Hiberate and JDBC in same transaction – Flush is a must if JDBC code depends on changes made by Hibernate

Hibernate may not issue queries or inserts to the database until the transaction is closed. So any change made to DB using Hibernate is only visble to Hibernate API. So if you have a JDBC code that executes after some Hibernate modifications, that JDBC code won’t see the change (like if JDBC code is accessing the same record hibernate modified, as in a legacy code) unless you issue a flush in Hibernate.

OutOfMemory – GC OverHead exceeded – Not closing prepared statements – JDBC with Oracle 11g

I wrote a unit test using Spring and for datasource, I used org.springframework.jdbc.datasource.SingleConnectionDataSource. This unit test was calling a legacy code in loop for 5000 times. After 3000 iterations, it was throwing a OutOfMemory (OOM) error. After further research, it turned out to be an issue with legacy code that this unit test was calling that didn’t close prepared statements. And since this is a ‘single connection’ datasource, I never got the ‘connections exhausted’ error. Looks like when ever you call a connection.prepareStatement, the connection object created a few objects and stored them in. As a result, the connection object grew in size and eventually we got the OOM error. Closing the prepared statement fixed the issue.

Before this incident, I didn’t think we could have memory leaks if a statement is not closed.