@Test
public void addNewTraining(){
String userName = this.existingUser.getUserName();
String password = this.existingUser.getPassword();
this.entityTransaction.begin();
training.login(userName,password).
running().
today().
averagePulse(135).
comment("ok").
length(65).
maxPulse(165).
km(12).
add();
this.entityTransaction.commit();
}
You should understand the highlighted snippet, without having deep knowledge in Java EE 5 or even Java. What you do not see, are several JPA entities and a EJB 3 working behind the scenes for you. I'm working now on JSF and Swing frontend - using the MVP (rather Passive View) Pattern - this integration will be explained in the next JavaSpektrum (February) magazine (and this blog) more deeply. I will explain this pattern at the free Java User Group / Netbeans at at 24.01.2007 in Munich as well. The whole, deployable project is available freely from p4j5 (svn).