Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.XmlBlasterException


   /**
    * @see I_Map#put(I_MapEntry)
    */
   public int put(I_MapEntry mapEntry) throws XmlBlasterException {
      if (mapEntry == null) {
         throw new XmlBlasterException(glob, ErrorCode.INTERNAL_ILLEGALARGUMENT, ME, "put(I_MapEntry="+mapEntry+")");
      }
      synchronized (this.modificationMonitor) {
         if (put((I_Entry)mapEntry))
            return 1;

View Full Code Here


   /**
    * @see I_Map#removeOldest()
    */
   public I_MapEntry removeOldest() throws XmlBlasterException {
      throw new XmlBlasterException(glob, ErrorCode.INTERNAL_NOTIMPLEMENTED, ME, "removeOldest is not implemented");
   }
View Full Code Here

         entry.getSizeInBytes(); // must be here since newEntry could reference same obj.
         I_MapEntry newEntry = entry;
         if (callback != null) newEntry = callback.changeEntry(entry);
         if (newEntry == null) return entry;
         if (newEntry.isPersistent() != entry.isPersistent()) {
            throw new XmlBlasterException(this.glob, ErrorCode.INTERNAL_UNKNOWN, ME + ".change",
                  "changing  oldEntry.isPersistent=" + entry.isPersistent() + " to newEntry.isPersistent=" + newEntry.isPersistent() + "differs. This is not allowed");
         }

         long diffSize = this.manager.modifyEntry(getStorageId().getStrippedId(), newEntry, entry);
         this.numOfBytes += diffSize;
View Full Code Here

    * context classpath (actually it uses the system classloader.)
    * Remember that jacorb.properties is in xmlBlaster.jar.
    */
   public static void loadJacorbProperties(String fileName, Global glob) throws XmlBlasterException {
      if ( fileName == null) {
         throw new XmlBlasterException(glob,ErrorCode.RESOURCE_CONFIGURATION,
                                        ME,"jacorb property filename not allowed to be null");
      } // end of if ()
     
      Properties props = new Properties();
      try {
         // Read orb properties file into props
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         InputStream is = cl.getResourceAsStream(fileName);
         if (is != null) {
            props.load(is);
            // Ad to global
            Property p = glob.getProperty();
            p.addArgs2Props( props );
         } else {

            log.warning("No "+fileName+" found in context classpath");
         }
      } catch (Exception e) {
         throw new XmlBlasterException(glob,ErrorCode.RESOURCE_CONFIGURATION,
                                        ME,"could not load jacorb properties "+e);
      } // end of try-catch

   }
View Full Code Here

     * Close the connection. After this the client may not use the connection
     again, but should get a new from the ConnectionFactory.
     */
    public void close() throws XmlBlasterException {
        if (mc == null)
            throw new XmlBlasterException(null,"Connection invalid, no ManagedConnection available");
        // Listener stuff!!
        closed = true;
        mc.handleClose(this);
    }
View Full Code Here


    // ---- helper methods ----
    private void checkSanity() throws XmlBlasterException{
        if (mc == null)
            throw new XmlBlasterException(null,"Connection invalid, no ManagedConnection available");
        // Nothing to logg to
    }
View Full Code Here

      try {
         this.dbWatcher = new DbWatcher(this);
         this.dbWatcher.startAlertProducers();
      }
      catch (Throwable e) {
         throw new XmlBlasterException(this.global, ErrorCode.RESOURCE_CONFIGURATION, "DbWatcherPlugin", "init failed", e);
      }
      log.info("Loaded DbWatcher plugin '" + getType() + "'");
   }
View Full Code Here

      try {
         this.dbWriterList = DbWriter.createDbWriters(this);
         this.putObject(JMX_PREFIX + "DbWriterPlugin", this);
      }
      catch (Throwable e) {
         throw new XmlBlasterException(this.global, ErrorCode.RESOURCE_CONFIGURATION, "DbWriterPlugin", "init failed", e);
      }
      log.info("Loaded DbWatcher plugin '" + getType() + "'");
   }
View Full Code Here

                  try {
                     momCb.update(k.getOid(), new ByteArrayInputStream(c), attrMap);
                  }
                  catch (Exception e) {
                     log.severe("Can't subscribe from xmlBlaster: " + e.getMessage());
                     throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, "alertListener", "", e);
                  }
                  return "";
               }
             });
             this.alertSubscriptionId = subRet.getSubscriptionId();
             return true;
         }
         else { // could be for ptp or in future for additional subscriptions
            Object ptp = attrs.get("ptp");
            if (ptp != null) {
               synchronized (this) {
                  this.defaultUpdate = momCb;
                  return true;
               }
            }
            else {
               Thread.dumpStack();
               throw new XmlBlasterException(this.glob, ErrorCode.USER_CONFIGURATION, "XmlBlasterPublisher.registerAlertListener", "non-ptp are not implemented. Please assign to the attrs a 'ptp' attribute (no matter which value)");
            }
         }
        
      }
      catch (XmlBlasterException e) {
View Full Code Here

               try {
                  momCb.update(k.getOid(), new ByteArrayInputStream(c), attrMap);
               }
               catch (Exception e) {
                  log.severe("Can't subscribe from xmlBlaster: " + e.getMessage());
                  throw new XmlBlasterException(glob, ErrorCode.USER_UPDATE_ERROR, "alertListener", "", e);
               }
              
               return "";
            }
          });
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.XmlBlasterException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.