Skip to content

Commit 4a71c29

Browse files
author
epam3_norkin_mark
committed
add context path mail session resource
1 parent b804550 commit 4a71c29

1 file changed

Lines changed: 36 additions & 42 deletions

File tree

‎WebContent/META-INF/context.xml‎

Lines changed: 36 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,42 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!--=============================================================
3-
Configuration file for Tomcat 6
4-
Data source and connection pool configuration
5-
(The default Tomcat's DBCP is used)
6-
=============================================================-->
2+
<!--============================================================= Configuration
3+
file for Tomcat 6 Data source and connection pool configuration (The default
4+
Tomcat's DBCP is used) ============================================================= -->
75

86
<Context>
97

10-
<!--=============================================================
11-
maxActive: the maximum number of active connections that can be
12-
allocated from this pool at the same time, negative for no limit.
13-
(default 8)
14-
15-
maxIdle: the maximum number of connections that can remain idle in
16-
the pool, without extra ones being released, negative for no limit.
17-
(default 8)
18-
19-
maxWait: the maximum number of milliseconds that the pool will wait
20-
(when there are no available connections) for a connection to be
21-
returned before throwing an exception, -1 to wait indefinitely.
22-
23-
url: the connection URL to be passed to JDBC driver to establish
24-
a connection.
25-
26-
driverClassName: the FQN of the JDBC driver to be used.
27-
28-
defaultAutoCommit: the default auto-commit state of connections
29-
created by this pool.
30-
(default true)
31-
32-
defaultTransactionIsolation: the default TransactionIsolation
33-
state of connections created by this pool.
34-
One of the following: (see javadoc)
35-
NONE READ_COMMITTED READ_UNCOMMITTED REPEATABLE_READ SERIALIZABLE
36-
(default - driver default)
37-
=============================================================-->
38-
<Resource name="jdbc/SummaryTask4"
39-
auth="Container"
40-
type="javax.sql.DataSource"
41-
maxActive="100" maxIdle="30" maxWait="10000"
42-
username="root" password="password"
43-
driverClassName="com.mysql.jdbc.Driver"
44-
defaultAutoCommit="false"
45-
defaultTransactionIsolation="READ_COMMITTED"
46-
url="jdbc:mysql://127.0.0.1:3306/university_admission?useEncoding=true&amp;characterEncoding=UTF-8"/>
8+
<!--============================================================= maxActive:
9+
the maximum number of active connections that can be allocated from this
10+
pool at the same time, negative for no limit. (default 8) maxIdle: the maximum
11+
number of connections that can remain idle in the pool, without extra ones
12+
being released, negative for no limit. (default 8) maxWait: the maximum number
13+
of milliseconds that the pool will wait (when there are no available connections)
14+
for a connection to be returned before throwing an exception, -1 to wait
15+
indefinitely. url: the connection URL to be passed to JDBC driver to establish
16+
a connection. driverClassName: the FQN of the JDBC driver to be used. defaultAutoCommit:
17+
the default auto-commit state of connections created by this pool. (default
18+
true) defaultTransactionIsolation: the default TransactionIsolation state
19+
of connections created by this pool. One of the following: (see javadoc)
20+
NONE READ_COMMITTED READ_UNCOMMITTED REPEATABLE_READ SERIALIZABLE (default
21+
- driver default) ============================================================= -->
22+
<Resource name="jdbc/SummaryTask4" auth="Container" type="javax.sql.DataSource"
23+
maxActive="100" maxIdle="30" maxWait="10000" username="root" password="password"
24+
driverClassName="com.mysql.jdbc.Driver" defaultAutoCommit="false"
25+
defaultTransactionIsolation="READ_COMMITTED"
26+
url="jdbc:mysql://127.0.0.1:3306/university_admission?useEncoding=true&amp;characterEncoding=UTF-8" />
27+
28+
<!-- <Resource auth="Container" mail.smtp.host="localhost" name="mail/NomDeLaRessource"
29+
type="javax.mail.Session" /> -->
30+
31+
<!-- <Resource name="mail/MESMTPServer" auth="Container" type="javax.mail.Session"
32+
mail.smtp.host="SMTP_SERVER" mail.smtp.port="465" mail.smtp.auth="true" mail.smtp.user="SMTP_USER"
33+
password="MAIL_PASSWORD" mail.transport.protocol="smtps" mail.smtp.ssl.enable="true"
34+
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory" /> -->
35+
36+
<Resource name="mail/Session" auth="Container" type="javax.mail.Session"
37+
mail.transport.protocol="smtp" mail.smtp.host="smtp.gmail.com"
38+
mail.smtp.starttls.enable="true" mail.smtp.port="587"
39+
mail.smtp.user="mail.university.admission@gmail.com" mail.smtp.auth="true"
40+
password="univer1234" mail.smtp.ssl.trust="smtp.gmail.com" />
4741

4842
</Context>

0 commit comments

Comments
 (0)