/** * PUBLIC: * Configure the login to connect through a non-managed connection factory and adapter connection spec. */ public void configureConnectionSpec(ConnectionFactory connectionFactory, ConnectionSpec connectionSpec) { EISConnectionSpec spec = new EISConnectionSpec(); spec.setConnectionFactory(connectionFactory); spec.setConnectionSpec(connectionSpec); setConnectionSpec(spec); } }
/** * PUBLIC: * Provide the details of my connection information. This is primarily for JMX runtime services. * @return java.lang.String */ public String getConnectionDetails() { return this.getName().toString(); }
/** * PUBLIC: * Construct a EISConnectionSpec with the specified settings. */ public EISConnectionSpec(Context context, String name) throws ValidationException { this.context = context; setName(name); }
/** * PUBLIC: * Configure the login to connect through a non-managed connection factory and the default getConnection(). */ public void configureConnectionSpec(ConnectionFactory connectionFactory) { EISConnectionSpec spec = new EISConnectionSpec(); spec.setConnectionFactory(connectionFactory); setConnectionSpec(spec); }
/** * PUBLIC: * Configure the login to connect through a JDNI managed connection factory and adapter connection spec. */ public void configureConnectionSpec(String jndiName, ConnectionSpec connectionSpec) { EISConnectionSpec spec = new EISConnectionSpec(jndiName); spec.setConnectionSpec(connectionSpec); setConnectionSpec(spec); }
/** * Connect with the specified properties and return the Connection. */ public Connection connectToDataSource(EISAccessor accessor, Properties properties) throws DatabaseException, ValidationException { ConnectionFactory connectionFactory = getConnectionFactory(); if (connectionFactory == null) { try { connectionFactory = (ConnectionFactory)getContext().lookup(getName()); setConnectionFactory(connectionFactory); } catch (Exception exception) { throw ValidationException.cannotAcquireDataSource(getName(), exception); } } try { accessor.setRecordFactory(connectionFactory.getRecordFactory()); if (getConnectionSpec() == null) { return connectionFactory.getConnection(); } else { return connectionFactory.getConnection(getConnectionSpec()); } } catch (ResourceException exception) { throw EISException.resourceException(exception, accessor, null); } }
/** * Connect to the EIS adapter and return the Connection. */ public Object connectToDatasource(Accessor accessor, Session session) { return getConnectionSpec().connectToDataSource((EISAccessor)accessor, getProperties()); }
/** * Constructor. */ public EISLogin(Platform platform) { super(platform); this.connector = new EISConnectionSpec(); }
((EISConnectionSpec)login.getConnector()).setConnectionSpecObject(connectorValue); if (factoryValue instanceof String) { ((EISConnectionSpec)login.getConnector()).setName((String)factoryValue); } else if (factoryValue != null) { ((EISConnectionSpec)login.getConnector()).setConnectionFactoryObject(factoryValue);
/** * INTERNAL: * Print something useful on the log. */ public void toString(java.io.PrintWriter writer) { writer.println(toString()); } }
/** * PUBLIC: * Set the javax.resource.cci.ConnectionFactory. */ public void setConnectionFactoryObject(Object connectionFactory) { setConnectionFactory((ConnectionFactory)connectionFactory); }
/** * PUBLIC: * Set the javax.resource.cci.ConnectionSpec. * This is only required if the default getConnection() on the connection factory is not used. * This must be set to the EIS adapter specific connection spec. */ public void setConnectionSpecObject(Object connectionFactory) { setConnectionSpec((ConnectionSpec)connectionFactory); }
/** * Connect with the specified properties and return the Connection. */ public Connection connectToDataSource(EISAccessor accessor, Properties properties) throws DatabaseException, ValidationException { ConnectionFactory connectionFactory = getConnectionFactory(); if (connectionFactory == null) { try { connectionFactory = (ConnectionFactory)getContext().lookup(getName()); setConnectionFactory(connectionFactory); } catch (Exception exception) { throw ValidationException.cannotAcquireDataSource(getName(), exception); } } try { accessor.setRecordFactory(connectionFactory.getRecordFactory()); if (getConnectionSpec() == null) { return connectionFactory.getConnection(); } else { return connectionFactory.getConnection(getConnectionSpec()); } } catch (ResourceException exception) { throw EISException.resourceException(exception, accessor, null); } }
/** * Connect to the EIS adapter and return the Connection. */ public Object connectToDatasource(Accessor accessor, Session session) { return getConnectionSpec().connectToDataSource((EISAccessor)accessor, getProperties()); }
/** * PUBLIC: * Configure the login to connect through a non-managed connection factory and the default getConnection(). */ public void configureConnectionSpec(ConnectionFactory connectionFactory) { EISConnectionSpec spec = new EISConnectionSpec(); spec.setConnectionFactory(connectionFactory); setConnectionSpec(spec); }
/** * PUBLIC: * Configure the login to connect through a JDNI managed connection factory and adapter connection spec. */ public void configureConnectionSpec(String jndiName, ConnectionSpec connectionSpec) { EISConnectionSpec spec = new EISConnectionSpec(jndiName); spec.setConnectionSpec(connectionSpec); setConnectionSpec(spec); }
/** * Constructor. */ public EISLogin(Platform platform) { super(platform); this.connector = new EISConnectionSpec(); }
/** * INTERNAL: * Print something useful on the log. */ public void toString(java.io.PrintWriter writer) { writer.println(toString()); } }
/** * PUBLIC: * Set the javax.resource.cci.ConnectionFactory. */ public void setConnectionFactoryObject(Object connectionFactory) { setConnectionFactory((ConnectionFactory)connectionFactory); }
/** * PUBLIC: * Set the javax.resource.cci.ConnectionSpec. * This is only required if the default getConnection() on the connection factory is not used. * This must be set to the EIS adapter specific connection spec. */ public void setConnectionSpecObject(Object connectionFactory) { setConnectionSpec((ConnectionSpec)connectionFactory); }