Package org.mule.api.store

Examples of org.mule.api.store.ObjectStoreException


        {
            FileUtils.cleanDirectory(this.storeDirectory);
        }
        catch (IOException e)
        {
            throw new ObjectStoreException(
                MessageFactory.createStaticMessage("Could not clear object store"), e);
        }
    }
View Full Code Here


            // FileUtils throws a MuleRuntimeException if something goes wrong when
            // creating the
            // path. To fully conform to the ObjectStore contract we cannot just let
            // it bubble
            // through but rather catch it and re-throw as ObjectStoreException
            throw new ObjectStoreException(mre);
        }
    }
View Full Code Here

        // synchronized method
        if (!directory.exists() && !directory.mkdirs())
        {
            Message message = CoreMessages.failedToCreate("queue store store directory "
                                                          + directory.getAbsolutePath());
            throw new ObjectStoreException(message);
        }
    }
View Full Code Here

            return keys;
        }
        catch (ClassNotFoundException e)
        {
            String message = String.format("Could not restore from %1s", storeDirectory.getAbsolutePath());
            throw new ObjectStoreException(CoreMessages.createStaticMessage(message));
        }
        catch (IOException e)
        {
            String message = String.format("Could not restore from %1s", storeDirectory.getAbsolutePath());
            throw new ObjectStoreException(CoreMessages.createStaticMessage(message));
        }
    }
View Full Code Here

            FileOutputStream out = new FileOutputStream(outputFile);
            SerializationUtils.serialize(value, out);
        }
        catch (SerializationException se)
        {
            throw new ObjectStoreException(se);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new ObjectStoreException(fnfe);
        }
    }
View Full Code Here

            // FileUtils throws a MuleRuntimeException if something goes wrong when
            // creating the
            // path. To fully conform to the ObjectStore contract we cannot just let
            // it bubble
            // through but rather catch it and re-throw as ObjectStoreException
            throw new ObjectStoreException(mre);
        }
    }
View Full Code Here

            FileInputStream in = new FileInputStream(file);
            return (T) SerializationUtils.deserialize(in, muleContext);
        }
        catch (SerializationException se)
        {
            throw new ObjectStoreException(se);
        }
        catch (FileNotFoundException fnfe)
        {
            throw new ObjectStoreException(fnfe);
        }
    }
View Full Code Here

        {
            if (!file.delete())
            {
                Message message = CoreMessages.createStaticMessage("Deleting " + file.getAbsolutePath()
                                                                   + " failed");
                throw new ObjectStoreException(message);
            }
        }
        else
        {
            throw new ObjectDoesNotExistException();
View Full Code Here

    @Test(expected = MessagingException.class)
    public void failToRestoreAuthorizationEvent() throws Exception
    {
        this.exception = true;
        Mockito.when(this.manager.restoreAuthorizationEvent(eventId)).thenThrow(new ObjectStoreException());
        this.adapterWithUrlUsingConfigAsId();
    }
View Full Code Here

     */
    private void notNullKey(Serializable key) throws ObjectStoreException
    {
        if (key == null)
        {
            throw new ObjectStoreException(CoreMessages.objectIsNull("id"));
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.store.ObjectStoreException

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.