Search in sources :

Example 1 with ObjStoreException

use of com.sun.messaging.jmq.admin.objstore.ObjStoreException in project openmq by eclipse-ee4j.

the class ObjAdminHandler method doUpdateCredentials.

private void doUpdateCredentials(ObjAdminEvent oae, ConsoleObj selObj) {
    ObjStore os = oae.getObjStore();
    boolean success = finishDoConnectObjStore(selObj, os);
    if (success) {
        app.getStatusArea().appendText(acr.getString(acr.S_OBJSTORE_CONNECT, selObj.toString()));
    }
    // Remove missing info that we just added.
    ObjStoreAttrs osa = oae.getObjStoreAttrs();
    Vector missingInfo = oae.getMissingAuthInfo();
    for (int i = 0; i < missingInfo.size(); i++) {
        String key = (String) missingInfo.elementAt(i);
        osa.remove(key);
    }
    try {
        os.setObjStoreAttrs(osa);
    } catch (ObjStoreException ose) {
        JOptionPane.showOptionDialog(app.getFrame(), ose.toString(), acr.getString(acr.I_OBJSTORE), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, close, close[0]);
    }
    if (success && oae.isOKAction()) {
        objStorePasswdDialog.setVisible(false);
    }
}
Also used : ObjStore(com.sun.messaging.jmq.admin.objstore.ObjStore) ObjStoreException(com.sun.messaging.jmq.admin.objstore.ObjStoreException) ObjStoreAttrs(com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs) Vector(java.util.Vector)

Example 2 with ObjStoreException

use of com.sun.messaging.jmq.admin.objstore.ObjStoreException in project openmq by eclipse-ee4j.

the class CmdRunner method createStore.

/*
     * 02/05/2001 Creates a store.
     */
private ObjStore createStore(ObjStoreAttrs osa) {
    if (osa == null) {
        return (null);
    }
    ObjStore os = null;
    /*
         * Create ObjStore
         */
    try {
        ObjStoreManager osmgr = ObjStoreManager.getObjStoreManager();
        os = osmgr.createStore(osa);
    } catch (NameNotFoundException nnfe) {
        Globals.stdErrPrintln(ar.getString(ar.I_ERROR_MESG), ar.getKString(ar.E_CANNOT_LOC_TREE));
    } catch (ObjStoreException e) {
        handleRunCommandExceptions(e);
    }
    return (os);
}
Also used : ObjStoreManager(com.sun.messaging.jmq.admin.objstore.ObjStoreManager) ObjStore(com.sun.messaging.jmq.admin.objstore.ObjStore) NameNotFoundException(com.sun.messaging.jmq.admin.objstore.NameNotFoundException) ObjStoreException(com.sun.messaging.jmq.admin.objstore.ObjStoreException)

Aggregations

ObjStore (com.sun.messaging.jmq.admin.objstore.ObjStore)2 ObjStoreException (com.sun.messaging.jmq.admin.objstore.ObjStoreException)2 NameNotFoundException (com.sun.messaging.jmq.admin.objstore.NameNotFoundException)1 ObjStoreAttrs (com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs)1 ObjStoreManager (com.sun.messaging.jmq.admin.objstore.ObjStoreManager)1 Vector (java.util.Vector)1