[jbpm-cvs] jbpm.3/jpdl/jar/src/main/java/org/jbpm ...

Alex Guizar <[email protected]>
Newsgroups gmane.comp.jbpm.cvs
Message-ID <[email protected]>
  User: aguizar 
  Date: 08/07/15 00:56:17

  Modified:    jpdl/jar/src/main/java/org/jbpm  Tag: BRANCH_3_2_2_SOA_4_2
                        JbpmConfiguration.java
  Log:
  Made JbpmConfiguration.getInstance(String resource) not to throw an exception and emit a warning instead. The warning only appears if a non-default resource name is specified. JBPM-1376
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.2   +6 -5      jbpm.3/jpdl/jar/src/main/java/org/jbpm/Attic/JbpmConfiguration.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: JbpmConfiguration.java
  ===================================================================
  RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/Attic/JbpmConfiguration.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -b -r1.8.2.1 -r1.8.2.2
  --- JbpmConfiguration.java	3 Jan 2008 19:42:41 -0000	1.8.2.1
  +++ JbpmConfiguration.java	15 Jul 2008 04:56:17 -0000	1.8.2.2
  @@ -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);
  
  
  

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.