Skip to content

Commit

Permalink
Added information about server log contents to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Kiss authored and pmuir committed Mar 20, 2012
1 parent 09ccc4d commit 4d83d10
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions tasks/readme.md → tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,46 @@ managed server or 'arq-jbossas-remote' for running on remote server.
To run the tests, right click on the project or individual classes and select
Run As > JUnit Test in the context menu.

Reading output of the tests in a console
----------------------------------------

### Maven

Maven prints summary of performed tests into the console:

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.as.quickstarts.tasks.TaskDaoTest
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.31 sec
Running org.jboss.as.quickstarts.tasks.UserDaoTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.084 sec

Results :

Tests run: 8, Failures: 0, Errors: 0, Skipped: 0

### Server log

SQL statements generated by Hibernate are written into the server log.

#### Examples

Creating the database schema:

10:16:58,770 INFO [stdout] (MSC service thread 1-2) Hibernate: create table Tasks_task (id bigint not null, title varchar(255), owner_id bigint, primary key (id))
10:16:58,771 INFO [stdout] (MSC service thread 1-2) Hibernate: create table Tasks_user (id bigint not null, username varchar(255), primary key (id))
10:16:58,772 INFO [stdout] (MSC service thread 1-2) Hibernate: alter table Tasks_task add constraint FKE61757B62CC79EF1 foreign key (owner_id) references Tasks_user

Generating ID for a new entity and inserting the entity into the database:

10:16:58,956 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: select tbl.next_val from hibernate_sequences tbl where tbl.sequence_name=? for update
10:16:58,957 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: insert into hibernate_sequences (sequence_name, next_val) values (?,?)
10:16:58,958 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: update hibernate_sequences set next_val=? where next_val=? and sequence_name=?
10:16:58,960 INFO [stdout] (http--127.0.0.1-8080-1) Hibernate: insert into Tasks_user (username, id) values (?, ?)


Importing the project into an IDE
=================================
Expand Down

0 comments on commit 4d83d10

Please sign in to comment.