-
1. Re: hibernate AnnotationConfiguration rather than Configurat
crussell42 Feb 1, 2007 10:34 AM (in response to crussell42)-or- have a configuration class property in jbpm.cfg.xml which allows us to specify what configuration class to use?
jbpm.session.factory.configuration.class="org.hibernate.cfg.AnnotationConfiguration"
That way if it is a hibernate version issue, the default could be just Configuration. -
2. Re: hibernate AnnotationConfiguration rather than Configurat
crussell42 Feb 3, 2007 1:46 PM (in response to crussell42)IT WORKS!
After much head banging and incorrect assumptions I think I have it.
Please developers of jbpm can you look at this seriously as a means of persisting annotated pojos.
In HibernateHelper I added the following codeimport org.hibernate.cfg.AnnotationConfiguration; import org.hibernate.cfg.DefaultComponentSafeNamingStrategy; . . public static Configuration createConfiguration(String cfgXmlResource, String propertiesResource) { AnnotationConfiguration configuration = new AnnotationConfiguration(); //NOT SURE WHY BUT configuration not picking up //hibernate.cfg.xml //<property name="hibernate.ejb.naming_strategy"> //org.hibernate.cfg.DefaultComponentSafeNamingStrategy</property> log.debug("NAMING START STRATEGY ["+configuration.getNamingStrategy().getClass().getName()+"]"); log.debug(configuration.setNamingStrategy(new DefaultComponentSafeNamingStrategy())); log.debug("NAMING AFTER STRATEGY ["+configuration.getNamingStrategy().getClass().getName()+"]");
With these changes you can now add mappings to the hibernate.cfg.xml
such as<mapping package="foo"/> <mapping class="foo.MyAnnotatedFooClass"/>
To pick up annotated classes....
Now I also had to put my classes in jbpm-jpdl.jar but I will figure out the class loader issues later.
Net effect: my annotated classes persist where I expect them to. -
3. Re: hibernate AnnotationConfiguration rather than Configurat
aguizar Feb 3, 2007 3:48 PM (in response to crussell42)Sounds like a neat, easy-to-add feature. Why don't you create a feature request in our issue tracking application?
http://jira.jboss.com/jira/browse/JBPM
Please reference this forum topic from your request. -
4. Re: hibernate AnnotationConfiguration rather than Configurat
crussell42 Feb 4, 2007 10:17 AM (in response to crussell42)Submitted as feature request to jira
http://jira.jboss.com/jira/browse/JBPM-832 -
5. Re: hibernate AnnotationConfiguration rather than Configurat
tom.baeyens Feb 5, 2007 2:50 AM (in response to crussell42)i'll ask the hibernate guys about the 'why'... if it makes sense (which i assume it will), i'll include it