[jbpm-commits] JBoss JBPM SVN: r1580 - jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Jul 10 13:55:37 EDT 2008
Author: alex.guizar at jboss.com
Date: 2008-07-10 13:55:37 -0400 (Thu, 10 Jul 2008)
New Revision: 1580
Modified:
jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java
Log:
restored the ability to create a jbpm configuration in the abscence of an external configuration resource, without an exception being thrown
Modified: jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java
===================================================================
--- jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-07-10 17:53:01 UTC (rev 1579)
+++ jbpm3/trunk/modules/jpdl/core/src/main/java/org/jbpm/JbpmConfiguration.java 2008-07-10 17:55:37 UTC (rev 1580)
@@ -278,12 +278,13 @@
log.info("using jbpm configuration resource '"+resource+"'");
InputStream jbpmCfgXmlStream = ClassLoaderUtil.getStream(resource);
- // if a resource SHOULD BE used, but is not found in the classpath
- // throw exception (otherwise, the user wants to load own stuff
- // but is confused, if it is not found and not loaded, without
+ // if a custom resource is to be used, but is not found in the classpath
+ // log a warning (otherwise, users who want to load custom stuff
+ // will be confused if the resource is not found and not loaded, without
// any notice)
- if (jbpmCfgXmlStream==null)
- throw new JbpmException("jbpm configuration resource '"+resource+"' is not available");
+ if (jbpmCfgXmlStream==null && !"jbpm.cfg.xml".equals(resource)) {
+ log.warn("jbpm configuration resource '"+resource+"' is not available");
+ }
ObjectFactory objectFactory = parseObjectFactory(jbpmCfgXmlStream);
instance = createJbpmConfiguration(objectFactory);
More information about the jbpm-commits
mailing list