Package org.wso2.carbon.messagebox

Examples of org.wso2.carbon.messagebox.MessageBoxException


            return messageDetails;
        } catch (JMSException e) {
            String error = "Failed to convert JMS Message to MessageDetails";
            log.error(error);
            throw new MessageBoxException(error, e);
        }
    }
View Full Code Here


            if (multipleEntryHashMap != null) {
                // get signature and signature calculating details from url parameters
                //  and verify signature
                try {
                    if (!verifySignatureOnRestBasedRequest(messageContext, multipleEntryHashMap)) {
                        throw new FaultResponse(new MessageBoxException("AuthFailure"),
                                                messageContext.getMessageID()).createAxisFault();
                    }
                } catch (SQSAuthenticationException e) {
                    throw new AxisFault(e.getMessage());
                }
            } else {
                // verify signature in soap header
                try {
                    if (!verifySignatureOnSOAPHeader(messageContext)) {
                        throw new FaultResponse(new MessageBoxException("AuthFailure"),
                                                messageContext.getMessageID()).createAxisFault();
                    }
                } catch (SQSAuthenticationException e) {
                    throw new AxisFault(e.getMessage());
                }
View Full Code Here

                    isAdmin = true;
                    break;
                }
            }
        } catch (UserStoreException e) {
            throw new MessageBoxException("Failed to get list of user roles", e);
        }

        return isAdmin;
    }
View Full Code Here

                                                                      ManagedBroker.class, false);
                amqBrokerManagerMBean.deleteQueue(queue);
            }

        } catch (MalformedObjectNameException e) {
            throw new MessageBoxException(e);
        } catch (InstanceNotFoundException e) {
            throw new MessageBoxException(e);
        } catch (MBeanException e) {
            throw new MessageBoxException(e);
        } catch (JMException e) {
            throw new MessageBoxException(e);
        } catch (IOException e) {
            throw new MessageBoxException(e);
        }
    }
View Full Code Here

            Set<ObjectName> set = mBeanServer.queryNames(objectName, null);

          return (set.size()>0);

        } catch (MalformedObjectNameException e) {
            throw new MessageBoxException(e);
        } catch (JMException e) {
            throw new MessageBoxException(e);
        }
    }
View Full Code Here

            if (!userRegistry.resourceExists(MessageBoxConstants.MB_QUEUE_STORAGE_PATH)) {
                userRegistry.put(MessageBoxConstants.MB_QUEUE_STORAGE_PATH, userRegistry.newCollection());
            }

        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the registry", e);
        }
    }
View Full Code Here

                queues.add(queue);
            }
            return queues;
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the registry ", e);
        }

    }
View Full Code Here

                    new ObjectName("org.apache.qpid:type=VirtualHost.Queue,VirtualHost=\""
                                   + qpidService.getVirtualHostName() + "\",name=\"" +
                                   Utils.getTenantBasedQueueName(queueName) + "\"");
            return mBeanServer.getAttribute(objectName, attributeName);
        } catch (MalformedObjectNameException e) {
            throw new MessageBoxException("Can not find the mbean for the queue " + queueName);
        } catch (InstanceNotFoundException e) {
            // if the queue is not found we return 0
            return null;
        } catch (ReflectionException e) {
            throw new MessageBoxException("Can not find the mbean for the queue " + queueName);
        } catch (AttributeNotFoundException e) {
            throw new MessageBoxException("Can not find the mbean for the queue " + queueName);
        } catch (MBeanException e) {
            throw new MessageBoxException("Can not find the mbean for the queue " + queueName);
        }
    }
View Full Code Here

                userRealm.getAuthorizationManager().authorizeUser(
                        userName, resourcePath, MessageBoxConstants.MB_PERMISSION_CHANGE_PERMISSION);

            }
        } catch (RegistryException e) {
            throw new MessageBoxException("Can not access the config registry");
        } catch (UserStoreException e) {
            throw new MessageBoxException("Can not access the user realm");
        }
    }
View Full Code Here

                                user, queueResoucePath, MessageBoxConstants.MB_PERMISSION_PUBLISH));
                queueUserPermissions.add(queueUserPermission);
            }
            return queueUserPermissions;
        } catch (UserStoreException e) {
            throw new MessageBoxException("Can not access the Userstore manager ", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.messagebox.MessageBoxException

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.