Updated Source Code Download for the Book
NOTE: The final version of the book is updated to Seam 1.2 to include the security framework etc.
Okay guys, sorry for the delay. I finally completed the book — it is updated to include cool Seam 1.1.5 features, and is now 400+ pages. The book is now in production and should be in book stores everywhere in the US in April. I think Safari Rough Cut will probably update its PDF to the “final” version of the book a couple of weeks before the physical book appears. So, buy it on Safari if you cannot wait.
In the meanwhile, I will release the latest sample applications. Download it here. Please let me know if you have any comments. Thanks!
February 15th, 2007 at 1:45 pm
Hi Michael.
The status of pdf book at Safari Rough Cut is reporting: Last Updated on Safari: 2007/02/15.
I’ve already bought it some time ago and downloaded now again. The pdf is 196 pages (you have said that the hard book is 400+ pages). Is this pdf really the final version?
Sorry if I’m missing something…
Thanks a lot,
Francisco Antônio
Brazil
February 15th, 2007 at 1:59 pm
Hi Francisco,
Sorry, Safari Rough Cut takes some time to convert the docbook XML to PDF. So, you will have to wait a couple of weeks before the final PDF can show up there. Sorry for the confusion.
Also, the printed page count is larger than the Safari Rough Cut page count because Safari PDF are on larger paper.
cheers
Michael
February 19th, 2007 at 3:53 am
Hi.,
Hats off!! for this great book. I already read the complete book and now started implementing one by one. Really an wonderful book, not just the title says simplicity but the explanation too is very simple for developers to understand. I bought it through Safari Rough cut (only 198 pages), waiting for final version (is it possible to get updated version without any extra cost?). Thanks.
February 19th, 2007 at 4:12 am
Hi Lisa,
Thank you for the kind words, and I hope you enjoy much success with Seam. Yes, you will get the final PDF from your Safari subscription.
cheers
Michael
February 19th, 2007 at 10:03 pm
I downloaded and tried the latest example source code, but was getting error running the simplest helloworld:
org.hibernate.exception.SQLGrammarException: could not insert: [Person]
I installed my JBoss/Seam following the first two chapters of your book, and configured the data source to use Postgres 8.1.
I was able to run the “booking” example that came with JBoss, but that app deploys its own booking-ds.xml, which uses the default HSQLDB.
So the problem seems related to my using Postgres. Since I am new to JBoss/Seam, I would greatly appreciate if you could offer me some tips on how to fix this…
Thanks,
Chinchih
February 19th, 2007 at 10:27 pm
Chinchih,
Open the resources/META-INF/persistence.xml file and change the Hibernate dialect from HSQL to org.hibernate.dialect.PostgreSQLDialect.
cheers
Michael
February 20th, 2007 at 5:04 am
Hi.,
The examples you described in book are very neat and clean to understand (ofcourse simple for newbies). Eventhough I got some configuration problems in building from my Eclipse IDE, now everything goes fine. I could find all example sources but what about the datamodel source code? I could see only one dir with private.xml file.
Would be nice if you could update/add all example sources that you explained in book.
Thanks.
February 20th, 2007 at 12:45 pm
The datamodel example is now in the “integration” project.
February 23rd, 2007 at 5:49 am
Hi.,
Thanks for your reply.
I used “ant tomcat” build to create a war file from the source tomcatejb3 you provided, it works fine with Tomcat (5.5.20).
I would like to have a developement envirnoment with Eclipse (Exadel) with Sysdeo Tomcat plugin (for debug and hot deploy).
So I tried your tomcatejb3 project. I put necessary properties files (default.persistence.properties,ejb3-interceptors-aop.xml,embedded-jboss-beans.xml,jboss-jms-beans.xml,jndi.properties,login-config.xml,security-beans.xml,seam.properties) under my src dir (so that goes to WEB-INF classes together with .class files). And i put app.jar (from your source but .class files deleted because class files are now located inside WEB-INF/classes). It worked as I expected (with DefaultDS->HSQL). But problem started when I changed DefaultDS with an alternative Oracel Ds. I changed by following the steps in your book. Now with this configuration I’m getting Person object null and following log
12:35:35,378 WARN [QuerySplitter] no persistent classes found for query class: select p from Person p
12:35:35,393 DEBUG [JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
Any help would be highly appreciated.
Thanks.
February 23rd, 2007 at 10:53 am
Well, I think you should try one thing at a time. Perhaps you can change the datasource to Oracle DS first without moving the config files around, and see if the error happens.
Also, does changing the DS to Oracle work for deployment inside JBoss AS?
February 23rd, 2007 at 11:55 am
Hi.,
Thanks for ur reply.
Really after a complete day workaround for this problem, i found a very simple solution. Just as a normal Java web project but with a build file with creates Project’s jar file together with seam.properties and meta-infs. So after editing src files just run build from Eclipse and then restart Tomcat using Sysdeo (editing .xhtml files need no restart). Its working now as i expected.
Now problem with my Oracle DB (I changed config to use Oracle DS). On trying to save an Entity object I’m getting the following exception log:
18:42:25,291 DEBUG [Printer] listing entities:
18:42:25,291 DEBUG [Printer] Person{age=25, email=dd@email.com, comment=d, name=ddd last, id=1}
18:42:25,307 DEBUG [AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
18:42:25,307 DEBUG [ConnectionManager] opening JDBC connection
18:42:25,307 DEBUG [SQL] insert into Person (name, comment, age, email, id) values (?, ?, ?, ?, ?)
Hibernate: insert into Person (name, comment, age, email, id) values (?, ?, ?, ?, ?)
18:42:25,322 DEBUG [AbstractBatcher] Executing batch size: 1
18:42:25,322 DEBUG [AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
18:42:25,322 DEBUG [ConnectionManager] skipping aggressive-release due to flush cycle
18:42:25,338 DEBUG [JDBCExceptionReporter] Could not execute JDBC batch update [insert into Person (name, comment, age, email, id) values (?, ?, ?, ?, ?)]
18:42:25,354 WARN [JDBCExceptionReporter] SQL Error: 1747, SQLState: 42000
18:42:25,354 ERROR [JDBCExceptionReporter] ORA-01747: Ungültige Angabe von Benutzer.Tabelle.Spalte, Tabelle.Spalte oder Spalte
(english: invalid user.table.column, table.column, or column specification)
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:342)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:517)
Eventhough I set @column(name=”propertyName”) to all getter properties.
Could you please help me solve this problem.
Meanwhile, everyone needs fast and simple development envirnoment.
During production we could use build file to create EAR.
So if you have any ideas to provide such a solution (like Eclipse+Tomcat+Sysdeo for Debug/Edit/refresh), that would be great.
Thanks.
February 23rd, 2007 at 12:18 pm
Hi.,
Sorry !!
My mistake. In Oracle COMMENT is a reserved word.
Now its working pretty fine. As a next step I would like to integrate JBPM. Letz see what happens !!
Thanks
April 17th, 2007 at 9:06 am
Michael,
I just completed reading your rough-cut of the book and must thank-you for explaining how the pieces fit together. Having read “Java Persistence with Hibernate” a few couple of months ago, which introduced me to Seam, I had been struggling trying to understand Seam from its documentation and examples. Your book guided me, by stepping through the examples explaining each part.
Having spent the last few years programming in Java on custom build frameworks, I was never exposed to frameworks such as Hibernate, Seam and annotations have been a struggle trying to understand. It is very helpful to me as well as to others reading documentation that explains each part of the setup on an example. The job situation where I am isn’t good, but I want to understand these things and try to write a small software package.
I know the book is a rough-cut. There are a few things I noticed in the book.
1. The sub-sections are not numbered correctly.
2. There are a few misspelled words and words used incorrectly.
In chapter 26, you talked about the productiondb/seamdemo.sql, but it is not located within the Seam package or your example download. Where may I find this?
April 18th, 2007 at 6:24 pm
Michael,
Thank you for a great job!
Could you please tell few words about the defferece between Seam 1.2 and Seam 1.1.5?
April 18th, 2007 at 8:19 pm
Alexander,
Seam 1.2 provides support for Spring integration. It has a more refined security API than 1.1.5.
cheers
Michael