Package javax.resource.spi

Examples of javax.resource.spi.CommException


        setFactoryParameters((AbstractConnectionFactory) factory, (ManagedConnectionFactoryImpl) mcf);
        ((AbstractConnectionFactory) factory).setIdentityClassName(identityClass);
        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


        AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG,
                                      this + " createManagedConnection cnx = " + cnx);
    } catch (IllegalStateException exc) {
      if (out != null)
        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) {
View Full Code Here

      consumers.put(specImpl, consumer);
    } catch (javax.jms.JMSSecurityException exc) {
      throw new SecurityException("Invalid user identification: " + exc);
    } catch (javax.jms.JMSException exc) {
      throw new CommException("Could not connect to the JORAM server: " + exc);
    } catch (ConnectException exc) {
      throw new ResourceException("Problem when handling the JORAM destinations: " + exc);
    } catch (AdminException exc) {
      throw new ResourceException("Problem when handling the JORAM destinations: " + exc);
    }
View Full Code Here

                     this + " getXAResources resources = " + resources);
      }
    } catch (javax.jms.JMSSecurityException exc) {
      throw new SecurityException("Invalid user identification: " + exc);
    } catch (javax.jms.JMSException exc) {
      throw new CommException("Could not connect to the JORAM server: " + exc);
    }

    return (XAResource[]) resources.toArray(new XAResource[resources.size()]);
  }
View Full Code Here

        
         ConnectReturnQos ret = physicalPipe.connect(qos,null);
         me = "BlasterManagedConnection/"+user+"/"+ret.getSecretSessionId();
        
      }catch(XmlBlasterException ex) {
         throw new CommException("Could not login : " +ex);
      }
     
   }
View Full Code Here

                    (new IllegalArgumentException
                     ("Unknown LDAP resource \"" + dn + "\": "
                      + e.getMessage())).initCause(e);
            } catch (NamingException e) {
                throw (CommException)
                    (new CommException
                     ("Problem accessing LDAP: " + e.getMessage())).initCause(e);
            }
        }
        appendAuthorizers
            (result, factory.getQueryInfos(RmsEntry.RESOURCE_TYPE_GROUP), dn);
View Full Code Here

        } catch (NotContextException e) {
            logger.warn
                ("Cannot access configured context \"" + qi.getCtxDN() + "\"");
        } catch (NamingException e) {
            throw (CommException)
                (new CommException
                 ("Problem accessing LDAP: " + e.getMessage())).initCause(e);
        }
    }
View Full Code Here

                (new NameNotFoundException
                 ("Unknown LDAP context \"" + qi.getCtxDN() + "\": "
                  + e.getMessage())).initCause(e);
        } catch (NamingException e) {
            throw (CommException)
                (new CommException
                 ("Problem accessing LDAP: " + e.getMessage())).initCause(e);
        }
    }
View Full Code Here

      try
      {
         // DB2 seems to close connection if SQL Error encountered, but doesn't notify
         if (m_xaConnection == null || m_sqlConnection.isClosed()) // closed connection
         {
            throw new CommException("RDBMS connection is already closed");
         }
      }
      catch (SQLException e)
      {
         throw new CommException("Unexpected RDBMS connection error", e);
      }

      if (m_handleSet.isEmpty() && // no active handles or XA transactions, safe to test
          (m_resource == null || !m_resource.isBusy()))
      {
         Statement stmt = null;

         try
         {
            if (m_factory.isAutoCommitRollbackRequired() || !m_sqlConnection.getAutoCommit())
            {
               m_sqlConnection.rollback(); // roll back any local transactions
            }

            if (m_factory.getTestSQL() != null) // execute test SQL if provided
            {
               m_sqlConnection.setAutoCommit(true);
               stmt = m_sqlConnection.createStatement();
               stmt.execute(m_factory.getTestSQL());
               stmt.close();
            }
         }
         catch (SQLException e)
         {
            if (stmt != null)
            {
               try
               {
                  stmt.close();
               }
               catch (SQLException f)
               {
                  // ignore since closing connection
               }
            }

            try
            {
               destroy();
            }
            catch (ResourceException f)
            {
               // ignore since looping around
            }

            throw new CommException("Connection test failed", e);
         }
      }

      return new SQLConnection(); // the empty handle will be told its managed connection
   }
View Full Code Here

TOP

Related Classes of javax.resource.spi.CommException

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.