Hello. I am beginner in JSF (only have created two projects with Glassfish and Icefaces using Netbeans). I have created a medium sized project (web application) following a very basic process: implementation of a database, generation of entities from the database schema, generation of "JPA controllers" (netbeans) from the generated entities and effort focussed on presentation layer and bussiness logic. The goal was achieved, however my client needs scheduling of some control tasks. I have made two prototypes using Quartz: both quartz schedulers are started when application is deployed, the first approach was to duplicate some persistence entites and call their methods from within the quartz job (i could not reference the JPA controllers from the Quartz job); the second approach was using a specific Quartz job (SendQueueMessageJob) and send messages to an Message Driven Bean, also duplicating some entities (i could not reference the JPA controllers from the MDB).
My questions are focused in code reuse:
* Is there a way of calling the JPA controllers from within the Quartz job? (The JPA controllers are container managed).
* Is there a way of calling the JPA controllers from within the Message Driven Beans?
* I must redesign my application to improve code reuse? If i must do it, what design guidelines i could follow?
Thanks in advance.
[Message sent by forum member 'gxcr']
http://forums.java.net/jive/thread.jspa?messageID=476801