jBPM deployer
tom.baeyens May 18, 2005 11:31 AMI'm looking for the best way to get the JbpmSessionFactory in JNDI via the JBoss deployment stuff. ('stuff' indicates not-yet-crystal-clear :-)
I thought that the easiest way was to reuse the HAR deployer. But that seems to have 2 problems for me ...
1) the HAR deployer always scans for the mapping files by calling Configuration.addJar(). And this is *not* what we want because the jBPM .jar contains *all* possible .hbm.xml mapping files. Users will *not* want to use all of the mapping files.
The HibernateService in the hibernate codebase seems to have a manged property to specify the list of mappings... Could that be usefull ? How does that MBean relate to the jboss deployer ?
Ideally, i would like to configure the SessionFactory with the traditional hibernate.cfg.xml somewhere in the deployed archive.
2) The next i'm not certain about. How will user code in webapps and ejb's see my classes ? The classes loaded by an MBean are only visible in that MBean, right ? Are the persistent classes visible to the user code because of the unified class loader ? If yes, will users see those persistent classes if they start isolating their classloading ?
I prefer not to depend on the unified class loader since that can be switched off. So the jbpm.jar (containing the jbpm persistent classes) can be put in the lib folder ?
creating our own JbpmDeployer from scratch seems like the easiest solution. E.g. we could just create a hibernate configuration from a hibernate.cfg.xml file, then create a JbpmSessionFactory from that and then publish that in JNDI.
am i making any sense ?
This is what i found so far... any pointers to what i should read first are appreciated.
http://docs.jboss.org/jbossas/jboss4guide/r1/html/ch2.chapter.html#ch2.scopedapp.ex
http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCases
regards, tom.