Monday, August 28, 2006

Supposed to be a 'Quiet' and 'Saving' weekend

It should be a 'Home Alone' weekend, without my regular companion. Not really a big deal, I already prepared a TODO list to overcome this. The plan was to stay at home and spend my free time on playing games and reading my latest fiction. Most importantly is try to hold my wallet as tight as possible by reducing whatever unnecessary expenses. Apparently, it's quite difficult to cut down our expenses during the weekend. I would say it can easily becomes the 'Most Expensive' day in a week if you are not aware of.

The plan worked pretty well on the first day, Saturday, with total expenses as low as RM0 until 6pm. We all know plan doesn't always goes as expected. The day started when i bought my gf's parent 'thong sui' at Petaling Street. Twenty plus debitted into the expenses account. Well, i think the money was well-spent, no way you can save on this. :p Next, my friends called me up to watch EPL at the 'mamak' nearby. With the drink less than 2 ringgit, the spending also considered well-worth by allowing us to watch the whole match and talking crap. The day ended with total expenses less than 30. Not too bad for a day.

Sunday, plan didn't goes accordingly at all. When i wake up, the time is almost noon. First sms i got from my hp was we'll have a 'Old friend Reunion' in MidValley at 1pm. No escape for this, sure need to spend. With my friend driving, i had to pay the parking. Sigh, traffic congestion outside MidValley and RM3 parking during the weekend. That's why i normally shopping on weekday. Subsequently, we need to have our lunch. 'Old Friend Reunion' has to be a better dining place. We decided Pizza Hut. Phew, twenty plus per person. After that, one of my friend want to look for a shirt. So we just accompanied him. This guy really good in window-shopping. I and another friend of mine were walking like mad. Normally i only do this for my gf. Eventually, we split off and went to have some casual reading in MPH. My this friend only came back to meet us after 1/2 hour with his bargain. The time for him to buy a shirt is approximately 3 hours.

My expenses account closed after my dinner with the total of 70++ for these 2 days. Still unable to cut down cost over the weekend even though i had a plan. At the least, it turned out to be a busy and exciting weekend which's not supposed to be :D

Saturday, August 26, 2006

Installing SQL Server 2005 Express

Here’s the guide to install the SQL Server Express Edition into your system. Firstly, grab the installation program from the ms msdn web site. The required programs are as follow: .Net Framework 2.0, SQL Server 2005 Express Ed., SQL Server Mgmt Studio Express and the MSXML 6.0.

1. install the dotnetfx.exe (MS .Net framework)
2. install the msxml6.msi (latest MS XML Parser)
3. run the SQLEXPR.exe installation (SQL Server Express Ed.)
4. run the SQLServer2005_SSMSEE.msi installation(SQL Management Studio Express)

If you are switching from SQL Server 2000 to SQL Server 2005, you need to transfer your SQL Server 2000 database to SQL Server 2005 by using the backup db and restore db function. After restoring the backup, you need to remap the user login to the db. In this case, there may be some existing login for the table. In order to remove it, you need to remove the login user schema, then only the user in security.

For J2EE database connection, the TCP/IP protocol need to be enabled in the SQL Server Configurations Manager. Under Network Configurations, double click on the TCP/IP protocol, enable the protocol as well as the ip address. In the IP address portion, you can choose to open your LAN IP, localhost or both. Another portion is the TCP port, the port number that J2EE used to establish connection. Mine is defaulted at 3408. FYI, the defined port number for SQL Server is 1433. I wonder the port number may be vary because i installed the SQL Express on top of SQL Server 2000. Make sure there's no port conflict. Finally, change your port number, normally in .properties file to be the same as SQL Express TCP port.

JBoss Start or Stop server

List of bat command and argument for starting or stopping a jboss server:
Start Server
1. run.bat ~ start the default server
2. run.bat -c server_name ~ start the correspond server, apply when you have server with multiple instances. Example, run -c default

Stop Server
1. shutdown.bat -s localhost:port_no ~ stop the correspond server based on the jboss:service=Naming port settings. Default port is 1099.
Example, shutdown -s localhost:1099

*Note: the command can be run without the .bat file extension.

Jboss server running on multiple instances

*Note: This manual has been tested on the MS IIS server.
First and foremost, you need to get the slim down version of jboss. What i mean 'slim down' here is the server will only run relevant services and application and it'll reduce the server startup time tremendously. Next, follow the step by step instruction:

1. Create a port-bindings.xml inside your jboss folder. There's a sample of this xml in jboss folder/docs/examples/binding-manager. You can just copy the content in the file and paste it into your new xml.

2. Once you have the xml, next thing to do is define the server name and the port. By default, we will have one ports-default. Define your new server instance based on the default port. Make sure the jboss:service=Naming binding port has been set other than the default port 1099 and tomcat port binding is other than port 8080.

3. In jboss folder/server, duplicate the default server folder and rename it to the server name you prefer. Move to your new server folder/conf, open the jboss-service.xml. In the service binding portion, define server name based on the ports-new_server you have created in port-binding.xml and store url to file:../port-bindings.xml depends on where you put your xml.

4. Go to the server deploy folder, open the jbossweb-tomcat55.sar. In there, you will see a server.xml. The only thing you need to modify here is the jvmroute. The jvmroute should point to the IISRedirector worker name that created in the worker properties.

5. Before we proceed further, let us have a run through on the ISSRedirector. This tool is available to download in Apache website. At the first place, you need to have IIS installed in your system. After you install IIS and then the redirector, you need to configure the ISAPI filter to the Apache IIS Redirector. Next, create the different worker in worker properties. The most importance part to watch out is the port no. Default port is 1099. Your new worker should use port 1100 and the subsequent port. After that, go to the uri properties file to configure the instance name ties to the correspond worker. Exp, /ABC = testWorker, ABC refered to your war file name. Once done, restart the WWW service in windows service.

6. When you reach this stage, you are clear to go. Open MS-DOS console and go into the jboss bin folder, type "run -c server_name " and the server will be started. Do the same if you want to start another server. The command to start the default server would be "run -c default".

7. To make our life easier, we can download the javaservice from the web and create the server start/stop service in our window services. In this way, we can start and stop our server from the gui instead of command prompt. We will look into the javaservice in my next posting. Happy exploring!