public int getNumOfSupportedCFs () { return outboundRA.getConnectionDefs().size(); }
/** * set connection factory impl */ public void setConnectionFactoryImpl(String cf) { getConnectionDef().setConnectionFactoryImpl(cf); }
for (Iterator i = this.outboundRA.getConnectionDefs().iterator(); i.hasNext();) + this.outboundRA.getTransSupport()); for (Iterator i = this.outboundRA.getAuthMechanisms().iterator(); i.hasNext();) + this.outboundRA.getReauthenticationSupport());
Set ddAuthMechanisms = ora.getAuthMechanisms(); String credentialInterfaceName = ora.getCredentialInterfaceName(auth.credentialInterface()); ora.addAuthMechanism(authM); if(!ora.isReauthenticationSupportSet()){ ora.setReauthenticationSupport(connector.reauthenticationSupport()); if(!ora.isTransactionSupportSet()){ ora.setTransactionSupport(connector.transactionSupport().toString());
/** * Adds a new DOL descriptor instance to the descriptor instance associated with * this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object obj) { if (obj instanceof AuthMechanism) { boolean flag = descriptor.addAuthMechanism((AuthMechanism)obj); if (flag == false) DOLUtils.getDefaultLogger().finer("The AuthMechanism object already exists in the Descriptor"); } else if (obj instanceof ConnectionDefDescriptor) { descriptor.addConnectionDefDescriptor((ConnectionDefDescriptor)obj); } else if (obj instanceof ConnectorConfigProperty) { descriptor.addConfigProperty((ConnectorConfigProperty)obj); } else if (obj instanceof SecurityPermission) { // security-permission element is a direct sub element of // resourceadapter, so set the value in ConnectorDescriptor ConnectorDescriptor connDesc = (ConnectorDescriptor)getParentNode().getDescriptor(); connDesc.addSecurityPermission((SecurityPermission)obj); } }
ConnectorDescriptor desc = rarContext.getDescriptor(); if (!desc.getOutBoundDefined()) { OutboundResourceAdapter ora = new OutboundResourceAdapter(); desc.setOutboundResourceAdapter(ora); int authMechanismValue = getAuthMechVal(authMechanism.authMechanism()); AuthenticationMechanism.CredentialInterface ci = authMechanism.credentialInterface(); String credentialInterface = ora.getCredentialInterfaceName(ci); ora.addAuthMechanism(auth); } else { getFailureResult(element, "Not a @Connector annotation : @AuthenticationMechanism must " +
OutboundResourceAdapter ora = new OutboundResourceAdapter(); desc.setOutboundResourceAdapter(ora); if (!ora.hasConnectionDefDescriptor(connDefn.connectionFactory().getName())) { ConnectionDefDescriptor cdd = new ConnectionDefDescriptor(); cdd.setConnectionFactoryImpl(connDefn.connectionFactoryImpl().getName()); ora.addConnectionDefDescriptor(cdd);
/** * method to add the child nodes of RESOURCE_ADAPTER and OUTBOUND_RESOURCE_ADAPTER */ private void append (Node raNode, OutboundResourceAdapter conDesc) { ConnectionDefNode conDef = new ConnectionDefNode(); raNode = conDef.writeDescriptor(raNode, conDesc); appendTextChild(raNode, ConnectorTagNames.TRANSACTION_SUPPORT, conDesc.getTransSupport()); AuthMechNode auth = new AuthMechNode(); raNode = auth.writeDescriptor(raNode, conDesc); appendTextChild(raNode, ConnectorTagNames.REAUTHENTICATION_SUPPORT, conDesc.getReauthenticationSupport()); } }
/** * This method is required for 1.0 DTD so that there will be 1 instance of * ConnectionDefDescriptor available * I know that this constructor will be called only when it is a 1.0 DD * dont want to rely on whether 1.0 or 1.5 spec version * So this method is called when the ConnectorNode knows that it is for 1.0 DTD */ public void createConDefDescriptorFor10() { ConnectionDefDescriptor conDef = new ConnectionDefDescriptor(); ((OutboundResourceAdapter)getDescriptor()).addConnectionDefDescriptor(conDef); }
authMechs = ((ConnectorDescriptor)descriptor).getAuthMechanisms().iterator(); } else if (descriptor instanceof OutboundResourceAdapter) { authMechs = ((OutboundResourceAdapter)descriptor).getAuthMechanisms().iterator();
public static int getTransactionSupportFromRaXml(String rarName) throws ConnectorRuntimeException { String txSupport = ConnectorRuntime.getRuntime().getConnectorDescriptor(rarName). getOutboundResourceAdapter().getTransSupport(); return parseTransactionSupportString(txSupport); } }
configProps = ((AdminObject)descriptor).getConfigProperties().iterator(); } else if (descriptor instanceof OutboundResourceAdapter) { configProps = ((OutboundResourceAdapter)descriptor).getConfigProperties().iterator(); } else if (descriptor instanceof MessageListener){ configProps = ((MessageListener)descriptor).getConfigProperties().iterator();
public static OutboundResourceAdapter getOutbound(ConnectorDescriptor desc) { if (!desc.getOutBoundDefined()) { desc.setOutboundResourceAdapter(new OutboundResourceAdapter()); } return desc.getOutboundResourceAdapter(); }
for (Iterator i = this.outboundRA.getConnectionDefs().iterator(); i.hasNext();) + this.outboundRA.getTransSupport()); for (Iterator i = this.outboundRA.getAuthMechanisms().iterator(); i.hasNext();) + this.outboundRA.getReauthenticationSupport());
/** * Adds a new DOL descriptor instance to the descriptor instance associated with * this XMLNode * * @param descriptor the new descriptor */ public void addDescriptor(Object obj) { if (obj instanceof AuthMechanism) { boolean flag = descriptor.addAuthMechanism((AuthMechanism)obj); if (flag == false) DOLUtils.getDefaultLogger().finer("The AuthMechanism object already exists in the Descriptor"); } else if (obj instanceof ConnectionDefDescriptor) { descriptor.addConnectionDefDescriptor((ConnectionDefDescriptor)obj); } else if (obj instanceof ConnectorConfigProperty) { descriptor.addConfigProperty((ConnectorConfigProperty)obj); } else if (obj instanceof SecurityPermission) { // security-permission element is a direct sub element of // resourceadapter, so set the value in ConnectorDescriptor ConnectorDescriptor connDesc = (ConnectorDescriptor)getParentNode().getDescriptor(); connDesc.addSecurityPermission((SecurityPermission)obj); } }
/** * method to add the child nodes of RESOURCE_ADAPTER and OUTBOUND_RESOURCE_ADAPTER */ private void append (Node raNode, OutboundResourceAdapter conDesc) { ConnectionDefNode conDef = new ConnectionDefNode(); raNode = conDef.writeDescriptor(raNode, conDesc); appendTextChild(raNode, ConnectorTagNames.TRANSACTION_SUPPORT, conDesc.getTransSupport()); AuthMechNode auth = new AuthMechNode(); raNode = auth.writeDescriptor(raNode, conDesc); appendTextChild(raNode, ConnectorTagNames.REAUTHENTICATION_SUPPORT, conDesc.getReauthenticationSupport()); } }
/** * This method is required for 1.0 DTD so that there will be 1 instance of * ConnectionDefDescriptor available * I know that this constructor will be called only when it is a 1.0 DD * dont want to rely on whether 1.0 or 1.5 spec version * So this method is called when the ConnectorNode knows that it is for 1.0 DTD */ public void createConDefDescriptorFor10() { ConnectionDefDescriptor conDef = new ConnectionDefDescriptor(); ((OutboundResourceAdapter)getDescriptor()).addConnectionDefDescriptor(conDef); }
authMechs = ((ConnectorDescriptor)descriptor).getAuthMechanisms().iterator(); } else if (descriptor instanceof OutboundResourceAdapter) { authMechs = ((OutboundResourceAdapter)descriptor).getAuthMechanisms().iterator();
/** * provides the transaction support for the pool. * If none specified in the pool, tx support at RA level will be returned. * @param pool connector connection pool * @return tx support level */ private String getTransactionSupport(ConnectorConnectionPool pool) { String txSupport = pool.getTransactionSupport(); if (txSupport != null) { return txSupport; } try { txSupport = ConnectorRuntime.getRuntime().getConnectorDescriptor( pool.getResourceAdapterName()).getOutboundResourceAdapter(). getTransSupport(); } catch (ConnectorRuntimeException cre) { Object params[] = new Object[]{pool.getResourceAdapterName(), cre}; _logger.log(Level.WARNING, "error.retrieving.tx-support.from.rar", params); if(_logger.isLoggable(Level.FINEST)) { _logger.finest("setting no-tx-support as tx-support-level for pool : " + pool.getName()); } txSupport = ConnectorConstants.NO_TRANSACTION_TX_SUPPORT_STRING; } return txSupport; }
configProps = ((AdminObject)descriptor).getConfigProperties().iterator(); } else if (descriptor instanceof OutboundResourceAdapter) { configProps = ((OutboundResourceAdapter)descriptor).getConfigProperties().iterator(); } else if (descriptor instanceof MessageListener){ configProps = ((MessageListener)descriptor).getConfigProperties().iterator();