Package javax.resource.spi

Examples of javax.resource.spi.UnavailableException


        _program.configure(listener);
      }

      return listener;
    } catch (Throwable e) {
      throw new UnavailableException(e);
    }
  }
View Full Code Here


    // Implementation methods
    //-------------------------------------------------------------------------
    protected MessageListener createMessageListener() throws UnavailableException {
        MessageListener messageListener = (MessageListener) beanFactory.getBean(ref, MessageListener.class);
        if (messageListener == null) {
            throw new UnavailableException("No MessageListener bean available for reference name: " + ref);
        }
        return messageListener;
    }
View Full Code Here

            }
        }

        if (!started_) {
            logger.log(Level.WARNING, "endpointfactory.unavailable");
            throw new UnavailableException(
                    "EndpointFactory is currently not available");
        }

        MessageEndpoint endpoint = null;
        try {
            ResourceHandle resourceHandle = allocator_.createResource(xaResource);

            MessageBeanListener listener =
                    messageBeanPM_.createMessageBeanListener(resourceHandle);

            MessageEndpointInvocationHandler handler =
                    new MessageEndpointInvocationHandler(listener, messageBeanPM_);
            endpoint = (MessageEndpoint) messageBeanPM_.createMessageBeanProxy(handler);
        } catch (Exception ex) {
            throw (UnavailableException)
                    (new UnavailableException()).initCause(ex);
        }
        return endpoint;
    }
View Full Code Here

    // Implementation methods
    //-------------------------------------------------------------------------
    protected MessageListener createMessageListener() throws UnavailableException {
        MessageListener messageListener = (MessageListener) beanFactory.getBean(ref, MessageListener.class);
        if (messageListener == null) {
            throw new UnavailableException("No MessageListener bean available for reference name: " + ref);
        }
        return messageListener;
    }
View Full Code Here

    public Object createInstance(boolean ignoreInstanceCount) throws UnavailableException {
        if (!ignoreInstanceCount) {
            synchronized (this) {
                // check the instance limit
                if (instanceLimit > 0 && instanceCount >= instanceLimit) {
                    throw new UnavailableException("Only " + instanceLimit + " instances can be created");
                }
                // increment the instance count
                instanceCount++;
            }
        }
View Full Code Here

            if (e instanceof java.lang.reflect.InvocationTargetException) {
                e = ((java.lang.reflect.InvocationTargetException) e).getTargetException();
            }
            String message = "The bean instance threw a system exception:" + e;
            MdbInstanceFactory.logger.error(message, e);
            throw new UnavailableException(message, e);
        } finally {
            ThreadContext.exit(callContext);
        }
    }
View Full Code Here

    public Object createInstance(final boolean ignoreInstanceCount) throws UnavailableException {
        if (!ignoreInstanceCount) {
            synchronized (this) {
                // check the instance limit
                if (instanceLimit > 0 && instanceCount >= instanceLimit) {
                    throw new UnavailableException("Only " + instanceLimit + " instances can be created");
                }
                // increment the instance count
                instanceCount++;
            }
        }
View Full Code Here

            if (e instanceof InvocationTargetException) {
                e = ((InvocationTargetException) e).getTargetException();
            }
            final String message = "The bean instance threw a system exception:" + e;
            MdbInstanceFactory.logger.error(message, e);
            throw new UnavailableException(message, e);
        } finally {
            ThreadContext.exit(oldContext);
        }
    }
View Full Code Here

        }

        if (messageEndpoint != null) {
            return messageEndpoint;
        } else {
            throw new UnavailableException("Unable to create end point within the specified timeout " + timeout);
        }
    }
View Full Code Here

    public Object createInstance(boolean ignoreInstanceCount) throws UnavailableException {
        if (!ignoreInstanceCount) {
            synchronized (this) {
                // check the instance limit
                if (instanceLimit > 0 && instanceCount >= instanceLimit) {
                    throw new UnavailableException("Only " + instanceLimit + " instances can be created");
                }
                // increment the instance count
                instanceCount++;
            }
        }
View Full Code Here

TOP

Related Classes of javax.resource.spi.UnavailableException

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.