org.ow2.jonas.datasource
Interface DataSourceService


public interface DataSourceService

Author:
Loic Albertin

Method Summary
 String deployDataSource(String className, String description, String url, String user, String password, String databaseName, int portNumber, String serverName, int isolationLevel, boolean transactional, int initialPoolSize, int maxPoolSize, int minPoolSize, int maxIdleTime, int maxStatements, int loginTimeout, Map<String,String> properties)
          Deploy a DataSource using the given parameters and returns the JNDI name of the created DataSource.
 

Method Detail

deployDataSource

String deployDataSource(String className,
                        String description,
                        String url,
                        String user,
                        String password,
                        String databaseName,
                        int portNumber,
                        String serverName,
                        int isolationLevel,
                        boolean transactional,
                        int initialPoolSize,
                        int maxPoolSize,
                        int minPoolSize,
                        int maxIdleTime,
                        int maxStatements,
                        int loginTimeout,
                        Map<String,String> properties)
Deploy a DataSource using the given parameters and returns the JNDI name of the created DataSource. A caching mechanism is implemented and calling this method twice with same parameters will return the same JNDI name.

Parameters:
className - DataSource implementation class name
description - Description of the data source
url - A JDBC url If the url property is specified along with other standard DataSource properties such as serverName and portNumber, the more specific properties will take precedence and the url will be ignored
user - User name for connection authentications
password - password for connection authentications
databaseName - Name of a database on a server
portNumber - Port number where a server is listening for requests
serverName - Database server name
isolationLevel - Isolation level for connections.
transactional - Indicates whether a connection is transactional or not
initialPoolSize - Number of connections that should be created when a connection pool is initialized
maxPoolSize - Maximum number of connections that should be concurrently allocated for a connection pool
minPoolSize - Minimum number of connections that should be allocated for a connection pool
maxIdleTime - The number of seconds that a physical connection should remain unused in the pool before the connection is closed for a connection pool
maxStatements - The total number of statements that a connection pool should keep open. A value of 0 indicates that the caching of statements is disabled for a connection pool
loginTimeout - The maximum time in seconds that this data source will wait while attempting to connect to a database. A value of 0 specifies that the timeout is the default system timeout if there is one, otherwise it specifies that there is no timeout
properties - Used to specify vendor specific properties and less commonly used DataSource properties
Returns:
the JNDI name under which the DataSource is registered


Copyright © 2012 OW2 Consortium. All Rights Reserved.