Package javax.resource.spi

Examples of javax.resource.spi.IllegalStateException


        connectionSet.add(jdbcCon);
    }

    private void checkIfDestroyed() throws ResourceException {
        if (destroyed) {
            throw new IllegalStateException("Managed connection is closed");
        }
    }
View Full Code Here


        }
    }
 
    public String getUserName() throws ResourceException {
        if (mc.isDestroyed()) {
            throw new IllegalStateException
                ("ManagedConnection has been destroyed");
        }

        return mc.getPasswordCredential() == null
            ? null
View Full Code Here

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG,
                 this + " endpointActivation(" + endpointFactory + ", " + spec + ")");

    if (! started)
      throw new IllegalStateException("Non started resource adapter.");
    if (stopped)
      throw new IllegalStateException("Stopped resource adapter.");

    if (! (spec instanceof ActivationSpecImpl))
      throw new ResourceException("Provided ActivationSpec instance is not a JORAM activation spec.");
    ActivationSpecImpl specImpl = (ActivationSpecImpl) spec;
View Full Code Here

    if (logger.isLoggable(BasicLevel.DEBUG))
      logger.log(BasicLevel.DEBUG,
                 this + " getXAResources(" + specs + ")");

    if (! started)
      throw new IllegalStateException("Non started resource adapter.");
    if (stopped)
      throw new IllegalStateException("Stopped resource adapter.");

    ActivationSpecImpl specImpl;
    String userName;
    ConnectionFactory cf = null;
    XAConnection connection;
View Full Code Here

      globalUtil = new GlobalUtil();
      if ( jndiName != null) {
         try {
            globalUtil = (GlobalUtil)new InitialContext().lookup(jndiName);
         } catch (NamingException e) {
            throw new IllegalStateException("Could not lookup GlobalUtil with JNDI " + jndiName + ": "+e);
         } // end of try-catch
      } // end of if ()

      glob = globalUtil.newGlobal( propFile, props );
     
      if ( "IOR".equals(glob.getProperty().get("protocol", "IOR")) ) {
         //Start by loading jacorb.properties, without it corba protocol does
         // not work well.
         try {
            JacorbUtil.loadJacorbProperties("jacorb.properties",glob);
         } catch (XmlBlasterException e) {
            IllegalStateException x = new IllegalStateException("Could not load jacorn properties, needed for IOR protocol to work: "+e);
            x.setLinkedException(e);
            throw x;
         } // end of try-catch
        
      } // end of if ()
     
View Full Code Here

        // If we are here we may set the user if its null
        if (user == null)
            user = cred.name;
       
        if (isDestroyed) {
           throw new IllegalStateException("ManagedConnection already destroyd");
        }

             
      // Create a handle
      BlasterConnectionImpl handle = new BlasterConnectionImpl(this);
View Full Code Here

     *
     */
    public void cleanup() throws ResourceException {
       
        if(isDestroyed)
            throw new IllegalStateException("ManagedConnection already destroyd");
        //
        closed = true;
        // destory handles     
        destroyHandles();
    }
View Full Code Here

     */
   
   public void associateConnection(Object obj)
      throws ResourceException {
      if (!(obj instanceof BlasterConnectionImpl))
         throw new IllegalStateException("Cant call associateConnection with a handle that is not of type BlasterConnectionImp: " + obj.getClass().getName());
     
      if (isDestroyed)
         throw new IllegalStateException("ManagedConnection in an illegal state, is destroyed");
     
      BlasterConnectionImpl h = (BlasterConnectionImpl)obj;
      h.setBlasterManagedConnection(this);
      handles.add(h);
   }
View Full Code Here

        throw new NotSupportedException("Local transaction not supported");
    }
   
    public ManagedConnectionMetaData getMetaData() throws ResourceException {
        if(isDestroyed)
            throw new IllegalStateException("ManagedConnection already destroyd");
        return new BlasterMetaData(this);
    }
View Full Code Here

      }

      user = cred.name; // Basically meaningless

      if (isDestroyed)
         throw new IllegalStateException("ManagedConnection already destroyd");

      // Create a handle
      JmsSession handle = new JmsSession(this, (JmsConnectionRequestInfo) info);
      handles.add(handle);
      return handle;
View Full Code Here

TOP

Related Classes of javax.resource.spi.IllegalStateException

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.