Showing posts with label jdbc. Show all posts
Showing posts with label jdbc. Show all posts

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.