- All Superinterfaces:
- Referenceable, Referenceable, Serializable
- See Also:
- Top Examples, Source Code,
Connection
public Connection getConnection()
throws ResourceException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[348]Create ConnectionFactory with the given ManagedConnectionFactory
By Balendran M on 2003/08/14 02:45:08 Rate
private ManagedConnectionFactory mcf = null;
private ConnectionManager cm = null;
public ConnectionFactoryImpl ( ManagedConnectionFactory mcf,
ConnectionManager cm ) {
this.mcf = mcf;
if ( cm == null ) {
this.cm = new DefaultConnectionManager ( ) ;
} else {
this.cm = cm;
}
}
public ConnectionFactoryImpl ( ManagedConnectionFactory mcf ) {
this.mcf = mcf;
this.cm = new DefaultConnectionManager ( ) ;
}
public Connection getConnection ( ) throws ResourceException {
return ( Connection ) cm.allocateConnection ( mcf, null ) ;
}
public Connection getConnection(ConnectionSpec properties)
throws ResourceException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[349]Create connection to the given LDAP server
By Balendran M on 2003/08/14 02:47:21 Rate
private ManagedConnectionFactory mcf = null;
private ConnectionManager cm = null;
public ConnectionFactoryImpl ( ManagedConnectionFactory mcf,
ConnectionManager cm ) {
this.mcf = mcf;
if ( cm == null ) {
this.cm = new DefaultConnectionManager ( ) ;
} else {
this.cm = cm;
}
}
public ConnectionFactoryImpl ( ManagedConnectionFactory mcf ) {
this.mcf = mcf;
this.cm = new DefaultConnectionManager ( ) ;
}
public Connection getConnection ( ConnectionSpec properties )
throws ResourceException {
ConnectionSpecImpl props = ( ConnectionSpecImpl ) properties;
String ctxName = props.getContextName ( ) ;
String userName = props.getUserName ( ) ;
String password = props.getPassword ( ) ;
ConnectionRequestInfo info =
new ConnectionRequestInfoImpl ( ctxName,userName,password ) ;
return ( Connection ) cm.allocateConnection ( mcf, info ) ;
}
public ResourceAdapterMetaData getMetaData()
throws ResourceException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[350]Returns the metadata of the Resource Adapter
By Elanchezhiyan T on 2003/09/04 01:36:13 Rate
public ResourceAdapterMetaData getMetaData ( ) throws ResourceException {
return CalummaMetaData.getMetaData ( ) ;
}
public RecordFactory getRecordFactory()
throws ResourceException
- See Also:
- NotSupportedException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples