[jboss-user] [JBoss jBPM] - Re: dual jbpm context

tbeernot do-not-reply at jboss.com
Tue Jan 6 08:17:26 EST 2009


"tbeernot" wrote : When trying to parse a ProcessDefinition from String using the static parseXmlString, underwater JbpmConfiguration.getInstance() is called. 
  | 

The problem basically is with the static ProcessDefinition.createNewProcessDefinition; it accesses a static inner class Configs:

    String resource = JbpmConfiguration.Configs.getString("resource.default.modules");

That will result in trying to get the factory, which will see if an instance is available via the depricated method:

    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();

Which ends up in JbpmConfiguration.jbpmConfigurationsStacks (a ThreadLocal variable).

If no instance is available, it will generate the default one, thus accessing jbpm.cfg.xml.

The approach would then have to be to push the active configuration on the thread local stack before each call and pop it afterwards. 

This does not feel right.

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

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



More information about the jboss-user mailing list