Translate

Tuesday, 12 August 2014

Standar Metode Pengujian oli mesin yang digunakan oleh American Petroleum Instituce (API )

Baik oli mesin bensin, diesel, dan motor semua ada standar baku pengujiannya. API, JASO , ILSAC, dan ACEA sama sama mengacu pada ASTM sebagai metode pengujiannya. berikut ini adalah daftar yg digunakan pada pengujian pengujian oli mesin.

American Chemistry Council Petroleum Additives Panel Product Approval Code of Practice

ASTM D92, Standard Test Method for Flash and Fire Points by Cleveland Open Cup
ASTM D93, Standard Test Methods for Flash Point by Pensky-Martens Closed Cup Tester
ASTM D445, Standard Test Method for Kinematic Viscosity of Transparent and Opaque Liquids (and the Calculation of Dynamic Viscosity)
ASTM D892, Standard Test Method for Foaming Characteristics of Lubricating Oils
ASTM D1552, Standard Test Method for Sulfur in Petroleum Products (High-Temperature Method)
ASTM D2007, Standard Test Method for Characteristic Groups in Rubber Extender and Processing Oils and Other Petroleum Derived Oils by the Clay-Gel Absorption Chromatographic Method
ASTM D2270, Standard Practice for Calculating Viscosity Index From Kinematic Viscosity at 40 and 100°C
ASTM D2622, Standard Test Method for Sulfur in Petroleum Products by Wavelength Dispersive X-Ray Fluorescence Spectrometry
ASTM D2887, Standard Test Method for Boiling Range Distribution of Petroleum Fractions by Gas Chromatography
ASTM D3120, Standard Test Method for Trace Quantities of Sulfur in Light Liquid Petroleum Hydrocarbons by Oxidative Microcoulometry
ASTM D3244, Standard Practice for Utilization of Test Data to Determine Conformance with Specifications
ASTM D4294, Standard Test Method for Sulfur in Petroleum and Petroleum Products by Energy-Dispersive X-Ray Fluorescence Spectroscopy
ASTM D4485, Standard Specification for Performance of Engine Oils
ASTM D4683, Standard Test Method for Measuring Viscosity at High Shear Rate and High Temperature by Tapered Bearing Simulator
ASTM D4684, Standard Test Method for Determination of Yield Stress and Apparent Viscosity of Engine Oils at Low Temperature
ASTM D4741, Standard Test Method for Measuring Viscosity at High Temperature and High Shear Rate by Tapered-Plug Viscometer
ASTM D4927, Standard Test Method for Elemental Analysis of Lubricant and Additive Components, Barium, Calcium, Phosphorus, Sulfur, and Zinc, by Wavelength-Dispersive X-Ray Fluorescence Spectroscopy
ASTM D4951, Standard Test Method for Determination of Additive Elements in Lubricating Oils by Inductively Coupled Plasma Atomic Emission Spectrometry
ASTM D5119, Standard Test Method for Evaluation of Automotive Engine Oils in CRC L-38 Spark Ignition Engine
ASTM D5133, Standard Test Method for Low Temperature, Low Shear Rate, Viscosity/Temperature Dependence of Lubricating Oils Using a Temperature-Scanning Technique
ASTM D5185, Standard Test Method for Determination of Additive Elements, Wear Metals, and Contaminants in Used Lubricating Oils and Determination of Selected Elements in Base Oils by Inductively Coupled Plasma Atomic Emission Spectrometry (ICP-AES)
ASTM D5293,  Standard Test Method for Apparent Viscosity of Engine Oils Between  –5 and –30˚C Using the Cold-Cranking Simulator
ASTM  D5302,  Standard Test Method for Evaluation of Automotive Engine Oils for Inhibition of Deposit Formation  and Wear in a Spark-Ignition Internal Combustion Engine Fueled with Gasoline and Operated Under Low-Temperature Light-Duty Conditions
ASTM D5480, Standard Test Method for Motor Oil Volatility by Gas Chromatography
ASTM D5481,  Standard Test Method for Measuring Apparent Viscosity at High-Temperature and High-Shear Rate by Multicell Capillary Viscometer
ASTM D5533,  Standard Test Method for Evaluation of Automotive Engine Oils in the Sequence IIIE Spark Ignition Engine
ASTM D5800, Standard Test Method for Evaporation Loss of Lubricating Oils by the NOACK Method
ASTM D5844,  Standard Test Method for Evaluation of Automotive Engine Oils for Inhibition of Rusting (Sequence IID)
ASTM D6082, Standard Test Method for High Temperature Foaming Characteristics of Lubricating Oils
ASTM  D6202,  Standard Test Method for Automotive Engine Oils on the Fuel Economy of Passenger Cars and Light-Duty Trucks in the Sequence VIA Spark Ignition Engine
ASTM D6335, Standard Test Method for Determination of High Temperature Deposits by Thermo-Oxidation Engine Oil Simulation Test
ASTM D6417, Standard Test Method for Estimation of Engine Oil Volatility by Capillary Gas Chromatography
ASTM  D6557,  Standard Test Method For Evaluation of Rust Preventative Characteristics of AutomotiveEngine Oils
ASTM D6593, Standard Test Method for Evaluation of Automotive Engine Oils for Inhibition of Deposit Formation in a Spark-Ignition Internal Combustion Engine Fueled with Gasoline and Operated Under Low -Temperature Light-Duty Conditions
ASTM D6616,  Standard Test Method for Measuring Viscosity at High Shear Rate by Tapered Bearing Simulator Viscometer at 100°C
ASTM D6837,  Standard Test Method for Measurement of Effects of Automotive Engine Oils on Fuel Economy of Passenger Cars and Light-Duty Trucks in Sequence VIB Spark Ignition Engine
ASTM D6794,  Standard Test Method for Measuring the Effect on Filterability of Engine Oils After Treatment with Various Amounts of Water and a Long (6-h) Heating Time
ASTM D6795,  Standard Test Method for Measuring the Effect on Filterability of  Engine Oils After Treatment with Water and Dry Ice and a Short (30-min) Heating Time
ASTM D6891, Standard Test Method for Evaluation of Automotive Engine Oils in the Sequence IVA Spark-Ignition Engine
ASTM D6922, Standard Test Method for Determination of Homogeneity and Miscibility in Automotive Engine Oils
ASTM D7097,  Standard Test Method for Determination of Moderately High Temperature Piston Deposits by Thermo-Oxidation Engine Oil Simulation Test-TEOST MHT
ASTM D7320, Standard Test Method for Evaluation of Automotive Engine Oils in the Sequence IIIG, Spark -Ignition Engine
ASTM  RR:D02:1204,  Fuel Efficient Engine Oil Dynamometer Test Development Activities, Part II (Sequence VI Test)
CEC L-36-A-90, High Temperature/High Shear Viscosity
CEC L-40-A-93, Evaporative Loss of Lubricating Oils
DOD CID A-A-52039A, Lubricating Oil, Automotive Engine, API Service SG
DOD MIL-L-2104, Lubricating Oil, Internal Combustion Engine, Tactical Service
GM 9099P, Engine Oil Filterability Test (EOFT)
GM 9099P, Engine Oil Filterability Test (EOFT) (Modified), May 1980
JPI 5S-41-93, Evaporative Loss
SAE J183, Engine Oil Performance and Engine Service Classification (Other Than “Energy-Conserving”)
SAE J300, Engine Oil Viscosity Classification
SAE J357, Physical and Chemical Properties of Engine Oils
SAE J1423, Classification of Energy-Conserving Engine Oil for Passenger Cars, Vans, and Light-Duty Trucks

Thursday, 31 July 2014

Merawat Rantai dengan pelumasan yang optimal

Selama ini kita sering salah kaprah dalam melakukan pelumasan pada rantai motor kita, termasuk saya sendiri. Setelah nonton video youtube tentang bagaimana cara melumasi rantai motor dgn benar, barulah saya paham bagaimana. Biasanya kita melumasi dengan sekedar memberikan oli atau pelumas chain lube secara spartan di rantai motor kita. itu kurang baik, karena pelumasan ga optimal dan cenderung kotoran jadi cepat nempel di rantai. nah kotoran inilah yg bikin gear jadi cepat aus dan rantai jadi harus sering dilumasi.

Untuk memulai kita perlu 

  • Bensin , untuk merendam rantai dan membersihkan kotoran di rantai. prosedur ini hanya tambahan saja kalau sebelumnya pelumasan rantai kita asal asalan dan banyak sekali kotorannya. jadi dibersihkan total dgn bensin/solar rantainya sampai ke rumah gear depan dan gear belakangnya. kalau kondisi rantainya dan rumah gear serta gearnya ga terlalu kotor sekali, cukup dengan chain cleaner.
  • Chain cleaner
  • Chain lube, cari yg bahannya dari oli (oil based) supaya lebih melekat dan tahan lama. hindari chain lube seperti carrera, kit, wd40, dan sejenisnya. klo rantainya tipe O-Ring, pakai chain lube yg cocok utk O-Ring
  • Silicone Spray, untuk melapisi supaya kotoran, debu, dan air ga nempel. 
  • chain bush (sikat rantai 3 sisi), untuk nyikat rantai. 
semua bahan diatas bisa di cari di ACE Hardware. Merek tidak harus seperti yg di foto, tapi carilah yg bahannya bagus dan mudah dicari.

Proses pembersihan:

  1. Lepas rantai dari motor lalu rendam dalam bensin. sikat sikat hingga semua kotoran ga ada lagi menempel di rantai. lalu keringkan dan lap hingga bersih.
  2. Bersihkan gear dan bagian bagian disekitar sistem rantai dari minyak, oli, dll agar tidak menempel di rantai.
  3. Gunakan kain yg lebar untuk alas, lalu semprotkan Chain lube secara merata di sisi sisi rantainya, lalu lap sisa semprotannya di rantai dengan kain bersih supaya ga ada yg tersisa. karena yg tersisa ini bisa bikin debu dan kotoran nempel. 
  4. Gunakan Silicone Spray untuk secara merata ke seluruh permukaan rantai, klo rantainya tipe O-ring maka bagian karet harus turut terkena silicone supaya karetnya ga getas dan tetep terjaga kelenturannya. 
  5. lap hingga bersih semua sisa silicone berlebih di rantai, setelah itu pasang kembali rantai di motor. 
  6. kalau dalam proses pemasangan rantainya terkena kotoran lagi, gunakan chain cleaner lalu lap hingga bersih. kemudian ulangi proses nomor 3 - 5 langsung pada rantai tanpa perlu melepas. 
kalau prosesnya benar, rantai akan jadi bersih, dan pelumasan jadi sangat optimal. terbukti dengan rantai yg awet, ga cepat naik setelan, dan lebih senyap, juga lebih jarang kotor. dengan prosedur ini, pelumasan akan awet lebih 500km atau bisa sampai sebulan. kecuali kalau sering kehujanan, maka pembersihan dan pelumasan harus lebih rutin minimal seminggu sekali tanpa harus melepas rantai, cukup dgn chain cleaner dan chain lube + silicone spray saja.




kalau ga nemu silicone spray gimana? pake silicone yg buat jaket kulit/jok seperti kit semprot jg bisa, tapi ga seawet pakai silicone spray. oh iya, prosedur melepas rantai dilakukan kalau rantai dan bagian bagiannya sudah banyak oli/minyak. dengan melakukan pembersihan total, utk perawatan selanjutnya lebih mudah dan lebih awet karena kotoran ga cepat terkumpul di rantai.

dengan metode ini, rantai motor saya ga perlu di setel ulang hingga 3000km lebih. setelannya masih segini gini aja dari sejak ganti rantai baru di km 17000 hingga sekarang udah 21500km. harapan saya sampai 5000km kalau perlu 7000km tetep awet tanpa setel ulang rantai hehehe

setelan rantai awet
kerenggangan terjaga dan selalu bersih

Monday, 3 March 2014

Tips setting karburator skep DIY

Karbu PWK 34 pada Pulsar 200 NS

hari ini ane dah ganti jarum skep pake punya tiger, terus set klip-nya di posisi 2 dari bawah, ganti main jet pake 145, pilot jet pake 35, dan puteran angin 1,5. 

hasilnya, semua keluhan ane selama sebulan ini HILANG!!

penyakit gas/rpm ga mau turun ketika di geber diputaran atas (diatas 6000) hilang juga. penyakit brebet di rpm 3000-4500 juga hilang. 

tarikan tengah sampe atas sangat galak, tapi belum segalak waktu setting pertama ketika main jet masih pake 115, pilot jet 42, dan jarum skep ori, klip di tengah, puteran angin 1,5.

berhubung stok MJ cuma ada sampe 145, mesti eksperimen buat nurunin posisi klip ke paling bawah, serta nyoba puteran angin 2-2,5.

status saat ini, langsam ok di 1500 rpm, power atas ngisi terus, tengahnya sdikit kurang tapi OK, bawahnya kurang respon tapi OK.

so buat temen temen disini yg ngalamin gas/rpm ga mau turun turun, coba perhatiin di rpm atau puteran gas mana rpm-nya ga mau turun??

klo diputaran atas atau ketika dibejek spontan atau dibetot habis terus RPM ga mau turun atau turunnya lama, artinya MJ terlalu kering. mesti dinaikin.

klo di puteran tengah gas ga mau turun, artinya jarum skep terlalu kering, coba dipindah posisi klip-nya biar lebih boros. atau ganti jarum skep lebih kurus.

klo di puteran tengah brebet, berarti jarum skep minta yg lebih gendut atau pindah posisi klip lebih naik.

klo diputeran bawah RPM ga mau turun a.ka nyangkut atau turunnya lama, artinya Pilot Jet (PJ) harus dinaikin. 

klo dibejek/gas poll mendadak bunyi mesin kek teriak BOOOOOOOOWWWWAAAAAAAAAAAAAAAHHHH

artinya setting mesin kebanyakan angin, coba puter setelan angin biar lebih banyak bensinnya. klo masih tetep begitu juga, coba naikin jarum skep. klo masih juga, coba naikin main jet. .


hasil riset semalam suntuk kemarin ane berhasil menyimpulkan beberapa tips buat jetting karbu skep: (skep loh yah, vakum ga jaminan sama caranya):


NOTE: pertama kali tes, coba pake ukuran main jet dan pilot jet bawaan karbu, set puteran angin 2 putaran, dan jarum skep klip-nya ditengah. 

cari settingan pilot jet.
# tes starter:
klo di starter saat pagi/mesin dingin agak susah, tapi dibantu choke langsung nyala, artinya pilot jet dah pas. 
klo di starter saat pagi/mesin dingin gampang banget tanpa choke, artinya pilot jet terlalu kecil. mesti dinaikin
klo distarter susah, bahkan pake choke juga harus dibantu mlintir gas agak dalam, artinya pilot jet kegedean, coba turunin pilot jet-nya.

# test 1/8 sampai 1/4 putaran gas 
klo brebet kayak mau mati, berarti kurang gede pilot jet-nya.
klo brebet tapi gak mati, berarti kebanyakan bensin, coba setel anginnya, klo masih juga berarti pilot jet kudu diturunin.
klo nembak nembak berarti pilot jet juga minta dinaikin.
klo gas dilepas malah lambat turunnya atau malah nyangkut, berarti kudu dinaikin pilot jetnya lebih gede.

cari settingan jarum skep
# test dari 1/4 sampe 3/4 putaran gas.
klo brebet naiknya kayak pengen mati, terus gas dilepas turunnya lama atau malah nyangkut RPM-nya. berarti jarum skep terlalu irit, coba turunin posisi klipnya.
klo brebet tapi ga mati, berarti jarum skep posisinya keborosan, coba naikin posisi klipnya. 

cari setting main jet
#test dari 3/4 sampe full putaran gas 
klo di gas poll brebet, susah naiknya, berarti main jet kegedean minta diturunin.
klo di gas poll teriakannya kenceng banget kayak pengen nangis berarti main jet kekecilan, naikin ukurannya.


that's all.

terus buat SPECIAL CASE:

# habis di gas poll begitu gas dilepas, knalpot nembak nembak
artinya suplai bensin kurang, coba setel pilot jet sama jarum skepnya biar lebih boros.

# klo di gas mendadak dari idle sampe poll tarikannya nahan, atau brebet dulu kayak pengen mati di bawah, dan suara mesin teriaknya BOOOOOOOOOOWAAAAAAAAAAAAAAHHH artinya suplai angin kebanyakan, coba setel anginnya biar bensinnya lebih banyak, atau naikin MJ, atau geser posisi klip lebih boros. intinya bensin kurang.
#kebalikannya klo di gas poll dari idle tarikannya mbrebet dulu terus ngacir, berarti pilot jet kegedean, main jet dah oke. coba setel biar suplai bensin diputaran bawah ga terlalu besar. bisa dgn setel angin dulu, pindah klip jarum skep atau ganti pilot jet lebih kecil.

# klo di gas brebet, tapi klo ngegasnya dibantu buka choke dikit terus chokenya langsung dilepas ga bunyi brebet lagi, berarti bensin kurang, naikin ukuran main jet atau posisi jarum skep.

#klo gas dibejek mendadak terus nyembur asep hitam, berarti bensin kurang, coba setting lagi biar bensin lebih banyak.
#klo setelah di gas poll terus gas dilepas RPM-nya ga mau turun, berarti kebanyakan angin, coba cek ada celah/robek di intake manifold ga atau kebocoran di area yg terkait dgn karbu? klo ga ada, berarti kudu setting biar bensin lebih banyak.
#klo di gas poll ga mau naik, malah bunyi kayak mesin beradu, blebek blebek, tarikan mesin buerat di puteran atas, dah pasti main jet kegedean.

istilah setting di special case yg ane maksud adalah: cari puteran angin dulu, terus pindah posisi klip jarum skep, baru ganti ukuran pilot jet/main jet, klo ga berubah juga, baru deh ganti ukuran jarum skep. inget 

urutannya mesti begini dulu. biar gampang ketahuan mana yg ga benernya.

sementara ini dulu yg bisa ane share dari pengalaman ane seharian jetting 
apabila ada yg kurang tepat, atau miss, atau malah secara teknis tidak sesuai, dimohon masukannya 

==================================================
sedikit share manfaat choke buat troubleshooting karbu berdasarkan pengalaman ane selama sebulan belakangan ini, ketika kita ga yakin ini karbu brebet kurang bensin atau kebanyakan bensin. bisa dicoba dibantu dgn narik tuas choke.

caranya:

mau ngetes pilot jet? saat starter pagi hari atau ketika narik gas 1/8 - 1/4 putaran, iringi dengan narik choke sedikit demi sedikit sampe hilang gejala brebetnya. tapi klo dah mentok chokenya tetep brebet, berarti bensin kebanyakan, pilot minta turun.

mau ngetes jarum skep? gentak gas 1/4 sampe 3/4 putaran sambil dibantu buka choke secara instan (buka sekejap langsung tutup lagi). klo gejala brebetnya ilang, berarti jarum skep terlalu irit. klo kebalikannya jarum skep minta diborosin.

mau ngetes main jet? gas poll sampe mentok (3/4 putaran gas keatas) atau rpm timit tertinggi. tarik dan tahan chokenya sdikit demi sdikit sampe gejala brebetnya ilang. klo yg terjadi malah makin brebet berarti main jet kegedean, klo brebetnya ilang berarti main jet minta dinaikin.

buat kasus gas rpm ga mau turun, naik turun, ga langsam, juga bisa dibantu identifikasi pake choke.

misalkan, dari gas poll gas dilepas malah ga mau turun, tarik choke-nya. klo ditarik chokenya mau turun, berarti main jet kekecilan.

klo di gas rendah rpm juga ga mau turun, setelah tarik choke mau turun, berarti pilot jet minta naik.

klo di puteran tengah gas nyangkut ga mau turun, setelah tarik choke baru mau turun. berarti jarum skep terlalu irit.

nah klo langsam susah tapi dibuka choke dikit aja malah gampang langsamnya, berarti pilot jet kekecilan, kebalikannya klo langsung mati berarti kegedean 

selamat jetting 

klo bingung, ini bisa jadi panduan 

Carburetor Tuning
sumber: tulisan saya sendiri di kaskus

Friday, 28 June 2013

Received WS-I BP non-conformant Unquoted SoapAction HTTP header

It is actually a simple problem where you do not give a quote (") String in your SOAPAction HTTPHeader. It takes time for me to googling the solution because whenever I query Google, it seems like no direct discussion about the problem. Here I write down the solution directly for you.

Just put String SOAPAction = "\"getUserProfilePhoto\"" . This \" will add quotes to your HTTPHeader and the irritating warning will gone forever.

Tuesday, 18 June 2013

Solving High CPU Usage when running Virtual Box Guest

I have been using 2 virtual machine guest to separate my office work  and my daily life in one laptop. Both are always up together during office hour. I had experience very high CPU load even when they are idle. I check event viewer at my Win 7 guests, they just log high CPU up to 99%, then I started to look for Virtual Box system setting. There I found Execution Cap setting and PAE/NX check box which made significant result when I reduce the setting and uncheck it.


I hope this can be helpful to anybody who experience similar problem with high CPU load when running Virtual Box. Previously my laptop will use around 40 - 60% CPU when both Virtual Box Guests are idle, but now it can rest and relax at less than 10%

Cheers.

Wednesday, 17 April 2013

Integrating Eclipse Dynamic Web Project with Struts 2 and Maven and DWR



Note: To see code snippet in this post, use either Google Chrome or Mozilla Firefox.
I have walked through all google results (figuratively) to find a way to integrate Struts2 with DWR and make integration for maven with Dynamic Web Project. Because most of the tutorial will shows you how to create Struts2 or DWR project with either maven or dynamic web project. Why not using both? So, my goal here is to create a dynamic web project with maven to manage its library dependency and making an orchestra between struts2 framework and DWR to work together.

Here my friend take the guide to set up a dynamic web project in eclipse and use maven for dependency management. You will learn how to create a struts 2 project and also integrate direct web remoting  (dwr) library in it. I assume you already have following setup in your environment:
  1. Eclipse IDE 3.7 (Indigo) because I avoid using Juno since it has some significant bugs
  2. M2E plugin installed in your Eclipse 3.7
  3. DWR 3.0 RC library (I avoid using one provided from maven repository due to some error)
  4. JDK 1.7 (I am using JDK 7)
  5. Tomcat 7
Create New Dynamic Web Project
  1. Click and Select on File > New > Dynamic Web Project
  2. Put Project Name TestWeb and Click Next. Then Change the default build output folder into WEB-INF
  3. Click Next then check the option Generate Web.xml and click finish


Creating required folder for Maven
Before converting to Maven Project, we need to prepare what is missing for standard maven directory structure. Because Maven will have standard directory as:
  • src/main/java : all your java code here
  • src/main/webapp : all your web files here including WEB-INF folder
  • src/main/resources : this is optional, but lets create this folder to store struts properties and xml configuration
Take a look at our folder structure created from Eclipse Dynamic Web project. We will remove the WebContent folder and create the folder above in the existing src folder. 

The picture is original web folder and some instruction which folder to remove and what folders to create on which folder. To create new folder, simply click on the TestWeb root folder, and select New > Folder. Create the main folder first, and then under that main folder, you create java, resources, and webapp folder. 

So the final result of your folder structure will be like this:

Converting to Maven Project
After the maven's required folder is created, convert the project by right-clicking on the TestWeb root project folder, select Configure > Convert to Maven Project. On the window dialog Create New POM don't forget to select WAR as packaging method.


The package Name can be whatever you would like to prefer, so it is not mandatory to follow the naming with com.aryabisma prefix. Click Finish and the final result must be like this with errors:


Modifying Project Properties setting 
Next we need to modify some project properties setting to remove errors and make the project works. 
Right-Click on TestWeb root project folder then select Properties
  1. Change Project Facets Java to 1.7, then apply
  2. Change the Deployment Assembly with the following setup

  3. Change Java Compiler with JDK Compliance level 1.7, don't forget to uncheck the compliance first.
  4. Create folder WEB-INF/lib in src/main/webapp so that it become src/main/webapp/WEB-INF/lib and put DWR library there.
  5. After that, open project properties again and select Java Build Path, then open tab Library. select Add Jars then navigate to the dwr.jar we put on src/main/webapp/WEB-INF/lib. Hit Ok
  6. Remove the resources folder in the source tab under Java Build Path properties in Project Properties. So the result will be like this.
  7. I almost forgot to tell you that we need to change the JRE System Library int jdk 7, the one that we use for eclipse. So in the Project Property dialog, open tab Libraries, remove the JRE system library (1.5), then click on Add Library, select Jre System Library, and  select Workspace defaule JRE (1.7) 
Add Struts 2 and DWR Dependency
We already have the initial setup for Dynamic Web Project with Maven dependency management, now we add struts library and its dependencies. Put these code in your pom.xml 
pom.xml

Create Configuration File for Web deployment, and DWR
Now create a dwr.xml on the src/main/webapp/WEB-INF folder. Put these line in that file.

dwr.xml

Next, create web.xml on the same location with dwr.xml. Copy these line into that file.

web.xml



Now your webapp structure should be something like this.


Create Java class and jsp for DWR 
Create package com.aryabisma.asyncjava and make AsyncProcessor.java file with these line

AsyncProcessor.java

If you modify the package name and the java class name, you should modify the dwr.xml creator configuration to match with your new naming. Now Create the index.jsp file on src/main/webapp folder to make a call to method in AsyncProcessor.java as defined to be AsyncProcessor javascript in dwr.xml. Put these line in that index.jsp.

index.jsp

Create Java class and jsp for Struts2
Create package com.aryabisma.struts2 and make LoginAction.java file with these line.

ActionLogin.java

Create Login.jsp file with these line to make a form with action that mapped to ActionLogin.java controller

Login.jsp

Create Welcome.jsp for result page after the login action.

Welcome.jsp

Create ApplicationResources.propertiesunder src/main/resources folder. This file hold all the labeling and message text used in Login.jsp and ActionLogin.java, so that you have centralized place to manage all the labeling and message text.

ApplicationResources.properties

Create struts.xml to save mapping of action along with its success and error result.

struts.xml

Final Project Structures and Deploying to Tomcat Server
Now, your final project structures should be similar like this at least.



It's time to build the project and deploy it into Tomcat Server. To build the project, right click on the TestWeb root folder, then select Run As > Maven Install. you can deploy it manually to tomcat server or select Run As > Run on Server in eclipse. The final result must be similar to this demo page.

FYI: I still have problem with the integration due to struts filtering. So that, whenever you enable DWR debug as true, and try to see the exposed methods at /dwr/ web path, you will hit 404 no action mapped. But, if you remove the struts2 filter it will works and you can see the exposed dwr method.

Tuesday, 9 April 2013

In to the Cloud: Jelastic, Java and Php in the Cloud

Cloud, Cloud everywhere. Believe it or not, in less than 5 years Cloud has becoming a very vibrant technology. Apart from its purposes that provide accessibility everywhere anywhere for individuals, this technology helps raising small to large scale enterprise businesses to reach effectiveness and save costs. Prior to Cloud, SMEs have to spent more costs in IT infrastructure just to run their own business critical application. Hiring Network professionals, dealing with vendor for servers and networking hardware, managing down time to setup and maintain their infrastructure to keep their system online. Just imagine how painful it was, how much time they spent to troubleshoot, mitigate, and maintain infrastructure to support their business application. Unless your business is providing Iaas and PaaS like most of Cloud vendor does, this is non-sense to your business nature.

Jelastic is Cloud that provide Java and Php platform as a service. But it is far better because it also provide Virtual Dedicated Server in which you will have root access to the server, like a virtual private server, but with very very transparent an manageable costs that you can control from the OS level to application level. You can set up load balancing, high availability, application server environment, etc through its easy to use web interface. Develop and deploy to Jelastic with a few simple click to setup the environment, or clone the existing environment. That's all, what are you waiting anymore? stop that bloody painful back end management and let them do that for you, unless you really want to have in-house back end system. With 7 Euro/month (according to my lowest topology setting ) it is worth it to be your own research and develop or hobby environment. For bigger usage or SMEs, these setting can be adjusted for more performance, you don't need to invests much money and deal with headache to plan system migration whenever you have hardware upgrades or failures.  Here is a video about Jelastic and screenshots from my Jelastic account.




Monday, 8 April 2013

HOW TO: Set Tomcat 7 runtime in Eclipse

It is pretty handy to manage your run time server from within IDE, so you can handle development easily and focus on it. Here I show you how to set it on Eclipse.


  1. Go to Server tab at the bottom of your eclipse, or you can open it by opening Window > Show View > Others then search for servers. yes click that, and click new server wizard.

  2. On the next window, you select the target runtime for tomcat 7, and click next. 
  3. on the next page, you browse for the installation folder of your Tomcat and select the JRE, to set up custom JRE go to step 4 by clicking the installed JRE, otherwise just select workbench default jre just skip to step 5.
  4. To add new JRE, click add button. and then select the Standard VM, then find for the directory where you put your preferred JDK, and click finish.
    after you click finish here, then you click Next then Finish at the window shown in point 3, or just click Finish there.
  5. There is your server already set up.
    Tadaaaaa... congratulation. It is done.

    But Wait, It does not work fine... Trust me
    Eclipse will copy the configuration file of tomcat server into your workspace and then whenever you start the server, it will show server started, but when you hit http://localhost:8080 it will show 404 page not found. so Whats wrong? actually we should tell eclipse to use the existing server configuration as in your existing server installation. 

    Double click the server there, and in the server overview, look at the server location, then select the second option to use the tomcat installation. 
    That is it, now start your server and check it on the browser.

    Note: I use eclipse Indigo, but this how-to should apply to any version of eclipse. should you have any question, just post on the comment.


Thursday, 4 April 2013

How entrepreneurs can ruin technology company?

Image courtesy of inc.com
The title is obvious, isn't it? how come you run a company without entrepreneurs? doesn't it good that you need entrepreneurship to keep your company in business? well, the answer it not always. Especially in company that rely on technology as its domain business and should keep innovation as the heartbeat of its selling point to the market. Technology by any means is talking about innovation that may lead into discovery and invention of something new, something different, and something that will provide advantage and better way of life for businesses or individuals. It does risks the company with business loss if the innovation failed in the market, but everything has risks and you can mitigate risks by doing market research while the idea is in incubation stage before it is out into the wild. When your company sold to bigger company who might not know what is technology and only concern the revenue gained from your existing products, then you are doomed. Your creative and innovative driven culture can be swapped into more formal, meeting-driven and profit driven culture.


Why startups company can bring many ideas and innovation into beautiful products and services? because they have small team, less leadership board, which means people do not need to hesitate to speak up their ideas, and there are not many leaders and management to be convinced to take these ideas up. They just sit together with the team as equals, talk about how to do it, what are improvements or advantages of making this idea into product, and woalah, innovation come out. Do you remember the law suit case between Apple and Samsung, and how some people talked that the top leader of Samsung wanted the Galaxy to be as beautiful as iPhone and no one could argue him to come with different idea that might be better than iPhone. That is just a small example, another example is when your startup company is growing and big venture buy your company, it does not really good idea somehow, because when the innovation culture turn into business culture that put revenue as main currency instead of beautiful innovation, then  you will regret your decision to sell your startup company.

Entrepreneurs are risking their business if they keep doing the old-fashioned management style for tech-company. Old-fashioned business, in my own words, is doing too much meetings, too much thinking, and too much leadership that will cause innovation and ideas bottleneck. Instead of following where the money flows, why don't we make the money flows to us. But how? at the old time, CEOs take action based on the markets. But now everything changed, especially for startup company. You take action based on innovation, and let the market shaped by itself and flows the money to your company revenue.



Wednesday, 3 April 2013

How To: MySQL - Set Global variable for Maximum Allowed Package

You should feel bad if you are going to import data which file size is quite big and MySQL would not accept the query because the package data being sent is too big from the maximum allowed setting. To fix this, you can set variable max_allowed_packet to accommodate the query size of your data. Here the command to run in query:

SET GLOBAL max_allowed_packet=32*1024*1024
run that command in your open connection, and that connection session will allow for a maximum 32 GB package size. but you should remember that this setting will be reset if close the connection or restart the server. To make it persistent after restarting MySQL, you should change/add this variable value to the configuration file of MySQL. In windows you can find file my.ini at your MySQL installation folder, and in Linux you can find it at /etc/my.cnf . Append this line at the end of the file:

max_allowed_packet=4096M
Try to restart and check if now you are able to sent big query size. If it still not working, try to set bigger value.