|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DatasourceConfiguration
Configuration useful for managing module data sources.
Implementation of this interface should be registered in the ModuleConfiguration
lookup.
| Method Summary | |
|---|---|
void |
bindDatasourceReference(String referenceName,
String jndiName)
Binds the data source reference name with the corresponding data source which is identified the given JNDI name. |
void |
bindDatasourceReferenceForEjb(String ejbName,
String ejbType,
String referenceName,
String jndiName)
Binds the data source reference name with the corresponding data source which is identified the given JNDI name. |
Datasource |
createDatasource(String jndiName,
String url,
String username,
String password,
String driver)
Creates the data source definition in the module. |
String |
findDatasourceJndiName(String referenceName)
Finds JNDI name of the data source which is mapped to the given reference name. |
String |
findDatasourceJndiNameForEjb(String ejbName,
String referenceName)
Finds JNDI name of the data source which is mapped to the given reference name in the scope the EJB. |
Set<Datasource> |
getDatasources()
Returns the data sources defined in the module. |
boolean |
supportsCreateDatasource()
Returns true if data source creation is supported, false otherwise. |
| Method Detail |
|---|
Set<Datasource> getDatasources()
throws ConfigurationException
ConfigurationException - reports problems in retrieving data source
definitions.boolean supportsCreateDatasource()
Datasource createDatasource(String jndiName,
String url,
String username,
String password,
String driver)
throws UnsupportedOperationException,
ConfigurationException,
DatasourceAlreadyExistsException
jndiName - data source JNDI name.url - database URL.username - database user.password - user's password.driver - fully qualified name of the database driver class.
UnsupportedOperationException - if operation is not supported.
ConfigurationException - reports problems in creating data source
definition.
DatasourceAlreadyExistsException - if a data source with the same
JNDI name already exists.
void bindDatasourceReference(String referenceName,
String jndiName)
throws ConfigurationException
referenceName - name used to identify the data sourcejndiName - JNDI name of the data source
ConfigurationException - if there is some problem with data source configuration
void bindDatasourceReferenceForEjb(String ejbName,
String ejbType,
String referenceName,
String jndiName)
throws ConfigurationException
ejbName - EJB nameejbType - EJB type - the possible values are
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.SESSION,
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.ENTITY and
org.netbeans.modules.j2ee.dd.api.ejb.EnterpriseBeans.MESSAGE_DRIVENreferenceName - name used to identify the data sourcejndiName - JNDI name of the data source
ConfigurationException - if there is some problem with data source configuration
String findDatasourceJndiName(String referenceName)
throws ConfigurationException
referenceName - reference name
ConfigurationException - if there is some problem with data source configuration
String findDatasourceJndiNameForEjb(String ejbName,
String referenceName)
throws ConfigurationException
ejbName - EJB namereferenceName - reference name
ConfigurationException - if there is some problem with data source configuration
|
org.netbeans.modules.j2eeserver/4 1.89.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||