Package javax.resource

Examples of javax.resource.NotSupportedException


    throws ResourceException
  {
    if (_xaResource != null)
      return _xaResource;

    throw new NotSupportedException();
  }
View Full Code Here


   */
  @Override
  public ManagedConnectionMetaData getMetaData()
    throws ResourceException
  {
    throw new NotSupportedException();
  }
View Full Code Here

        this.defaultPassword = defaultPassword;
        hashCode = jdbcDriver.hashCode() ^ jdbcUrl.hashCode() ^ defaultUserName.hashCode() ^ defaultPassword.hashCode();
    }

    public Object createConnectionFactory() throws ResourceException {
        throw new NotSupportedException("This connector must be used with an application server connection manager");
    }
View Full Code Here

        return xid;
    }

    public void setTransactionTimeout(long timeout) throws NotSupportedException {
        if (timeout<=0) {
            throw new NotSupportedException("Illegal timeout value");
        }
        this.timeout = timeout;
    }
View Full Code Here

        this.mcf = mcf;
        this.cm = cm;
    }

    public Connection getConnection() throws ResourceException {
        throw new NotSupportedException(
                "Need a WebDAVConnectionSpec to create a connection. Call getConnection(ConnectionSpec spec) instead!");
    }
View Full Code Here

                "Need a WebDAVConnectionSpec to create a connection. Call getConnection(ConnectionSpec spec) instead!");
    }

    public Connection getConnection(ConnectionSpec spec) throws ResourceException {
        if (!(spec instanceof WebDAVConnectionSpec)) {
            throw new NotSupportedException("Need a WebDAVConnectionSpec to create a connection!");
        }
        System.out.println("Getting connection with spec "+spec);
        return (Connection) cm.allocateConnection(mcf, (WebDAVConnectionSpec)spec);
    }
View Full Code Here

     *
     * @return LocalTransaction instance
     * @throws javax.resource.ResourceException generic exception if operation fails
     */
    public LocalTransaction getLocalTransaction() throws ResourceException {
        throw new NotSupportedException("LocalTransaction not supported");
    }
View Full Code Here

     *
     * @return XAResource instance
     * @throws javax.resource.ResourceException generic exception if operation fails
     */
    public XAResource getXAResource() throws ResourceException {
        throw new NotSupportedException("GetXAResource not supported not supported");
    }
View Full Code Here

      }

      if (logRCFailures) {
        jmse.printStackTrace();
      }
      NotSupportedException nse = new NotSupportedException(
          "MQRA:EC:Error:createRemoteMessageConsumer failed:aborting due to:" + jmse.getMessage());
      nse.initCause(jmse);
      throw nse;
    }

       
        // success
        try {
            if (this.isDurable) {
                this.xas = (com.sun.messaging.jmq.jmsclient.XASessionImpl)
                        xac.createSession(false, Session.CLIENT_ACKNOWLEDGE);
            } else {
                if (noAckDelivery) {
                    this.xas = (com.sun.messaging.jmq.jmsclient.XASessionImpl)
                        xac.createSession(
                            com.sun.messaging.jms.Session.NO_ACKNOWLEDGE);
                } else {
                    this.xas = (com.sun.messaging.jmq.jmsclient.XASessionImpl)
                        xac.createSession(false, Session.CLIENT_ACKNOWLEDGE);
                }
            }
            ((com.sun.messaging.jmq.jmsclient.XASessionImpl)xas)._setRAEndpointSession();
            if (this.isDurable) {
                msgConsumer = xas.createDurableSubscriber((Topic)destination,
                        aSpec.getSubscriptionName(),
                        aSpec.getMessageSelector(), false);
            } else {
                msgConsumer = xas.createConsumer(destination, aSpec.getMessageSelector());
                //test to see if Queue is enabled for more than one consumer when InClustered true
                if (destination instanceof javax.jms.Queue && aSpec._isInClusteredContainerSet()) {
                    //Fail activation if it is not
                    try {
                        msgConsumer2 = xas.createConsumer(destination, aSpec.getMessageSelector());
                        msgConsumer2.close();
                        msgConsumer2 = null;
                    } catch (JMSException jmse) {
                        if (xac != null) {
                            try {
                                xac.close();
                            } catch (JMSException jmsecc) {
                                //System.out.println("MQRA:EC:closed xac on conn creation exception-"+jmsecc.getMessage());
                            }
                            xac = null;
                        }
                        NotSupportedException nse = new NotSupportedException(
                               "MQRA:EC:Error clustering multiple consumers on Queue:\n"+jmse.getMessage());
                        nse.initCause(jmse);
                        throw nse;
                    }
                }
            }
            msgListener = new MessageListener(this, this.endpointFactory, aSpec);
            //System.out.println("MQRA:EC:Created msgListener");
            //msgConsumer.setMessageListener(new MessageListener(this, epFactory, spec));
            msgConsumer.setMessageListener(msgListener);
            //System.out.println("MQRA:EC:Set msgListener");
            //System.out.println("MQRA:EC:Starting Connection");
            xac.start();
            updateFactoryConsumerTables(this.endpointFactory, aSpec);

        catch (JMSException jmse) {
            if (xac != null) {
                try {
                    xac.close();
                } catch (JMSException jmsecc) {
                    //System.out.println("MQRA:EC:closed xac on conn creation exception-"+jmsecc.getMessage());
                }
                xac = null;
            }
            NotSupportedException nse = new NotSupportedException(
                    "MQRA:EC:Error creating Remote Message Consumer:\n"+jmse.getMessage());
            nse.initCause(jmse);
            throw nse;
        }
    }
View Full Code Here

          if (destName==null){
            errorMessage="MQRA:EC:No destination configured in ActivationSpec of MDB";
          } else {
            errorMessage="MQRA:EC:Invalid destination "+destName+" configured in ActivationSpec of MDB";
          }
            NotSupportedException nse = new NotSupportedException(errorMessage);
            nse.initCause(jmse);
            throw nse;
        }
        //XXX:Does MDB Deployment need physical dest to exist?
        //If so need Admin API to check
View Full Code Here

TOP

Related Classes of javax.resource.NotSupportedException

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.