List of usage examples for javax.activation DataSource getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.apache.axis2.format.ManagedDataSourceFactory.java
/** * Create a {@link ManagedDataSource} proxy for an existing data source. * This will create a dynamic proxy implementing the same interfaces as * the original data source.//from w ww . j a v a 2 s . c om * * @param ds the original data source * @return a data source proxy implementing {@link ManagedDataSource} */ public static ManagedDataSource create(DataSource ds) { Class<?>[] orgIfaces = ds.getClass().getInterfaces(); Class<?>[] ifaces = new Class[orgIfaces.length + 1]; ifaces[0] = ManagedDataSource.class; System.arraycopy(orgIfaces, 0, ifaces, 1, orgIfaces.length); return (ManagedDataSource) Proxy.newProxyInstance(ManagedDataSourceFactory.class.getClassLoader(), ifaces, new DataSourceManager(ds)); }
From source file:org.apache.axis2.jaxws.message.databinding.impl.DataSourceBlockImpl.java
/** * Constructor called from factory/*w ww . j a va 2 s . c o m*/ * * @param busObject * @param qName * @param factory */ DataSourceBlockImpl(DataSource busObject, QName qName, BlockFactory factory) throws WebServiceException { super(busObject, null, qName, factory); // Check validity of DataSource if (!(busObject instanceof DataSource)) { throw ExceptionFactory.makeWebServiceException( Messages.getMessage("SourceNotSupported", busObject.getClass().getName())); } }