Friday, October 25, 2013

Grails GORM mapping id column using sequence

I work with grails 2.2.4 and legacy database. The legacy database is using postgreSQL. The primary key filed is hdsj_id (bigserial).


class TableHeaderSuratJalan {

 // a lot of field
 ...

 static mapping = {
  id column: "hdsj_id", generator: "sequence", params: [sequence:"table_header_surat_jalan_hdsj_id_seq"]
  version false
 }

}



We need to specify the sequence name, in this example my sequence's name is table_header_surat_jalan_hdsj_id_seq. By default grails will use hibernate_sequence

Tuesday, October 15, 2013

Setting max limit java heap/memory

In windows 7 create environment variable like this : 


My environment :

  • OS : Windows 7
  • JDK : JDK 7 from oracle

Thursday, September 26, 2013

How to change Grails default port

If we run : grails run-app
By default the grails will listen at port : 8080

We can change by default port by run this command :
grails run-app -Dserver.port=9000
This command will make the grails listen to the port 9000

Another way is by editing the BuildConfig.groovy
Add the following line :
grails.server.port.http = 9000

NB: I use grails 2.2.4

Monday, September 2, 2013

Friday, August 30, 2013

Enable .NET 4 on IIS 6

After installing .NET Framework 4, IIS 6 is not directly enable the .NET 4. Run this command to check : 

cd \windows\system32\
iisext.vbs /ListFile


I got a problem when enable .NET 2 and .NET 4 simultaneously. So, I disable the .NET 2 and enable the .NET 4, by run this command :

C:\WINDOWS\system32>iisext.vbs /disfile C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll



C:\WINDOWS\system32>iisext.vbs /EnFile C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll

Restart IIS and the .NET 4 should be work.

Tuesday, August 20, 2013

Thursday, August 1, 2013

How to enter WebBIOS on IBM server

My machine : IBM X3850 (maybe same with X3650, etc)

On first time use we can enter to WebBIOS by pressing <ctrl><h>, like this :


But if we already configure the RAID Controller, we can not see this screen again, we only will see this screen :

So, if we want to reconfigure the RAID Controller (accessing WebBIOS), we can press F1 to enter to the setup menu, like this :