@Override protected Object initAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl) throws DeployException { try { Class clz = Class.forName(className, true, cl); Object o = clz.newInstance(); if (configs != null) { Injection injector = new Injection(); for (ConfigProperty cpmd : configs) { if (cpmd.isValueSet()) { if (XsdString.isNull(cpmd.getConfigPropertyType())) { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue()); } else { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue(), cpmd.getConfigPropertyType().getValue()); } } } } return o; } catch (Throwable t) { throw ConnectorLogger.ROOT_LOGGER.deploymentFailed(t, className); } }
Set<String> raAoClasses = new HashSet<String>(); ResourceAdapter ra = cmd.getResourceadapter(); if (ra != null && ra.getOutboundResourceadapter() != null && ra.getOutboundResourceadapter().getConnectionDefinitions() != null) { List<ConnectionDefinition> cdMetas = ra.getOutboundResourceadapter().getConnectionDefinitions(); if (cdMetas.size() > 0) { for (ConnectionDefinition cdMeta : cdMetas) { raMcfClasses.add(cdMeta.getManagedConnectionFactoryClass().getValue()); if (ra != null && ra.getAdminObjects() != null) { List<AdminObject> aoMetas = ra.getAdminObjects(); if (aoMetas.size() > 0) { for (AdminObject aoMeta : aoMetas) { raAoClasses.add(aoMeta.getAdminobjectClass().getValue());
if (cmd.getVersion() == Connector.Version.V_10) { throw ConnectorLogger.ROOT_LOGGER.adminObjectForJCA10(resourceAdapter, jndiName); } else { ResourceAdapter ra1516 = (ResourceAdapter) cmd.getResourceadapter(); if (ra1516.getAdminObjects() != null) { for (AdminObject ao : ra1516.getAdminObjects()) { if (ao.getAdminobjectClass().getValue().equals(className)) aoClass = ao.getAdminobjectClass().getValue();
ResourceAdapter ra = cmd.getResourceadapter(); if (ra.getOutboundResourceadapter() != null) { for (ConnectionDefinition cd : ra.getOutboundResourceadapter().getConnectionDefinitions()) { if (cd.getConnectionFactoryInterface().getValue().equals(interfaceName)) cfInterface = cd.getConnectionFactoryInterface().getValue(); if (ra.getOutboundResourceadapter() != null) { for (ConnectionDefinition cd : ra.getOutboundResourceadapter().getConnectionDefinitions()) { if (cd.getConnectionFactoryInterface().getValue().equals(cfInterface)) mcfClass = cd.getManagedConnectionFactoryClass().getValue();
cmd.validate(); if (cmd != null && cmd.getResourceadapter() != null && cmd.getResourceadapter().getOutboundResourceadapter() != null) { transactionSupport = cmd.getResourceadapter().getOutboundResourceadapter().getTransactionSupport();
/** * A validate method. Don't extending for the moment ValidatableMetadata * * @return true if Ra is valid, false in the other cases */ public boolean validationAsBoolean() { if (this.getMessageadapter() == null || this.getMessageadapter().getMessagelisteners() == null || this.getMessageadapter().getMessagelisteners().size() == 0) return false; MessageListener mlmd = this.getMessageadapter().getMessagelisteners().get(0); if (mlmd.getMessagelistenerType() == null || mlmd.getActivationspec() == null || mlmd.getActivationspec().getActivationspecClass() == null) return false; return true; }
@Override protected javax.resource.spi.ResourceAdapter createRa(String uniqueId, ClassLoader cl) throws NotFoundException, Exception, DeployException { Connector md = mdr.getResourceAdapter(uniqueId); ResourceAdapter ra = md.getResourceadapter(); List<? extends ConfigProperty> l = new ArrayList<ConfigProperty>(); javax.resource.spi.ResourceAdapter rar = (javax.resource.spi.ResourceAdapter)initAndInject(ra.getResourceadapterClass(), l, cl); return rar; }
private static XsdString str(String str) { return new XsdString(str, null); }
/** * Create a new Prototype. * * @param name name * @param type type * @param description description */ private Prototype(String name, String type, String description) { this.localName = new XsdString(name, null); this.localType = new XsdString(type, null);; this.description.add(new LocalizedXsdString(description, null)); }
/** * Convenient method to test if an {@link XsdString} is null NULLXsdString instance * @param xsdString the xsdString to test * @return ture if passes xsdString is null or equals to NULLXsdString instance */ public static boolean isNull(XsdString xsdString) { return (xsdString == null || xsdString.equals(NULL_XSDSTRING)); } }
/** * {@inheritDoc} */ public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((authenticationMechanismType == null) ? 0 : authenticationMechanismType.hashCode()); result = prime * result + ((credentialInterface == null) ? 0 : credentialInterface.hashCode()); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((cIId == null) ? 0 : cIId.hashCode()); return result; }
/** * {@inheritDoc} */ public CopyableMetaData copy() { return new LocalizedXsdString(CopyUtil.cloneString(value), CopyUtil.cloneString(id), CopyUtil.cloneString(lang), CopyUtil.cloneString(tag)); }
ResourceAdapter ra = (ResourceAdapter) cmd.getResourceadapter(); if (ra != null && ra.getOutboundResourceadapter() != null && ra.getOutboundResourceadapter().getConnectionDefinitions() != null) { List<org.jboss.jca.common.api.metadata.spec.ConnectionDefinition> cdMetas = ra.getOutboundResourceadapter().getConnectionDefinitions(); if (cdMetas.size() > 0) { for (org.jboss.jca.common.api.metadata.spec.ConnectionDefinition cdMeta : cdMetas) { raMcfClasses.add(cdMeta.getManagedConnectionFactoryClass().getValue()); if (ra != null && ra.getAdminObjects() != null) { List<org.jboss.jca.common.api.metadata.spec.AdminObject> aoMetas = ra.getAdminObjects(); if (aoMetas.size() > 0) { for (org.jboss.jca.common.api.metadata.spec.AdminObject aoMeta : aoMetas) { raAoClasses.add(aoMeta.getAdminobjectClass().getValue());
@Override public Object initAndInject(String className, List<? extends ConfigProperty> configs, ClassLoader cl) throws DeployException { try { Class clz = Class.forName(className, true, cl); Object o = clz.newInstance(); if (configs != null) { Injection injector = new Injection(); for (ConfigProperty cpmd : configs) { if (cpmd.isValueSet()) { if (XsdString.isNull(cpmd.getConfigPropertyType())) { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue()); } else { injector.inject(o, cpmd.getConfigPropertyName().getValue(), cpmd.getConfigPropertyValue().getValue(), cpmd.getConfigPropertyType().getValue()); } } } } return o; } catch (Throwable t) { throw ConnectorLogger.ROOT_LOGGER.deploymentFailed(t, className); } }
private static XsdString str(String str) { return new XsdString(str, null); }
private static XsdString str(String str) { return new XsdString(str, null); }
private static XsdString str(String str) { return new XsdString(str, null); }
/** * {@inheritDoc} */ public CopyableMetaData copy() { return new XsdString(CopyUtil.cloneString(value), CopyUtil.cloneString(id), CopyUtil.cloneString(tag)); }