EJB Example Needs Improvement
"Rod Macpherson" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks to EJBDoclet the sample osworkflow has an EJB entity bean option with JBoss 3.X support. This allows us to change the database connection in one place (the deployment descriptor for the entity beans) to connect to our own datasource. Unfortunately this does not achieve the desired result because the embedded osuser has its own EJB interface so no you have to change the datasource in two places and the latter (osuser) it burried in the example EAR build. OK, so you have to specify the datasouce twice, no big deal. The problem is there is no JBoss 3.X descritor for osuser. They do not build using EJBDoclet but rather provide hard-coded JAWS descriptors for an older version of JBoss. To add to the confusion there are two tables created in the sample osworkflow SQL scripts called OS_USER and OS_GROUP but that is NOT what the descriptors in osuser look for; they look for OSUSER and OSGROUP. Moreover, why does the osworkflow example have table creates for osuser stuff? This whole datasource issue could be resolved by allowing it to be specified as part of the EJBDoclet task in BOTH osuser AND osworkflow and perhaps building both osuser and osworkflow together. What about the property stuff? Probably the same issue there. As long as you are using in-memory (not a useful option for us) you are fine but there seems to be a lack of coordination between the components when trying to sync them all up to the same datasource. The README-JBoss-3.txt tried to remedy this problem but now that document is useless because they ask you to update files that do not even exist anymore: Setting up the OSWorkflow example ---------------------------------------------------- 1. Extract osworkflow..war to an empty directory.. 2. In the file .../WEB_INF/classes/osuser.xml adapt all DataSource lines to ... WHAT? There is no such file. Here is my question: can we not ditch osuser and use osworkflow stand-alone? Barring that can we get an osuser build that uses EJBDoclet and thereby generates up-to-date descriptors for whatever platform? This would entail adding XDoclet tags to the osuser EJBs. I will try this myself and perhaps we could check it in? It would really be nice to specify the application server and datasource in ONE PLACE and there is no reason why that could not be done.