|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.component.jdbcpool.JDBCPoolComponent
public class JDBCPoolComponent
Defines a component that creates a JDBC pool in order to use it in EasyBeans.
Field Summary | |
---|---|
private ConnectionManager |
connectionManager
Connection manager object. |
private static int |
DEFAULT_MAX_POOL
Default max pool. |
private static int |
DEFAULT_MIN_POOL
Default min pool. |
private static java.lang.String |
DEFAULT_PASSWORD
Default password. |
private static int |
DEFAULT_PSTMT
Default prepared statement. |
private static java.lang.String |
DEFAULT_USER
Default username. |
private java.lang.String |
driver
Name of the driver class to use. |
private java.lang.String |
jndiName
JNDI name. |
private static JLog |
logger
Logger. |
private java.lang.String |
password
Password. |
private int |
poolMax
Pool max. |
private int |
poolMin
Pool min. |
private int |
pstmtMax
Max of prepared statement. |
private java.lang.String |
url
URL for accessing to the database. |
private java.lang.String |
username
Username. |
private boolean |
useTM
Use transaction or not ? |
Constructor Summary | |
---|---|
JDBCPoolComponent()
Default constructor. |
Method Summary | |
---|---|
void |
init()
Init method. This method is called before the start method. |
void |
setDriver(java.lang.String driver)
Sets the name of the JDBC driver. |
void |
setJndiName(java.lang.String jndiName)
Sets the JNDI name. |
void |
setPassword(java.lang.String password)
Sets the password to use. |
void |
setPoolMax(int poolMax)
The maximum size of the JDBC pool. |
void |
setPoolMin(int poolMin)
The minimum size of the JDBC pool. |
void |
setPstmtMax(int pstmtMax)
Set the max cache of prepared statement. |
void |
setUrl(java.lang.String url)
Sets the connection's URL. |
void |
setUsername(java.lang.String username)
Sets the username that is used to get a connection. |
void |
setUseTM(boolean useTM)
Is that the pool will use transaction or not. |
void |
start()
Start method. This method is called after the init method. |
void |
stop()
Stop method. This method is called when component needs to be stopped. |
private void |
validate()
Validate current data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static JLog logger
private static final java.lang.String DEFAULT_USER
private static final java.lang.String DEFAULT_PASSWORD
private static final int DEFAULT_MIN_POOL
private static final int DEFAULT_MAX_POOL
private static final int DEFAULT_PSTMT
private ConnectionManager connectionManager
private java.lang.String jndiName
private java.lang.String username
private java.lang.String password
private java.lang.String url
private java.lang.String driver
private boolean useTM
private int poolMin
private int poolMax
private int pstmtMax
Constructor Detail |
---|
public JDBCPoolComponent()
Method Detail |
---|
public void init() throws EZBComponentException
init
in interface EZBComponent
EZBComponentException
- if the initialization has failed.private void validate() throws EZBComponentException
EZBComponentException
- if validation fails.public void start() throws EZBComponentException
start
in interface EZBComponent
EZBComponentException
- if the start has failed.public void stop() throws EZBComponentException
stop
in interface EZBComponent
EZBComponentException
- if the stop is failing.public void setDriver(java.lang.String driver)
driver
- the driver's namepublic void setJndiName(java.lang.String jndiName)
jndiName
- the name to bind the datasourcepublic void setPassword(java.lang.String password)
password
- the password for the url connection.public void setPoolMax(int poolMax)
poolMax
- the value of the pool's max.public void setPoolMin(int poolMin)
poolMin
- the value of the pool's min.public void setPstmtMax(int pstmtMax)
pstmtMax
- the max value for prepare statement.public void setUrl(java.lang.String url)
url
- the URL used for the connection.public void setUsername(java.lang.String username)
username
- the name of the user.public void setUseTM(boolean useTM)
useTM
- the true/false value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |