Saturday, August 18, 2007

No TELNET Client in Vista!?

Changing job always needs adjustments.
One of the most annoying thing is that you have to backup all your data, return your notebook to the office, and move the data to your new notebook. I moved to my personal notebook, cos starting from now I will be working on office's PC.
For me, I had an additional tasks, as I have to buy a new notebook. Making backup of all your data you have accumulated for more,than 1 year itself quite a tricky stuff. I have settled on the XP Professional, have a virtualized OpenSolaris 11 (Nevada) and CentOS 5, WebLogic 8.1 and WebLogic 9.2 installations along with the domains, and tons of codes personal stuffs to move.
My choice eventually fell on dual core Turion64 based Fujitsu lifebook. Large clear screen, economic, no camera, but I like it. Fujitsu also invented smart battery management and shock prevention software for hard drives.
One of the thing, is that latest computers only offer Vista. Mine is bundled with Vista Home Premium. It is much like changing platform from Linux to OpenSolaris. Lots of homeworks to do before you could run it so well.
Last week when I tried to work on with Tomcat, but my browser don't show anything. I need to check whether Tomcat service is available on the default port 8080. Then suddenly I found out that THERE IS NO TELNET CLIENT in Windows Vista! I checked the PATH variable, seems to be okay.
Then I googled around, and found out that TELNET client is disabled by default on Windows Vista!
You need to set it up like this, go to Control Panel:
Control Panel > Programs and Features > Turn Windows features on or off > Telnet client
Turn it on.
Amazingly, it took more than 10 minutes just to enable TELNET client! I got no idea why it took so long to enable such a simple trivial client application.
Later on I found out the reason why Tomcat not yet listening to port 8080. Vista blocked the port and asking for permission to listen to that port. This happens only the first time you run your Tomcat instance. If you enable client access feature, you need to reply to this kind of quite-annoying-prompts. Anyway I must be getting used to it.
Voila, Tomcat works again.

Friday, August 10, 2007

End of Unemployed Period and How To Work in Singapore

Today I collected my Singapore EP (employment pass), so right now I officially end up my unemployed period. Next week I will start working right away.
If you want to work at Singapore, you need to have a company that wants to hire you. After the interview and you have been admitted, than you will need to prepare at least these things:

  • Your passport.

  • A passport size photo, black and white.

  • Your university certificate, preferably in English, or translated to English.

  • Your academic transcript, in English or translated to English.


Send the softcopy of the document (scanned) to your employer. They will make application for your EP.
If your document is not in English, then you need to translate it by translator attested by your country's embassy in Singapore, or you may as well go translate it to sworn translator in your country.
When the time your EP has been approved, or before, they might be asking you to show the original documents submitted. This is not always the case, but be prepared for it. Then you will need to collect your EP at Ministry of Manpowers (MOM) . This time you need to be physically present in Singapore.
If you want to go to the MOM office, take an MRT to the Clarke Quay station. Probably this is the most convenient way to get there. Right at the MRT station, you will find a lot of sign board showing where to go to the "Ministry of Manpower". Follow the board, cross the road and you will get to the MOM office. It will be better if you get there before 11am, Singapore time (GMT+8), so that you could be able to collect the EP document within the same day. Don't forget to bring:

  • Your passport

  • Your immigration card attached to your passport

  • Passport size photo (you can take it for SGD 10 beside the MOM office)

  • Declaration and forms from your employer

Wednesday, July 25, 2007

What is an XA driver?

XA is a set of distributed transaction protocols defined by Open Group.
XA provide interfaces that could be used for cross platform transactions. Currently, much of the famous databases provided XA-compliant drivers. XA-compliant driver means that the transaction manager could send XA command directly to the driver.
Oops, sorry, in the world of distributed transaction, there are transaction manager and resource managers. Transaction manager coordinate the transaction, orchestrating the two-phase commit for each of the resource manager.
In JEE point of view, and transaction manager could be a type 3 JDBC driver, and the resource managers could be an XA compliant JDBC drivers, or general type 4 JDBC driver in which the type 3 JDBC driver will emulate XA command using common JDBC transaction commands.
In WebLogic console, when we setup a connection pool, usually we will be asked whether we want to assign an XA driver or just ordinary driver. XA drivers will have a significant overhead imposed into it, so make sure you only use the XA drivers when really required. It is common to have an XA-compliant version of connection pool and non-XA-compliant connection pool, both connecting to the same database, to avoid performance penalty when we don't need two-phase commit.
In my former company, we have a clustered WebLogic server installation with each of the databases have two pairs of connection pools, a non-XA and XA-compliant driver. Due to clustered environment, database connection are using RMI through JNDI lookup. For read only data, always use non-XA connection pool to increase performance.

Tuesday, July 24, 2007

Free and Unemployed

After admitted for work in Singapore, I resigned immediately because the employer asked me to start working ASAP. Singapore is a nice country to earn money, but I have a personal matters that pretty much the main reason to relocate there. The employer has been taken care of the EP application for me.
Yesterday I was called, suddenly the asked me to provide the translated academic transcript for the EP application. They said that this is not usually the case. Probably some kind of random sampling happened and it happened to be me that was chosen for the random checking. They already have some foreigners in the company, the procedure is a bit unusual.
I called to my campus. They told me that probably there is a delay in providing the translation of my academic transcript, due to the change of the rector of the University of Indonesia. Again, I lost my booked flight for the second time. What a waste of money.
Meanwhile, I'm free and unemployed now. Free zone..
Only for a while though...
This event also provides me with enough free time to explore, and accomplish things otherwise I couldn't do. Now I could read some old WebLogic texts, learn more the difference between type 3 and type 4 JDBC driver, and those kind of thingy... This time is a kind of retreat time, where you could do things you wouldn't have time to when you are engaged in an employment. I missed those time when I was as free as bird, when you become the business owner. But become an employee isn't a bad thing at all. You don't have to take just about everything, instead you could focus on things that you are best at.

Saturday, July 21, 2007

Intermittent problem with JRoller?

Today I found out this happening on our fellow JUG-ID JRoller blogs. The JRoller engine has been generated a script variable "$renderedText" instead of displaying the blog content. This suppose to happen temporarily, as the JRoller team pleaded they will fix it ASAP.

No INNER JOINs in Oracle 8i

Yesterday we encountered a problem when testing an already working version of our web application. The application works well in the development environment. When we move the application to hit the production database, it throws an exception.
The application uses Hibernate as its persistence manager. Our team has been hassled for quite some times, until one of our colleagues found out that the query produced by Hibernate was not runnable from Oracle's console. Digging further we found out that the database in production used an older version, the Oracle 8i. Oracle 8i does not support INNER JOIN syntax, therefore it rejects the query produced by Hibernate.
It came across my mind that we should change the dialect. If 8i does not support what is running on 9i, then the developer of Hibernate should have put different dialects for them. This is found out to be true. There is org.hibernate.dialect. Oracle9Dialect for Oracle 9i databases, and org.hibernate.dialect.OracleDialect for older Oracle 8i databases.
After we change it to the correct dialect, the problem somehow is still there. After browsing for a while I eventually found out that we also need to change the query translator to the older version, org.hibernate.class.ClassicQueryTranslator.
Then the application is working in the production database. Voila! It works!

My Last Day,John Stovall, Python, WLST and Jython technology...

Yesterday supposed to be my last day @work. But somehow I must come again on Monday, and reschedule my flight to Batam to Tuesday. Moving to different kind of industry, but still in the same JEE/WebLogic/Solaris/Oracle path. Just a bit apart from the telco industry.

Lately I wasn't able to update this blog because at client office, they block the blog sites. Now, after being freed now I can start updating this blog again.

After accidentally meeting with John Stovall while at Changi Airport, I got enticed to learn more and more about Python, and Jython, its Java porting. First time I met John when I came to JaMU, December 2006. I was presenting Maven 2 technology, and each of the attendees were asked to introduce themselves. You can't miss noticing that big John. We happened to be in the same airplane, and after arrived at Changi airport, I began to recover his name, I called him, "Mr. Stovall", and then he began noticing an acquaintance. He's on the way to Amsterdam, to attend a Python meeting. He began preaching the beauty of Python, the philosophy behind it: "there should be one best way to do it...". I was also realizing that the reason why Guido von Rossum moved to Google was because of almost the entire Google site is based on Python.

I told John that I was using some Jython script because it is part of the WebLogic Scripting Tool (WLST). I learned a lot on it because some of my tasks while at Ericsson's project at Cyberjaya, was to create a automatic installation, deployment and setting tools. I found out that the best way to do it is through WLST. The older method wlshell still works, but using WLST, you could have access to a broader range of futures, both offline and online (requires a running WebLogic instance).

After returning to my regular tasks at Jakarta, I began downloading latest version of Jython. Before that, I have tried one of the scripting languages that has catch up the wave and has been ported to Java: JRuby. I also tried the scripting language made specially for Java: Groovy.

I began to fall in love working with Jython. You can utilize Java classes. The scripting language is close to the functional language I've been using a lot: Gofer+, a derivation of Haskell. Prof. Wishnu Prasetya taught us Data Structure and Algorithms using that functional language. Prof Mia Indika also taught the functional programming using the Haskell language. Python, er, Jython scripting more or less resemble that of Haskell. Sorry, for most of you who learned functional programming through typing lots of Irritating Parentheses (LISP). Though I also used Scheme when learning functional programming, later I mostly used the Gofer+/Haskell family of language.

Python also supports closure, so there is no point that Ruby is better. It only has Rails that makes it famous. I know when I learn Jython in depth, this is two fold, I could create better WLST scripts for WebLogic automatic deployments and configurations, and also be able to do OOP scripting for fast prototyping. I try to construct a script to test Hibernate DAOs and Managers. I will share some of these scripts when have more time to write it.