Archive for the ‘Uncategorized’ Category

Php code generator

Thursday, June 4th, 2009

After a long search I found a wonderful Php code generator that runs on Windows, connects to your database, allows you to select tables and even asks you about security. It produced about 90% of the final code for me – I just needed to re-arrange certain things, trim certain long descriptions and have my database connection class replace in-place connection strings. Even without any of my work the solution worked out of the package! Impressinve. Here is the link to it: http://www.sqlmaestro.com/products/mysql/phpgenerator/download/ called Php Generator for MySQL.

Plugins I usually use with Eclipse installation

Wednesday, June 3rd, 2009

Here is the list of plugins I usually use with eclipse installation – a quick way for me to upgrade eclipse and still remember the site without searching for them:
FindBugs http://findbugs.cs.umd.edu/eclipse
DBViewer http://www.ne.jp/asahi/zigen/home/plugin/dbviewer/
PHPeclipse http://phpeclipse.sourceforge.net/update/stable/1.2.x/
PERL EPIC http://e-p-i-c.sf.net/updates
EMMA http://update.eclemma.org/
Mobile Tools For Java (DSDP/MTJ) http://download.eclipse.org/dsdp/mtj/updates/0.9/stable/
Java Decompiler http://java.decompiler.free.fr/
Java Auto Documentation Plugin http://jautodoc.sourceforge.net/update/

Spring JDBC and Sybase Temp Tables

Friday, May 8th, 2009

I had a problem with using temp tables and Spring JDBC code lately. The main problem was that in Sybase a temp table can be accessed only on the same connection which created it. When executing several SQl statements in default Spring JDBC usage (DriverManagerDataSource using connection pool) could give different connections from connection pool for each of the statements. So in default implementation we cannot garantee that a temp table is visible. One possible fix is to use transaction (@Transactional) which would ensure that same connection is used. In our case, Sybase is configured in a way that does not allow us to drop temp table in the same transaction as create and select from it.

com.sybase.jdbc3.jdbc.SybSQLException: The ‘DROP TABLE’ command is not allowed within a multi-statement transaction in the ‘tempdb’ database.

 So the only way out was to us SingleConnectionDataSource for one method as described in http://forum.springsource.org/showthread.php?p=239922&posted=1#post239922

Hello world!

Saturday, May 24th, 2008

I’ve started my professional Blog! Hurray!