Mantis - Resin
Viewing Issue Advanced Details
5480 minor always 07-05-13 22:12 07-08-13 10:52
rickHigh  
ferg  
normal  
closed  
fixed  
none    
none 7.0.0  
0005480: Resin 7: Issue with @Journal (this may be a usage issue)
Steps to repeat:

1) clear db

$ cd /var/resin/resin-data
 
$ pwd
/var/resin/resin-data

$ sudo rm -rf *


2) Build example and deploy

In git repo under:
resin/examples/makaiExample

Follow instructions at: (repeated here)
http://windansea.caucho.com/cauchowiki/Wiki.jsp?page=MakaiSamples [^]

Install resin jar files:

$ mvn install:install-file -Dfile=resin.jar -DgroupId=com.caucho -DartifactId=resin -Dversion=7.0.s130705 -Dpackaging=jar

$ mvn install:install-file -Dfile=javaee-7.jar -DgroupId=com.caucho -DartifactId=javaee-seven -Dversion=7.0.s130705 -Dpackaging=jar

under git://resin/examples/makaiExample [^]

$ mvn clean install -Dresin.webapps={location.of.resin.webapps.dir}

This creates a simple.war file in /var/resin/webapps (or where you decide this is for you)

3) Run Resin

$ sudo resinctl console

Notice that service will not start up and there are no error messages in log.

Now remove @Journal from
git:///resin/examples/makaiExample/simpleSaveJournal/src/main/java/com/example/TaskService.java [^]


Also comment out the following lines

    @OnCheckpoint
    public boolean checkpoint() {
        System.out.println("CHECK POINT CALLED");

        save();
        return true;
    }

    @OnStart
    public boolean onStart() {
        System.out.println("ON START CALLED");
        read();
        return true;
    }

git:///resin/examples/makaiExample/simpleSaveJournal/src/main/java/com/example/TaskService.java [^]

Now run this again:

This time it will work (except no Journal).

4) Go to task sample app and add tasks

http://localhost:8080/simple/ [^]

You will be able to add tasks.

Add some tasks.

Hit the Save button.
Hit the Read button (the tasks are read from the backing store).

Now shutdown Resin and the tasks will still be there.

After you shutdown Resin, go back to http://localhost:8080/simple/ [^]

Hit the Read button

Hit the Show Tasks button.

The app reads and writes but the Journal is not working (could be coded wrong, and is likely to be coded wrong).




Notes
(0006283)
ferg   
07-08-13 10:52   
makai/9050