Currently there is a bug in JBoss EJB3 which meant that it was hard to write a Home object using EJB3. This is probably already fixed.
So follow the contactlist example (which does not use EJB3) to see how to use plain JavaBean components, or just let seam-gen generate everything for you.
Ok, the contactlist provides an example for the declarative use of the class via fwk in the components.xml - is it actually possible right now to use plain javabeans for the implementation (with not only the managed part being javabeans, but also the controller e.g. ContactHome is implemented as a POJO)?!
And even if it is possible: If we want to write a ContactHome as a Stateless/Stateful SessionBean, the LocalContactHome still needs all the methods like getInstance, setId etc. on it's interface: An interface with all the methods, which are now only on the abstract classes, would still come in handy for that case....
Try out "seam generate-entities".
I can't use "seam generate-entities"
our DB has about 3000 tables and views.
(with views in Sybase 'seam generate-entities' don't work properly)
It would be nice make this call
seam generate-entities <table1 table2 table3>
I have to use StoredProcedures.
To call it, I make injection
Connection conn = ds.getConnection();
CallableStatement cs = conn.prepareCall(sql);
but with POJOs it didn't work :(
Seam-gen allows one to quickly generate a lot of functionalities. However, EntityHome objects are used instead of session beans.
The only available example for using EntityHome objects is seampay, but this example is not described in the documentation or available books.
Adding documentation/examples for using seam-gen and EntityHome would be very useful.
Do you plan to do this?
dvdstore, contactlist, and ui also use EntityHome declaritively in components.xml.