31.8.09

JavaDB/Derby: Worthy to Have a Try!

Originally, I was looking for an embedded Java database. JavaDB could work in an embedded style, but with 2M limitation. That's terrible. However, since I can control JavaDB server within my Java application, I run the server with a random server port, then connect to it within the same program. Now, my database looks like an embedded one but with no limitation on size. Additionally, JavaDB is much more faster than SQLite3.

27.8.09

My Google Chrome Browser Just Crash Frequently!

Windows Vista

Shame on Google.

Embedded DB within Java using Derby/JavaDB

Reference: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javadb/

1. Download JavaDB from
http://developers.sun.com/prodtech/javadb/downloads/
or Apache Derby site.

2. Copy derby.jar to your runtime environment

3. Create a JDBC connection to an embedded Derby DB using code similar to the following:
String dbName = "testDb";
Properties props = new Properties();
props.put("user", "testuser");
props.put("password", "testpass");

conn = DriverManager.getConnection("jdbc:derby:" + dbName
+ ";create=true", props);

Note that within Java 6/JDBC 4, you don't need to call Class.forName() explicitly to load the JDBC driver.

4. Nothing else. Enjoy it!

The new created file permission within cygwin is always wrong!

It's always being 000.... I still don't know what happen with my cygwin. I checked unmask, and found it was set properly as 022. What's wrong?

Powerful objdump

objdump -s

Yeah~~!

24.8.09

Domain User to Use Cygwin

It's the first time I encounter this.

When I started the bash shell for cygwin in my office using my Laptop, I found some extra message that telling me that the passwd/group file should be rebuilt using mkpasswd -l and mkgroup -l. I tried it but the same message show again. Finally I found there should be a -d parameter there because I'm a domain user in my Office. So I did, and everything works fine.

Installing NetBean 6.7.1

Costs me lots of time.

So I install cygwin at the same time.
Do some testing for Apache ant regarding Jar merging.

Integrating Mantis and Subversion

http://alt-tag.com/blog/archives/2006/11/integrating-mantis-and-subversion/

1. add configuration items into mantis's config_inc.php
2. create post-commit script for the designated svn repository.

Note that there are some problem within alt-tag.com's script file, please

23.8.09

SVN repo creation

http://subversion.tigris.org/faq.html#repository

Solution 1.

Create a common repository and use svn mkdir to create subdirectories for
different projects.

$svnadmin create /repo/svn
$svn mkdir file:///repo/svn/projA
$svn mkdir file:///repo/svn/projB
$svn mkdir file:///repo/svn/projC

Solution 2.

Create a normal directory, and create managed subdirectories for projects.

$mkdir /repo/svn
$svnadmin create /repo/svn/projA
$svnadmin create /repo/svn/projB
$svnadmin create /repo/svn/projC

These two solutions look like simliar. However, for the first one,
when projC change, the revision number changes in other two projects.