void checkIfValid() throws JAXRException { if (this.mc == null) { throw new JAXRException(ResourceBundle.getBundle("com/sun/connector/jaxr/LocalStrings").getString("Connection_is_invalid")); } }
private void throwResourceException(JAXRException paramJAXRException) throws ResourceException { this.log.fine("throwing REx in in JAXRManagedConnection constructor"); paramJAXRException.printStackTrace(); ResourceException localResourceException = new ResourceException(ResourceBundle.getBundle("com/sun/connector/jaxr/LocalStrings").getString("JAXRException:_") + paramJAXRException.getMessage()); localResourceException.setLinkedException(paramJAXRException); throw localResourceException; }
/** * Constructs a <code>JAXRException</code> object with the given * <code>String</code> as the reason for the exception being thrown * and the given <code>Throwable</code> object as an embedded * Throwable. * * @param reason a description of what caused the exception * @param cause a <code>Throwable</code> object that is to * be embedded in this <code>JAXRException</code> object */ public JAXRException(String reason, Throwable cause) { super(reason); initCause(cause); }
/** * Gets the RegistryObjects owned by the caller. The objects * are returned as their concrete type (e.g. Organization, User etc.) * * TODO - need to figure out what the set are. This is just to get some * basic functionality * * @return BulkResponse * @throws JAXRException */ public BulkResponse getRegistryObjects() throws JAXRException { String types[] = { LifeCycleManager.ORGANIZATION, LifeCycleManager.SERVICE}; LinkedHashSet<Object> c = new LinkedHashSet<Object>(); for (int i = 0; i < types.length; i++) { try { BulkResponse bk = getRegistryObjects(types[i]); if (bk.getCollection() != null) { c.addAll(bk.getCollection()); } } catch(JAXRException e) { log.debug("ignore - just a problem with that type? " + e.getMessage(), e); } } return new BulkResponseImpl(c); }
/** * Gets the RegistryObjects owned by the caller. The objects * are returned as their concrete type (e.g. Organization, User etc.) * * TODO - need to figure out what the set are. This is just to get some * basic functionality * * @return BulkResponse * @throws JAXRException */ public BulkResponse getRegistryObjects() throws JAXRException { String types[] = { LifeCycleManager.ORGANIZATION, LifeCycleManager.SERVICE}; LinkedHashSet<Object> c = new LinkedHashSet<Object>(); for (int i = 0; i < types.length; i++) { try { BulkResponse bk = getRegistryObjects(types[i]); if (bk.getCollection() != null) { c.addAll(bk.getCollection()); } } catch(JAXRException e) { log.debug("ignore - just a problem with that type? " + e.getMessage(), e); } } return new BulkResponseImpl(c); }
private static Object newInstance(String className, ClassLoader classLoader) throws JAXRException { try { Class spiClass; if (classLoader == null) { spiClass = Class.forName(className); } else { spiClass = classLoader.loadClass(className); } return spiClass.newInstance(); } catch (ClassNotFoundException x) { throw new JAXRException( "Provider " + className + " not found", x); } catch (Exception x) { throw new JAXRException( "Provider " + className + " could not be instantiated: " + x, x); } }
/** * Constructs a <code>JAXRException</code> object with the given * <code>String</code> as the reason for the exception being thrown * and the given <code>Throwable</code> object as an embedded * Throwable. * * @param reason a description of what caused the exception * @param cause a <code>Throwable</code> object that is to * be embedded in this <code>JAXRException</code> object */ public JAXRException(String reason, Throwable cause) { super(reason); initCause(cause); }
private static Object newInstance(String className, ClassLoader classLoader) throws JAXRException { try { Class spiClass; if (classLoader == null) { spiClass = Class.forName(className); } else { spiClass = classLoader.loadClass(className); } return spiClass.newInstance(); } catch (ClassNotFoundException x) { throw new JAXRException( "Provider " + className + " not found", x); } catch (Exception x) { throw new JAXRException( "Provider " + className + " could not be instantiated: " + x, x); } }
/** * Constructs a <code>JAXRException</code> object initialized * with the given <code>Throwable</code> object. * * @param cause the Throwable that caused this Exception */ public JAXRException(Throwable cause) { super(cause.toString()); initCause(cause); }
public static ConnectionFactory newInstance() throws JAXRException { String className = System.getProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl"); ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = ConnectionFactory.class.getClassLoader(); } try { Class factoryClass = cl.loadClass(className); return (ConnectionFactory) factoryClass.newInstance(); } catch (ClassNotFoundException e) { throw new JAXRException("Unable to load JAXR ConnectionFactoryClass: " + className, e); } catch (InstantiationException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } catch (IllegalAccessException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } } }
/** * Constructs a <code>JAXRException</code> object initialized * with the given <code>Throwable</code> object. * * @param cause the Throwable that caused this Exception */ public JAXRException(Throwable cause) { super(cause.toString()); initCause(cause); }
public static ConnectionFactory newInstance() throws JAXRException { String className = System.getProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl"); ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = ConnectionFactory.class.getClassLoader(); } try { Class factoryClass = ProviderLocator.loadClass(className, ConnectionFactory.class, cl); return (ConnectionFactory) factoryClass.newInstance(); } catch (ClassNotFoundException e) { throw new JAXRException("Unable to load JAXR ConnectionFactoryClass: " + className, e); } catch (InstantiationException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } catch (IllegalAccessException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } } }
public static ConnectionFactory newInstance() throws JAXRException { String className = System.getProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl"); ClassLoader cl = Thread.currentThread().getContextClassLoader(); if (cl == null) { cl = ConnectionFactory.class.getClassLoader(); } try { Class factoryClass = ProviderLocator.loadClass(className, ConnectionFactory.class, cl); return (ConnectionFactory) factoryClass.newInstance(); } catch (ClassNotFoundException e) { throw new JAXRException("Unable to load JAXR ConnectionFactoryClass: " + className, e); } catch (InstantiationException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } catch (IllegalAccessException e) { throw new JAXRException("Unable to instantiate JAXR ConnectionFactoryClass: " + className, e); } } }
public static ConnectionFactory newInstance() throws JAXRException { String factoryName = null; ConnectionFactory factory = null; try { String defaultName = null; factoryName = System.getProperty(SYS_PROP_NAME, defaultName); ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class factoryClass = loader.loadClass(factoryName); factory = (ConnectionFactory) factoryClass.newInstance(); } catch(Throwable e) { throw new JAXRException("Failed to create instance of: "+factoryName, e); } return factory; }
public static ConnectionFactory newInstance() throws JAXRException { String factoryName = null; ConnectionFactory factory = null; try { String defaultName = null; factoryName = System.getProperty(SYS_PROP_NAME, defaultName); ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class factoryClass = loader.loadClass(factoryName); factory = (ConnectionFactory) factoryClass.newInstance(); } catch(Throwable e) { throw new JAXRException("Failed to create instance of: "+factoryName, e); } return factory; }
/** * Creates a default <code>ConnectionFactory</code> object. * * @return a new instance of a <code>ConnectionFactory</code> * @throws JAXRException If the JAXR provider encounters an internal error * */ public static ConnectionFactory newInstance() throws JAXRException { try { return (ConnectionFactory) find(CONNECTION_FACTORY_CLASS, DEFAULT_CONNECTION_FACTORY); } catch (Exception ex) { throw new JAXRException("Unable to create "+ "ConnectionFactory: " +ex.getMessage()); } }
/** * Creates a default <code>ConnectionFactory</code> object. * * @return a new instance of a <code>ConnectionFactory</code> * @throws JAXRException If the JAXR provider encounters an internal error * */ public static ConnectionFactory newInstance() throws JAXRException { try { return (ConnectionFactory) find(CONNECTION_FACTORY_CLASS, DEFAULT_CONNECTION_FACTORY); } catch (Exception ex) { throw new JAXRException("Unable to create "+ "ConnectionFactory: " +ex.getMessage()); } }
Connection getConnection(Properties paramProperties) throws JAXRException { try { JaxrConnectionRequestInfo localJaxrConnectionRequestInfo = new JaxrConnectionRequestInfo(paramProperties); return (Connection)this.cm.allocateConnection(this.mcf, localJaxrConnectionRequestInfo); } catch (ResourceException localResourceException) { throw new JAXRException(localResourceException.getMessage()); } }
public void confirmAssociation(Association assoc) throws JAXRException, InvalidRequestException { //Store it in the UDDI registry HashSet<Association> col = new HashSet<Association>(); col.add(assoc); BulkResponse br = this.saveAssociations(col, true); if(br.getExceptions()!= null) throw new JAXRException("Confiming the Association Failed"); }
public static ConnectionFactory newInstance() throws JAXRException { String factoryName = null; ConnectionFactory factory = null; try { // Default to scout for now String defaultName = "org.apache.ws.scout.registry.ConnectionFactoryImpl"; factoryName = System.getProperty(SYS_PROP_NAME, defaultName); ClassLoader loader = Thread.currentThread().getContextClassLoader(); Class factoryClass; try { factoryClass = loader.loadClass(factoryName); } catch (ClassNotFoundException e) { // Fall back to defining CL factoryClass = ConnectionFactory.class.getClassLoader().loadClass(factoryName); } factory = (ConnectionFactory) factoryClass.newInstance(); } catch(Throwable e) { throw new JAXRException("Failed to create instance of: "+factoryName, e); } return factory; }