วันศุกร์ที่ 20 มีนาคม พ.ศ. 2552

The ways to deal with non-transactional resources

There are serveral ways to deal with them.
1. Interaction without regard to transactionality. This approach is appropriate when there is no need for transaction management.
2. Development of transactional interfaces. This approach is the most comprehensive, but also the most time consuming because it needs to implement JTA interfaces (implementation of javax.transaction.xa.XAResource).
3. Implement the interactions in a “pseudo-transaction” that explicitly checks for and manages error conditions and rollback. I thought this approach like transaction in the web service which have to implement method for rollback by yourself.
In the detail, you can read at TheServerSide.

วันพฤหัสบดีที่ 19 มีนาคม พ.ศ. 2552

Problem from using JPA in grails with maven

I got this problem when i called $mvn grails:run-app.
[groovyc] Compiling 9 source files to /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/target/classes
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Compile error during compilation with javac.
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:3: package javax.persistence does not exist
[groovyc] import javax.persistence.Entity;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:4: package javax.persistence does not exist
[groovyc] import javax.persistence.GeneratedValue;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:5: package javax.persistence does not exist
[groovyc] import javax.persistence.GenerationType;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:6: package javax.persistence does not exist
[groovyc] import javax.persistence.Id;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:7: package javax.persistence does not exist
[groovyc] import javax.persistence.Version;
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:26: cannot find symbol
[groovyc] symbol: class Entity
[groovyc] @Entity
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:28: cannot find symbol
[groovyc] symbol : class Id
[groovyc] location: class org.grails.samples.Person
[groovyc] @Id
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:29: cannot find symbol
[groovyc] symbol : class GeneratedValue
[groovyc] location: class org.grails.samples.Person
[groovyc] @GeneratedValue(strategy=GenerationType.AUTO)
[groovyc] ^
[groovyc] /media/src/source/Eclipse/TestFrameWork/workspace/groovy/my-app/src/java/org/grails/samples/Person.java:31: cannot find symbol
[groovyc] symbol : class Version
[groovyc] location: class org.grails.samples.Person
[groovyc] @Version
[groovyc] ^
[groovyc] 9 errors
[groovyc]
[groovyc]
[groovyc] 1 error
Compilation error: Compilation Failed

It seems javax.persistence does not exist in maven dependencies of grails-maven-archetype 1.0.
To fix this problem, I added ejb3-persistence in pom.xml.

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.2.GA</version>
</dependency>

วันเสาร์ที่ 7 มีนาคม พ.ศ. 2552

Why cannot i play Patapon?

When I played this game, My PSP was freeze at loading screen.
I found that this game needs firmware 3.71 up and sets UMD ISO MODE to SONY NP9660,
but my firmware is 5.00 m33-6. Why is still not working?
In the end, I try changing the image file from CSO to ISO format.
yahh!!!! It's workkkkkkks.