Shuttle between Galaxies

Thursday, February 11, 2010

Good bye Blogspot

I have moved to Baidu
I will miss you ...

Good luck!

Wednesday, February 10, 2010

En Dag Tilbage

Okay, hvis du fik at vide du havde en dag tilbage at leve i
hvad ville du så gøre? ?
Hvad jeg ville gøre?
Jeg tror jeg ville..
hæve lidt penge på min firma konto
løb ned og shop den bil jeg altid havde tænkt på
vink når jeg så min nabo, hallo
yo, bilen er ny og 24 tommer allo
Jeg ville ha den pige jeg elsker ved min side
Køre ud mod vandet
Og ik ta noget forgivet
Jeg ville ringe til gamle venner og kærester
fortælle dem at de har gjort mig til den jeg er
kig mig i bakspejlet
og sig "hey det' godt nok"
sæddet tilbage, vinduet ned og volumen op
jeg ville gi en
hvorfor jeg var her
bare smile og nyde, at det var jeg
jeg ville samle mine venner og familie op
og køre videre ud mod vandet i en samlet flok
så ville jeg tænkte på om jeg havde givet nok igen
til dem der har givet mig så meget af dem
jeg ville pakere bilen midt ude på vejen
og der sku være musik, yo, min egen
og alle ville smile og bounce med hinanden
barbarque og kæmpe bål på stranden
jeg ville sige til mine brødre at jeg er stolt af dem
at de sku forstå hvor meget jeg virkelig holder af dem
jeg ville sige til min mor og far at jeg elsker dem
og spørge dem om de ik sku prøve at finde sammen igen
fortælle mine venner at jeg tror på
vores kærlighed er større end man kan sætte ord på
og jeg ville finde min kvinde og sige til hende
at jeg havde lyst til at leve videre i hende
og solen ville gå ned over vandet
mens jeg røg en sidste blå kings
drak et sidste glas rødvin
vind i håret
rockstar briller på
23 år
vi ses mit dannebrog
En dag tilbage
lev mens du gør det
elsk mens du tør det
En dag tilbage
lev mens du gør det
elsk mens du tør det
En dag tilbage
lev mens du gør det
elsk mens du tør det
En dag tilbage

Sunday, January 3, 2010

This is American?

No people in the street at Christmas eve
A few restaurants open at Christmas and New Year day
Wear shorts in winter

Thursday, May 22, 2008

no disaster and suffering

If we can shuttle between galaxies ......
No boundaries, no wars, no realty, no disaster and suffering, no longer yours and mine!

Yes, it the most important for life to be no disaster and suffering!

Tuesday, May 6, 2008

Eclipse 3.3.* frequently crashed

I have encountered the crash on Ubuntu8.04 (x86 and AMD64),
finally I solved it on Ubuntu8.04 x86 by passing the '-vm' initial paramenter:
-vm
/usr/lib/jvm/java-6-sun-1.6.0.06/jre/lib/i386/client/libjvm.so

Notice, the value isn't the well-known one:
/usr/lib/jvm/java-6-sun-1.6.0.06/bin/java

if you set this value instead, it won't work.

Also, I have not tested it on AMD64 platform, currently I use IBM JDK for those platform and worked well.

Good luck.

Friday, February 1, 2008

Closures in Java 7: YES vs. NO

Java top-guy, James Gosling, Joshua Bloch, Neal Gafter, ... are debating this theme - Closures:

http://blogs.sun.com/jag/entry/closures
http://java.dzone.com/news/james-brings-closure-debate


I vote on 'NO' as this will let the JSL approach 1K pages, and,
Now I am still in this fear: The time I used to study Java 5 Generic was longer than to study the Java language, but let me use "generic" to designed a framework, I am not so confident.

Thursday, August 16, 2007

hjpetstore project has been out

As approved by java.net administrator, hjpetstore has been out.

If you luckly understand Chinese, Here is a serial document for this project.


Currently, JNDI DataSource couldn't worked for Jetty 6, but local DataSource done.
Below settings will always fail:

<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">

<!-- for Jetty 6, the value is just a reference to the id in
jetty-evn.xml datasource.
see: http://docs.codehaus.org/display/JETTY/JNDI#JNDI-resref

But it didn't work by far.-->

<property name="jndiName" value="jdbc/hjpetstore"/>




See below screenshoots taken when running on different servers (see the footnote part: Running on ...)

First, my favorite, Jetty 6 (precisely 6.1.3)



Sun Application Server9.0 / GlassFish v1

Tomcat 5.5.17

Wednesday, June 6, 2007

JSCP(Java Secure Copy Protocol) NetBeans Plugin

This is my first attempt to really write NetBean Plugin, you can get it from NetBeans PluginPortal.

Below is the screenshot:


Thursday, May 17, 2007

problem in setting mysql XA Datasource

If you intend to use GlassFish/Sun App Server MySql and to use the XA data source .
In the process of current configuration , the problems encountered are as follows :

recursive steps :
1. (If not done before so this step) Add Mysql Connector/J package (as mine : mysql-connector-java-3.1.12-bin.jar) into Gl assFish/Sun App Server installation directory , subdirectory \AppServer\l ib\

2. start GlassFish/Sun App Server. You can right-click Run time | Servers | Sun App Server and select start

3. Once started, Right click on Sun App Server Admin-> View console

4. Login Admin console

5. Navigation on the left side, clicking on Resources | JDBC | ConnectionPool, in the head part of the form in right side , Click New ... button

6. the right to fill out :
Name : MySql.
Resource Type : javax.sql.XADataSource
Database Vendor : mysql

Then click next

7. The value for 'Datasource class name' automatically insert : com.mysql.jdbc.jdbc2.optional.MysqlXaCon nectionPoolDataSource, this value is wrong.

If you want to try the case, fill value in the bottom Properties pane:




Click Finish

8. In the results window Click Mysql

9. In the opened pages can see one ping button, it is used to test configuration is successful or not, click and you will see the following error :



The solution :
If you unzip mysql-connector-java-3.1.12-bin.jar package, you could see this class in com.mysql.jdbc.jdbc2.optional package:

com/mysql/jdbc/jdbc2/optional/
com/mysql/jdbc/jdbc2/optional/CallableStatementWrapper.class
com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.class
com/mysql/jdbc/jdbc2/optional/MysqlConnectionPoolDataSource.class
com/mysql/jdbc/jdbc2/optional/MysqlDataSource.class
com/mysql/jdbc/jdbc2/optional/MysqlDataSourceFactory.class
com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.class
com/mysql/jdbc/jdbc2/optional/MysqlXAConnection.class
com/mysql/jdbc/jdbc2/optional/MysqlXADataSource.class
com/mysql/jdbc/jdbc2/optional/MysqlXAException.class
com/mysql/jdbc/jdbc2/optional/MysqlXid.class
com/mysql/jdbc/jdbc2/optional/PreparedStatementWrapper.class
com/mysql/jdbc/jdbc2/optional/StatementWrapper.class
com/mysql/jdbc/jdbc2/optional/SuspendableXAConnection.class

...
and the default class added by default wasn't listed:
com.mysql.jdbc.jdbc2.optional.MysqlXaConnectionPoolDataSource.

But a similar class is here: com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource

In page: Application Server > Resources > JDBC > Connection Pools > MySql:

1. Change Datasource class name to the value to: com.mysql.jdbc.jdbc2.optional.MysqlConne ctionPoolDataSource

2. Click on the Save button

3. Click on the Ping button. Successful result show :

Tuesday, May 15, 2007

Problem in switching locale of NetBeans multi-lanuge release

Update: This problem described here will only apply to MS Windows XP Chinese version.

In my opinions, on daily working platform, the i18n font problem of JDK/NetBeans has become history. But as I have filed a bug into IssueZilla, this problem is again appeared in this case:

1. download the multi-language release install bundle

2. (Because I'm not happy with some translating, so) switch to the language en by appending one startup parameter into $NetBeans/etc/netbeans.conf file:
netbeans_default_options="$THE DEFAUlT AFTER INSTALL --locale en"
the syntax is: --locale language[:country[:variant]]

3. you will see below result after started: the famous font problem is out again - displayed as
Small Box


Currently, if I want to a workarounds for this problem, you can do this:

1. Revert back to the default locale the JVM running on, and I have to pleasure with unclear translating.

2. download the English bundle