Package javax.resource.spi

Examples of javax.resource.spi.SecurityException


                        }
                        return null;
                    }
                });
            if (pc == null) {
                throw new SecurityException("No PasswordCredential found");
            } else {
                return pc;
            }
        }
    }
View Full Code Here


        throws ResourceException {

        PasswordCredential pc =
            Util.getPasswordCredential(mcf, subject, connectionRequestInfo);
        if (!Util.isPasswordCredentialEqual(pc, passCred)) {
            throw new SecurityException("Principal does not match." +
                                        "Reauthentication not supported");
        }
        checkIfDestroyed();
        CciConnection cciCon = new CciConnection(this);
        addCciConnection(cciCon);
View Full Code Here

            out.print("Could not access the JORAM server: " + exc);
      throw new CommException("Could not access the JORAM server: " + exc);
    } catch (JMSSecurityException exc) {
        if (out != null)
            out.print("Invalid user identification: " + exc);
      throw new SecurityException("Invalid user identification: " + exc);
    } catch (JMSException exc) {
        if (out != null)
            out.print("Failed connecting process: " + exc);
      throw new ResourceException("Failed connecting process: " + exc);
    }
View Full Code Here

      }

      cnx.start();
    }
    catch (JMSSecurityException exc) {
      throw new SecurityException("Target destination not readble: "
                                  + exc);
    }
    catch (javax.jms.IllegalStateException exc) {
      throw new CommException("Connection with the JORAM server is lost.");
    }
View Full Code Here

        return factory.createConnection(userName, password);
      }
    } catch (IllegalStateException exc) {
      throw new CommException("Could not access the JORAM server: " + exc);
    } catch (JMSSecurityException exc) {
      throw new SecurityException("Invalid user identification: " + exc);
    } catch (JMSException exc) {
      throw new ResourceException("Failed connecting process: " + exc);
    }
  }
View Full Code Here

                        }
                        return null;
                    }
                });
            if (pc == null) {
                throw new SecurityException("No PasswordCredential found");
            } else {
                return pc;
            }
        }
    }
View Full Code Here

        out.print("Could not access the JORAM server: " + exc);
      throw new CommException("Could not access the JORAM server: " + exc);
    } catch (JMSSecurityException exc) {
      if (out != null)
        out.print("Invalid user identification: " + exc);
      throw new SecurityException("Invalid user identification: " + exc);
    } catch (JMSException exc) {
      if (out != null)
        out.print("Failed connecting process: " + exc);
      throw new ResourceException("Failed connecting process: " + exc);
    }
View Full Code Here

        throws ResourceException {

        PasswordCredential pc =
            Util.getPasswordCredential(mcf, subject, connectionRequestInfo);
        if (!Util.isPasswordCredentialEqual(pc, passCred)) {
            throw new SecurityException("Principal does not match. Reauthentication not supported");
        }
        checkIfDestroyed();
        JdbcConnection jdbcCon =
            new JdbcConnection(this, this.supportsLocalTx);
        addJdbcConnection(jdbcCon);
View Full Code Here

       }

       // Check if we have  username at all
       // If both derived and default is empty we are fucked
       if (bc.name == null && defaultUser == null)
          throw new SecurityException("No Subject or ConnectionRequestInfo set, not even default values available. Could not get credentials");
       else if (bc.name == null) {
          // We do know tha default user is not null if we are here
          bc.name = defaultUser;
          bc.pwd = password;
View Full Code Here

        BlasterCred cred = BlasterCred.getBlasterCred(mcf,subject,info);

        // Should we throw on null user here?
        // Check cred, only the same user as original is allowed
        if (cred.name == null)
            throw new SecurityException("UserName not allowed to be null");
        if (user != null && !user.equals(cred.name) )
            throw new SecurityException("Password credentials not the same, reauthentication not allowed");
       
        // If we are here we may set the user if its null
        if (user == null)
            user = cred.name;
       
View Full Code Here

TOP

Related Classes of javax.resource.spi.SecurityException

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.