|
46 | 46 | * the properties annotation element, the precedence order is undefined
|
47 | 47 | * and implementation specific:
|
48 | 48 | * <p>
|
49 |
| - * <pre> |
50 |
| - * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
51 |
| - * className="org.apache.derby.jdbc.ClientDataSource", |
52 |
| - * url="jdbc:derby://localhost:1527/myDB;user=bill", |
53 |
| - * user="lance", |
54 |
| - * password="secret", |
55 |
| - * databaseName="testDB", |
56 |
| - * serverName="luckydog" |
57 |
| - * )// DO NOT DO THIS!!! |
58 |
| - * </pre> |
| 49 | + * {@snippet : |
| 50 | + * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
| 51 | + * className="org.apache.derby.jdbc.ClientDataSource", |
| 52 | + * url="jdbc:derby://localhost:1527/myDB;user=bill", |
| 53 | + * user="lance", |
| 54 | + * password="secret", |
| 55 | + * databaseName="testDB", |
| 56 | + * serverName="luckydog" |
| 57 | + * )// DO NOT DO THIS!!! |
| 58 | + * } |
59 | 59 | * <p>
|
60 | 60 | * In the above example, the {@code databaseName}, {@code user}
|
61 | 61 | * and {@code serverName} properties were specified as part of the
|
|
67 | 67 | * annotation element, the annotation element value takes precedence.
|
68 | 68 | * For example:
|
69 | 69 | * <p>
|
70 |
| - * <pre> |
71 |
| - * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
72 |
| - * className="org.apache.derby.jdbc.ClientDataSource", |
73 |
| - * user="lance", |
74 |
| - * password="secret", |
75 |
| - * databaseName="testDB", |
76 |
| - * serverName="luckydog", |
77 |
| - * properties= {"databaseName=myDB", "databaseProp=doThis"} |
| 70 | + * {@snippet : |
| 71 | + * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
| 72 | + * className="org.apache.derby.jdbc.ClientDataSource", |
| 73 | + * user="lance", |
| 74 | + * password="secret", |
| 75 | + * databaseName="testDB", |
| 76 | + * serverName="luckydog", |
| 77 | + * properties= {"databaseName=myDB", "databaseProp=doThis"} |
78 | 78 | * )// DO NOT DO THIS!!!
|
79 |
| - * </pre> |
| 79 | + * } |
80 | 80 | * <p>
|
81 | 81 | * This would result in the following values being used when configuring
|
82 | 82 | * the DataSource:
|
|
104 | 104 | * <p>
|
105 | 105 | * Examples:
|
106 | 106 | * <br>
|
107 |
| - * <pre> |
108 |
| - * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
109 |
| - * className="com.foobar.MyDataSource", |
110 |
| - * portNumber=6689, |
111 |
| - * serverName="myserver.com", |
112 |
| - * user="lance", |
113 |
| - * password="secret" |
114 |
| - * ) |
115 |
| - * |
116 |
| - * </pre> |
| 107 | + * {@snippet : |
| 108 | + * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
| 109 | + * className="com.foobar.MyDataSource", |
| 110 | + * portNumber=6689, |
| 111 | + * serverName="myserver.com", |
| 112 | + * user="lance", |
| 113 | + * password="secret" |
| 114 | + * ) |
| 115 | + * } |
117 | 116 | * <p>
|
118 | 117 | * Using a {@code URL}:
|
119 | 118 | * <br>
|
120 |
| - * <pre> |
121 |
| - * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
122 |
| - * className="org.apache.derby.jdbc.ClientDataSource", |
123 |
| - * url="jdbc:derby://localhost:1527/myDB", |
124 |
| - * user="lance", |
125 |
| - * password="secret" |
| 119 | + * {@snippet : |
| 120 | + * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", |
| 121 | + * className="org.apache.derby.jdbc.ClientDataSource", |
| 122 | + * url="jdbc:derby://localhost:1527/myDB", |
| 123 | + * user="lance", |
| 124 | + * password="secret" |
126 | 125 | * )
|
127 |
| - * </pre> |
| 126 | + * } |
128 | 127 | * <p>
|
129 | 128 | * An example lookup of the DataSource from an Jakarta Enterprise Beans:
|
130 |
| - * <pre> |
131 |
| - * @Stateless |
| 129 | + * {@snippet : |
| 130 | + * @Stateless |
132 | 131 | * public class MyStatelessEJB {
|
133 |
| - * @Resource(lookup="java:global/MyApp/myDataSource") |
134 |
| - * DataSource myDB; |
135 |
| - * ... |
| 132 | + * @Resource(lookup="java:global/MyApp/myDataSource") |
| 133 | + * DataSource myDB; |
| 134 | + * ... |
136 | 135 | * }
|
137 |
| - * </pre> |
138 |
| - * <p> |
| 136 | + * } |
| 137 | + * |
139 | 138 | * @see javax.sql.DataSource
|
140 | 139 | * @see javax.sql.XADataSource
|
141 | 140 | * @see javax.sql.ConnectionPoolDataSource
|
|
208 | 207 | /**
|
209 | 208 | * Isolation level for connections. The Isolation level
|
210 | 209 | * must be one of the following:
|
211 |
| - * <p> |
| 210 | + * |
212 | 211 | * <ul>
|
213 | 212 | * <li>Connection.TRANSACTION_NONE,
|
214 | 213 | * <li>Connection.TRANSACTION_READ_ UNCOMMITTED,
|
215 | 214 | * <li>Connection.TRANSACTION_READ_COMMITTED,
|
216 | 215 | * <li>Connection.TRANSACTION_REPEATABLE_READ,
|
217 | 216 | * <li>Connection.TRANSACTION_SERIALIZABLE
|
218 | 217 | *</ul>
|
219 |
| - * <p> |
| 218 | + * |
220 | 219 | * Default is vendor-specific.
|
221 | 220 | * @since 1.1
|
222 | 221 | */
|
|
281 | 280 | /**
|
282 | 281 | * Used to specify vendor-specific properties and less commonly
|
283 | 282 | * used {@code DataSource} properties such as:
|
284 |
| - * <p> |
| 283 | + * |
285 | 284 | * <ul>
|
286 | 285 | * <li>dataSourceName
|
287 | 286 | * <li>networkProtocol
|
288 | 287 | * <li>propertyCycle
|
289 | 288 | * <li>roleName
|
290 | 289 | * </ul>
|
291 |
| - * <p> |
| 290 | + * |
292 | 291 | * Properties are specified using the format:
|
293 | 292 | * <i>propertyName=propertyValue</i> with one property per array element.
|
294 | 293 | * <p>
|
|
0 commit comments