[jboss-user] [JBoss jBPM] - Re: JBPM(BPEL) conflicts (hibernate settings) with my app.

alex.guizar@jboss.com do-not-reply at jboss.com
Mon Nov 27 11:05:47 EST 2006


when you deploy resources in a service archive (.sar) they are visible to all modules. in this cause your web app detects the hibernate.properties resource from jbpm-bpel.sar and tries to apply the properties there.

try renaming the hibernate configuration files. to do so, follow the steps below:

1. edit src/config/jbpm.cfg.xml:

<jbpm-configuration>
  | 
  |   <!-- jbpm context -->
  |   ...
  |   <!-- hibernate configuration resources -->
  |   <string name="resource.hibernate.cfg.xml" value="hibernate-bpel.cfg.xml" />
  |   <string name="resource.hibernate.properties" value="hibernate-bpel.properties" />
  | 
  |   <!-- configuration resources in jbpm-{version}.jar -->
  |   ...
  |   <!-- configuration resources in jbpm-bpel-{version}.jar -->
  |   ...
  | </jbpm-configuration>

2. in directory src/resources/jbpm-bpel.sar, rename hibernate.properties to hibernate-bpel.properties

3. in directory src/config, rename hibernate.cfg.xml to hibernate-bpel.cfg.xml

4. the main build file includes hibernate.cfg.xml by exact name; change it to include all *.cfg.xml files:
  <target name="build.service.404"
  |           description="build service archive for JBoss 4.0.4">
  |     <mkdir dir="${output.root}" />
  |     <jar destfile="${output.root}/jbpm-bpel.sar">
  |       <!--libraries-->
  |       ...
  |       <!--configuration-->
  |       <fileset dir="${src.config}">
  |         <include name="*.cfg.xml" />
  |       </fileset>
  |       <!--service files-->
  |       ...
  |       <!-- web module -->
  |       ...
  |     </jar>
  |   </target>

5. rebuild and deploy the bpel service archive.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988942#3988942

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988942



More information about the jboss-user mailing list